[XML-SIG] error with xhtml strict dtd

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon, 19 Mar 2001 23:34:05 +0100


> What should be done with this situation below?  

In general, you might submit a bug report to
sourceforge.net/projects/python.

> And do you have a mailing list?

Sure, xml-sig@python.org.

> Trying to use pyxml with xhtml (using current cvs version).
> xmlproc_val
> 
> E:http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd:316:3: xml:space
> must have exactly the values 'default' and 'preserve'

Please have a look at the thread starting at

http://mail.python.org/pipermail/xml-sig/2000-October/003520.html

It appeared to me (and to the author of xmlproc) that XML 1.0 says
that the XHTML DTD is invalid
(http://mail.python.org/pipermail/xml-sig/2000-October/003523.html)

There is an erratum for XML 1.0 that says that this was a mistake in
XML 1.0, which was corrected with
http://www.w3.org/XML/xml-19980210-errata#E81

Lars Marius Garshol (the xmlproc author) indicated in

http://mail.python.org/pipermail/xml-sig/2000-October/003527.html

that he has a fix for this problem; so far, he has not managed to
contribute this fix into PyXML.

You propose the patch

Index: xml/parsers/xmlproc/xmldtd.py
===================================================================
RCS file: /cvsroot/pyxml/xml/xml/parsers/xmlproc/xmldtd.py,v
retrieving revision 1.11
diff -r1.11 xmldtd.py
408c408
<             if len(self.type)!=2:
---
>             if (len(self.type)!=2) and (len(self.type)!=1):
409a410,411
> 	    elif len(self.type)==1:
> 		error=0

As a procedural note, please always submit unified (-u) or context
(-c) diffs; they are easier to read and also continue to work if the
file is slightly modified.

This particular patch seems incorrect: If there is a single value to
xml:space, it *still* must be either "default" or "preserve"; your
patch does not perform this patch. In any case, I still hope that Lars
will contribute his changes later this year.

Regards,
Martin