[jdom-interest] Errors in DTD reading

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jul 26 07:12:44 PDT 2000


At 1:45 PM +0100 7/26/00, John Pearcey wrote:
>I am using the SAXBuilder and obtain the following error during parsing:
>
>Error on line 315 of document
>http://localhost/webfiles/Dtds/xhtml1-strict.dtd: The attribute declaration
>for "xml:space" must be given as an enumerated type whose only possible
>values are "default" and "preserve".
>
>The DTD in question has been used before with other parsers with no
>problems. Line 315 is as follows:
>xml:space   (preserve)     #FIXED 'preserve'
>
>which looks fine to me.
>
>This is the first time I have used the apache parser.
>

This is not JDOM's problem. This is a known bug in Xerces because 
it's faithfully implementing a known bug in the XML 1.0 
specification. Change to

xml:space   (preserve | default)     #FIXED 'preserve'

and it should work.

Eventually both Xerces and the XML 1.0 spec will be corrected.

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list