[4suite] How implement xml to html through xslt?

Andrea Turli andrea.turli at eng.it
Thu Sep 10 01:15:18 MDT 2009


Hi all, I'm trying to transform an xml file to html though xsl:

from Ft.Xml.Xslt import Transform
from Ft.Xml.Xslt import Processor
from Ft.Xml.InputSource import DefaultFactory

document = DefaultFactory.fromUri(xmlfile)
stylesheet = DefaultFactory.fromUri(xsltfile)
processor = Processor.Processor()
processor.appendStylesheet(stylesheet)
result = processor.run(document)
doc = NonvalidatingReader.parseString(result)

 but I get this exception:

....
doc = NonvalidatingReader.parseString(result)
File "/usr/lib/python2.5/site-packages/Ft/Xml/Domlette.py", line 167,
in parseString return self.parse(isrc) File
"/usr/lib/python2.5/site-packages/Ft/Xml/Domlette.py", line 151, in
parse return self.parseMethod(inputSource, *self.args, **self.kwargs)
Ft.Xml.ReaderException: In
urn:uuid:e8605c45-7e42-4de4-9d34-138533f9c158, line 8, column 4:
mismatched tag
....

I think it can depend on some html tag without content like img and
other. Is it possible? How can I solve this issue?
Thank you for the support


More information about the 4suite mailing list