[RNG] Excluding the null-namespace

This should cover W3C XML Schema, Relax NG and DTD related problems.
Christian Roth
Posts: 15
Location: Munich, Germany

[RNG] Excluding the null-namespace

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: 2451

Re: [RNG] Excluding the null-namespace

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
Location: Munich, Germany

Re: [RNG] Excluding the null-namespace

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: 5690

Re: [RNG] Excluding the null-namespace

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

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests