[XML-SIG] Problem parsing the xhtml dtd
Alexandre Fayolle
alf@logilab.com
Fri, 6 Oct 2000 23:17:39 +0200 (CEST)
Hi,
I'm trying to parse the XHTML dtd () with xmlproc (as of PyXml
0.5.5.1). The python code I use is the following:
from xml.parsers.xmlproc.dtdparser import DTDParser
from xml.parsers.xmlproc.xmldtd import CompleteDTD
parser = DTDParser()
dtd = CompleteDTD(parser)
parser.set_dtd_consumer(dtd)
parser.set_dtd_object(dtd)
parser.parse_resource('xhtml1-strict.dtd')
parser.deref()
I get the following message:
ERROR: xml:space must have exactly the values 'default' and 'preserve' at
xhtml1-strict.dtd:315:47
TEXT: '>
The problem occurs on the following block :
<!ATTLIST style
%i18n;
type %ContentType; #REQUIRED
media %MediaDesc; #IMPLIED
title %Text; #IMPLIED
xml:space (preserve) #FIXED "preserve" >
The correction involved modifying the last line of the block:
xml:space (default|preserve) #FIXED "preserve" >
Is this a bug in xmlproc or in the W3C DTD ?
--
Alexandre Fayolle
http://www.logilab.com - "Mais oł est donc Ornicar ?" -
LOGILAB, Paris (France).