[xslt] How to make python bindings fetch entities?

Hi, my first post at this list.

I'm trying to get external entities from other files using the python
bindings for libxml2 and libxslt. The parser seems to recognize them,
but no xml is fetched. No errors are reported. So my question is how to
do this. My code is like this:

import libxml2, libxslt

xmlLoadExtDtdDefaultValue = 1
styledoc = libxml2.parseFile("xsl/index.xsl")
style = libxslt.parseStylesheetDoc(styledoc)
doc = libxml2.parseFile("index.xml")
result = style.applyStylesheet(doc, None)
stringval = style.saveResultToString(result)

print stringval

I could not make the pyxsltproc do it either, hope someone can help
Řyvind Hvamstad <oyvind@hvamstad.net>

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