  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | Re: [jdom-interest] newbie question: parsing in xhtml
containing mathml | Re: [jdom-interest] newbie question: parsing in xhtml
containing mathml 2004-07-07 - By Morten Andersen
Back 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 , 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 >>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) .com
Morten Andersen Master of applied mathematics and computer science Associate professor
The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 65 50 36 54 +45 61 71 11 03 Jabber id: hat@(protected)
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ To control your jdom-interest membership: http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected) .com
|
|
 |