<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
An issue has been opened against JDOM:
<a class="moz-txt-link-freetext" href="https://github.com/hunterhacker/jdom/issues/126">https://github.com/hunterhacker/jdom/issues/126</a><br>
<br>
The basic issue is the following: The input XML document contains:<br>
<br>
<span class="nt"><XMLFault:XMLFault></span>...<span
class="nt"></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 class="constraint">
<p class="prefix"><a id="xmlReserved" name="xmlReserved"><b>Namespace
constraint: Reserved Prefixes and Namespace Names</b></a></p>
<a id="xmlReserved" name="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 class="RFC2119" title="MAY in RFC 2119 context">MAY</em>,
but need not, be
declared, and <em class="RFC2119" title="MUST NOT in RFC
2119 context">MUST NOT</em>
be
bound to any other namespace name. Other prefixes
<em class="RFC2119" title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be bound to this namespace
name,
and it
<em class="RFC2119" 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 class="RFC2119" title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be declared
.
Other prefixes
<em class="RFC2119" title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be bound to this namespace name,
and it
<em class="RFC2119" title="MUST NOT in RFC 2119 context">MUST
NOT</em>
be declared as the default namespace.
Element names
<em class="RFC2119" 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 class="RFC2119" title="SHOULD NOT in RFC
2119 context">SHOULD NOT</em> use them except as
defined by later specifications</p>
</li>
<li>
<p>processors
<em class="RFC2119" title="MUST NOT in RFC 2119 context">MUST
NOT</em>
treat them as fatal errors.</p>
</li>
</ul>
</a></div>
</blockquote>
<span class="nt"><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>
</body>
</html>