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&quot;
version="1.0">
<xsl:output
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd&quot;
/>
</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/