Document Type Association rule on namespace for tag URN

Having trouble installing Oxygen? Got a bug to report? Post it all here.
whyme
Posts: 89
Joined: Fri Mar 08, 2013 8:58 am

Document Type Association rule on namespace for tag URN

Post by whyme »

Hi, I'm setting up a document type association bound to a namespace that is defined with a tag URN. The oXygen association rules aren't binding to documents that have the tag URN as a namespace. I've determined through trial and error that the comma (required by tag URNs) is preventing the namespace from being detected. Is there a work-around?
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Document Type Association rule on namespace for tag URN

Post by Radu »

Hi,

Could you give me a small example (a small snippet of XML code containing the root element and its namespace definitions) just to see that I correctly understand the problem?

As a workaround (of course we would be interested in also fixing this if it turns out to be a bug) the document type association matching can also specify a custom Java class which could be used to provide custom detection:
http://www.oxygenxml.com/doc/versions/1 ... tings.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
whyme
Posts: 89
Joined: Fri Mar 08, 2013 8:58 am

Re: Document Type Association rule on namespace for tag URN

Post by whyme »

Sure, here's a snippet with the root element:

Code: Select all


<TAN-T xmlns="tag:textalign.net,2015:ns" ... >...</TAN-T>
My workaround right now for association rules is this: tag:textalign.net*2015:ns, which is likely to be sufficient. The comma is mandated in tag URNs, which are valid namespaces, so perhaps in this part of the oXygen preferences, a literal comma could be escaped out?
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Document Type Association rule on namespace for tag URN

Post by Radu »

Hi,

Your workaround is quite good so for now you should keep that.
I will add this problem to our issues list.
What happens is that the matching between the document namespace and the namespace pattern specified in the document type association is done in a wild card pattern comparator (this is the reason why using "*" in the namespace value works for you). And that pattern comparator splits the specified pattern in the document type association at the comma (because its code was originally written for a file pattern comparator which can match patterns like "*.gif, *.png"). Anyway, we'll work to fix this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Document Type Association rule on namespace for tag URN

Post by Radu »

Hi,

Just to update this thread, the issue should be fixed in Oxygen 17.1.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply