[jdom-interest] Reading DTD error

John johnf at goldsoft.com.au
Wed Feb 20 15:44:57 PST 2002


Hi all

I have downloaded a DTD from the w3c web-site for MathML and XHTML:

http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd

When I attemt to parse a document using this DTD, I get an exception from org.jdom.input.SAXBuilder.build().

"Error in building: The markup declarations contained or pointed to by the document type declaration must be well-formed."

Any ideas? I assume this should be a valid DTD.
John

The stack trace gives:

org.jdom.JDOMException: Error in building: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)
Caused by: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        ... 6 more
Root cause: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)
Root cause: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)If I try to get a stack trace as well, the message is garbaged, thus:

If I try to print the exception message, and a stack trace, I get the following garbage:

Eorrrgo.rj dionm .bJuDiOlMdEixncge:p tTihoen :m aErrkruopr  dienc lbaurialtdiionngs:  cTohnet amianrekdu po rd epcolianrtaetdi otnos  bcyo ntthaei ndeodc uomre npto itnytpeed  dteoc lbayr atthieo nd omcuusmte nbte  twyeplel -dfeocrlmaerda.t
ion must be well-formed.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)
Caused by: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        ... 6 more
Root cause: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)
Root cause: org.xml.sax.SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:979)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:650)
        at au.com.goldsoft.MathXHTML.MathXHTMLToJDOM.convert(MathXHTMLToJDOM.java:31)
        at au.com.goldsoft.MathXHTML.EditorPane.processText(EditorPane.java:102)
        at au.com.goldsoft.MathXHTML.EditorPane.processURL(EditorPane.java:124)
        at au.com.goldsoft.MathXHTML.EditorPane.<init>(EditorPane.java:92)
        at au.com.goldsoft.MathXHTML.EditorPane.main(EditorPane.java:145)

------------------------------------------------------------

Dr John Foster 
GOLD SOFTWARE International Pty Ltd 
P O Box 5033 
Laburnum
Victoria 3130 
Australia 

Phone:  04 1173 7288
Fax:    03 9878 7844 
e-mail: johnf at goldsoft.com.au 
WWW:    http://www.goldsoft.com.au

------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020221/633ffbca/attachment.htm


More information about the jdom-interest mailing list