Page 1 of 1

Document Type Association rule on namespace for tag URN

Posted: Fri Sep 18, 2015 6:40 pm
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?

Re: Document Type Association rule on namespace for tag URN

Posted: Mon Sep 21, 2015 10:49 am
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

Re: Document Type Association rule on namespace for tag URN

Posted: Mon Sep 21, 2015 8:12 pm
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?

Re: Document Type Association rule on namespace for tag URN

Posted: Tue Sep 22, 2015 11:41 am
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

Re: Document Type Association rule on namespace for tag URN

Posted: Fri Dec 18, 2015 12:52 pm
by Radu
Hi,

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

Regards,
Radu