[RNG] Excluding the null-namespace

This should cover W3C XML Schema, Relax NG and DTD related problems.
Christian Roth
Posts: 15
Joined: Sat Mar 12, 2005 2:45 pm
Location: Munich, Germany

[RNG] Excluding the null-namespace

Post by Christian Roth » Wed Jul 08, 2015 6:42 pm

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
<oXygen/> XML Editor 16.1

adrian
Posts: 2551
Joined: Tue May 17, 2005 4:01 pm

Re: [RNG] Excluding the null-namespace

Post by adrian » Thu Jul 09, 2015 12:25 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Christian Roth
Posts: 15
Joined: Sat Mar 12, 2005 2:45 pm
Location: Munich, Germany

Re: [RNG] Excluding the null-namespace

Post by Christian Roth » Thu Jul 09, 2015 12:48 pm

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
<oXygen/> XML Editor 16.1

Radu
Posts: 6503
Joined: Fri Jul 09, 2004 5:18 pm

Re: [RNG] Excluding the null-namespace

Post by Radu » Fri Dec 18, 2015 1:30 pm

Hi,

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

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

Post Reply