xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Dan Pollitt <dan.s.pollitt AT gmail.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Namespace validation bug
- Date: Mon, 21 May 2012 07:56:08 +0100
Hi,
I understand this to be a valid namespace URI:
"urn://schemas-microsoft-com:office:office"
However parsing an XML document containing this fragment:
...
<comment>
<div:div xmlns:div="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml">
<div xmlns:o="urn://schemas-microsoft-com:office:office"
xmlns:st1="urn://schemas-microsoft-com:office:smarttags"
xmlns:v="urn://schemas-microsoft-com:vml"
xmlns:w="urn://schemas-microsoft-com:office:word">Stated criteria is
too ambiguous. We need clear direction on how to validate.</div>
</div:div>
</comment>
...
yields the following error:
Caused by: nu.xom.MalformedURIException: Bad port: office:office
at nu.xom.Verifier.checkPort(Verifier.java:610)
at nu.xom.Verifier.checkAuthority(Verifier.java:453)
at nu.xom.Verifier.checkAbsoluteURIReference(Verifier.java:906)
at nu.xom.Element.addNamespaceDeclaration(Element.java:1164)
at
nu.xom.NonVerifyingHandler.startElement(NonVerifyingHandler.java:103)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at nu.xom.Builder.build(Builder.java:1127)
... 11 more
I am using XOM 1.1 however looking at the source for 1.2.8 I think
this bug is still present?
Thanks,
Dan
-
[XOM-interest] Namespace validation bug,
Dan Pollitt, 05/21/2012
-
Re: [XOM-interest] Namespace validation bug,
Elliotte Rusty Harold, 05/21/2012
- Re: [XOM-interest] Namespace validation bug, Michael Kay, 05/22/2012
-
Re: [XOM-interest] Namespace validation bug,
Elliotte Rusty Harold, 05/21/2012
Archive powered by MHonArc 2.6.24.