Morten Andersen wrote:
> Well, the task is pretty simple, but I can't get anything working.
>
> I want to parse in an xhtml document containing mathml with all the
> entitities defined like alpha and beta. This should then be transformed
> using xslt into another xml-document.
> The test-xhtml document is shown below:
...
> This results in this error:
> / "
org.jdom.IllegalTargetException: The target "IS10744:arch" is not
> legal for JDOM/XML Processing Instructions: Processing instruction
> targets cannot contain colons."
As explained in
org.jdom.Verifier.java, JDOM is compliant with section 6 of
the XML namespace specification
(http://www.w3.org/TR/REC-xml-names/#Conformance) which states:
"No entity names, PI targets, or notation names contain any colons"
> /Then I tryed to trick the SAXBuilder so that the DTD's are not used by
> setting the entityResolver to an entityResolver, that doesn't do anything.
> ---
> /SAXBuilder builder = new SAXBuilder();
> builder.setEntityResolver(new NoOpEntityResolver());
> /---
> This results in some output to System.err:
> / "[Fatal Error] :1:66: White spaces are required between
> publicId and systemId."
> /But the transformation seems to occur.
This is caused by 2 bugs in JDOMSource: 1. the way the DTD reference is build
is incorrect (indeed, a white space is missing); 2. No SAX ErrorHandler is set
to correctly process the error.
Except that DTD information is lost to the XSLT processor, the transformation
is performed.
Laurent
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected)