<div dir="ltr">Maybe just logging a warning would be sufficient.<div> (*Chris*)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 6:09 AM, Michael Kay <span dir="ltr"><<a href="mailto:mike@saxonica.com" target="_blank">mike@saxonica.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>JDOM (and other processors) should allow such names. It shouldn't be a configuration option.</div>
<div><br></div><div>"Reserved" means (I believe) "reserved for use by W3C in current or future standards". Therefore a W3C standard could come out next week that defines a legitimate use of the name "XMLFault". You would want JDOM applications to work with such documents.</div>
<div><br></div><div>Pragmatically, such names are in common use by users who haven't read the admonition against them, and since most software in the processing chain allows them, it's awkward for everyone if the data then hits a processor that doesn't.</div>
<div><br></div><div>Michael Kay</div><div>Saxonica</div><div><br></div><br><div><div><div class="h5"><div>On 13 Mar 2014, at 12:51, Rolf <<a href="mailto:jdom@tuis.net" target="_blank">jdom@tuis.net</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5">
<div bgcolor="#FFFFFF" text="#000000">
An issue has been opened against JDOM:
<a href="https://github.com/hunterhacker/jdom/issues/126" target="_blank">https://github.com/hunterhacker/jdom/issues/126</a><br>
<br>
The basic issue is the following: The input XML document contains:<br>
<br>
<span><XMLFault:XMLFault></span>...<span></XMLFault:XMLFault><br>
<br>
And the namespace XMLFault is declared somewhere....<br>
<br>
According to the XML specification, the namespace prefix is not
allowed to start with the letters XML (in any case, upper, or
lower).<br>
<br>
JDOM is not allowing this to happen, and failing to process/load
the document.<br>
<br>
Unfortunately, the specification actually says:<br>
<br>
</span>
<blockquote>
<div><p><a name="144bb9be5893277f_xmlReserved"><b>Namespace
constraint: Reserved Prefixes and Namespace Names</b></a></p>
<a name="144bb9be5893277f_xmlReserved"><p>
The prefix <b>xml</b> is by definition bound to the
namespace name
<code>http://www.w3.org/XML/1998/namespace</code>. It
<em title="MAY in RFC 2119 context">MAY</em>,
but need not, be
declared, and <em title="MUST NOT in RFC
2119 context">MUST NOT</em>
be
bound to any other namespace name. Other prefixes
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be bound to this namespace
name,
and it
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be declared as the default namespace.
</p><p>
The prefix <b>xmlns</b> is used only to declare namespace
bindings and is by
definition bound to the namespace name
<code>http://www.w3.org/2000/xmlns/</code>. It
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be declared
.
Other prefixes
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be bound to this namespace name,
and it
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be declared as the default namespace.
Element names
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
have the prefix <code>xmlns</code>.
</p><p>
All other prefixes beginning with the three-letter sequence
x, m, l,
in any case combination, are reserved. This means that:
</p>
<ul>
<li><p>users <em title="SHOULD NOT in RFC
2119 context">SHOULD NOT</em> use them except as
defined by later specifications</p>
</li>
<li><p>processors
<em title="MUST NOT in RFC 2119 context">MUST
NOT</em>
treat them as fatal errors.</p>
</li>
</ul>
</a></div>
</blockquote>
<span><br>
JDOM is a processor, and it's treating this as a fatal error.<br>
<br>
How should this be fixed? Suggestions?<br>
<br>
As far as I can tell the only place needed to change the code is
in the Verifier, but, should it simply allow the prefixes, or
should it be a 'configurable' setting?<br>
<br>
Rolf<br>
<br>
<br>
<br>
</span>
</div></div></div>
_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com" target="_blank">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a></blockquote>
</div><br></div><br>_______________________________________________<br>
To control your jdom-interest membership:<br>
<a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com" target="_blank">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a><br></blockquote></div><br></div>