Re: [xml] Infinite loop when printing xsl doctype attribute twice from python



Sitsofe Wheeler said:
The following seems to print one ok line followed by a
line starting with a bit of garbage before chewing up
all the CPU on my machine for an undetermined amount
of time...

import libxml2
import libxslt

xmltxt = """<doc></doc>"""
xsltxt = """<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd";
/>
</xsl:stylesheet>
"""

xsldoc = libxml2.parseDoc(xsltxt)
xslt = libxslt.parseStylesheetDoc(xsldoc)

print xslt.doctypeSystem()
print xslt.doctypeSystem()

Also, doing xslt.freeStylesheet() before the print
statements results in a segfault rather than an exception...

=====
Sitsofe | http://sucs.org/~sits/

Yes, there was an error on both doctypeSystem and doctypePublic. 
Fixed in CVS:

bill billsuper python $ ./bug.py
http://www.w3.org/TR/html4/strict.dtd
http://www.w3.org/TR/html4/strict.dtd
bill billsuper python $

Thanks for the report

Bill





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]