Page 1 of 1

[RNG] Excluding the null-namespace

Posted: Wed Jul 08, 2015 6:42 pm
by Christian Roth
Hi,

given the following schema:

Code: Select all

<grammar 
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="mynamespace">
<start>
<element name="root">
<zeroOrMore>
<attribute>
<anyName>
<except>
<nsName ns=""/>
<nsName ns="mynamespace"/>
</except>
</anyName>
</attribute>
</zeroOrMore>
</element>
</start>
</grammar>
why does the line

Code: Select all

<nsName ns=""/>
resolve to "mynamespace" instead of "[No Namespace]" (i.e. the null namespace)?

Image

How would I exclude all attributes in the null-namespace in my above schema?

Thanks,
Christian

Re: [RNG] Excluding the null-namespace

Posted: Thu Jul 09, 2015 12:25 pm
by adrian
Hi,
Christian Roth wrote:why does the line

Code: Select all

<nsName ns=""/>
resolve to "mynamespace" instead of "[No Namespace]" (i.e. the null namespace)?
That's a bug in the RNG diagram representation, it considers an empty @ns value as unset and incorrectly inherits the namespace. It should be "no namespace". I've logged this on our issue tracking tool.

From what I tested your schema is correctly excluding all attributes from "no namespace".

Regards,
Adrian

Re: [RNG] Excluding the null-namespace

Posted: Thu Jul 09, 2015 12:48 pm
by Christian Roth
Thank you Adrian for the info. So my schema is correct, just the visual representation in oXygen isn't (yet :) ). Good to know, and enough to let me continue my work for now.

Regards, Christian

Re: [RNG] Excluding the null-namespace

Posted: Fri Dec 18, 2015 1:30 pm
by Radu
Hi,

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

Regards,
Radu