[jdom-interest] newbie question: parsing in xhtml
mortena at mip.sdu.dk
Tue Jul 6 22:17:00 PDT 2004
At 14:41 06-07-2004, Laurent Bihanic wrote:
>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"
So this means that there is an error in the mathml - or xhtml DTD?
>>/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
>>/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.
>To control your jdom-interest membership:
Master of applied mathematics and computer science
The Maersk Institute of Production technology at Southern Danish University
DK-5230 Odense M
+45 65 50 36 54
+45 61 71 11 03
Jabber id: hat at jabber.dk
More information about the jdom-interest