[XML-SIG] Re: [Support] Problem with Sgmlop.py

Uche Ogbuji uche.ogbuji at fourthought.com
Wed May 28 21:33:04 EDT 2003


On Wed, 2003-05-28 at 13:36, Alastair Burt wrote:
> In order to print HTML code using the PyXML pretty printer, the comments in
> the DOM tree must be Unicode. I therefore needed the following patch to my
> version of the Sgmlop.py:
> 
> *** Sgmlop.py	2003/05/28 19:30:36	1.2
> --- Sgmlop.py	2003/05/28 19:08:18	1.1
> ***************
> *** 230,237 ****
>           return
> 
>       def handle_comment(self, data):
> !         unidata = unicode(data, self._charset)
> !         comment = self._ownerDoc.createComment(unidata)
>           self._stack[-1].appendChild(comment)
>           return
> 
> --- 230,236 ----
>           return
> 
>       def handle_comment(self, data):
> !         comment = self._ownerDoc.createComment(data)
>           self._stack[-1].appendChild(comment)
>           return

Thanks, but this is a matter for the XML SIG, which I've copied
accordingly.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html
Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.html
The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x-think18.html
Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620




More information about the XML-SIG mailing list