All of the interesting technological, artistic or just plain fun subjects I'd investigate if I had an infinite number of lifetimes. In other words, a dumping ground...

Thursday 19 June 2008

Two ways to do XSLT processing on Linux

use xsltproc system command
use Python:
  from Ft.Xml import InputSource
from Ft.Xml.Xslt.Processor import Processor

document = InputSource.DefaultFactory.fromUri(xmlfile)
stylesheet = InputSource.DefaultFactory.fromUri(xsltfile)
# there's also a fromString() method

processor = Processor()
processor.appendStylesheet(stylesheet)
result = processor.run(document)

No comments:

tim's shared items

Add to Google Reader or Homepage