[XML-SIG] Re: error with xhtml strict dtd

Scott Harrison harris41@msu.edu
Mon, 19 Mar 2001 16:39:41 -0500


I would recommend this 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


Scott Harrison wrote:
> 
> What should be done with this situation below?  And do you have
> a mailing list?  I'd like to contribute or at least stay
> in touch as to what is going on.  Thanks -Scott
> 
> 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'
> E:http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd:326:3: xml:space
> must have exactly the values 'default' and 'preserve'
> E:http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd:457:3: xml:space
> must have exactly the values 'default' and 'preserve'
> 
> These are lines 316, 326 and 457 for xhtml1-strict.dtd:
>   xml:space (preserve) #FIXED 'preserve'
>   xml:space (preserve) #FIXED 'preserve'
>   xml:space (preserve) #FIXED 'preserve'
> 
> And of course the part of the xmldtd.py code
> that is responsible is shown here:
> 
>         if name=="xml:space":
>             if type(self.type)==types.StringType:
>                 parser.report_error(2015)
>                 return
> 
>             if len(self.type)!=2:
>                 error=1
>             else:
>                 if (self.type[0]=="default" and
> self.type[1]=="preserve") or \
>                    (self.type[1]=="default" and
> self.type[0]=="preserve"):
>                     error=0
>                 else:
>                     error=1
> 
>             if error:
> parser.report_error(2016)