[XML-SIG] 4Suite XSLT usage

Mike Brown mike at skew.org
Wed Jan 14 00:50:54 EST 2004

Derek Fountain wrote:
> On Wednesday 14 January 2004 10:24, Derek Fountain wrote:
> > I have an XML file with an associated XSLT file. 2nd line of the XML is:
> >
> > <?xml-stylesheet type="text/xsl" href="publish_image.xsl"?>
> >
> > When using libxml2's xsltproc the XSLT stylesheet is correctly picked up
> > and used when the tool is given just the XML filename. Does 4xslt have this
> > functionality? The help suggests it does because it has a flag to "Ignore
> > <?xml-stylesheet ...?> instructions", but when I leave the stylesheet name
> > out of the command line I get a "No stylesheets to process." error.
> >
> > Did I do something wrong, or does the 4suite tool not do this?
> Oh look - it's a FAQ. Ahem... Sorry, don't mind me... :o}

Yep. Also, we don't encourage it, but you can add text/xsl to the recognized
types. You can do this only if you're invoking the processor from Python rather
than using the 4xslt command-line tool. To do it, do

# import the Processor module
from Ft.Xml.Xslt import Processor

# modify the module-level constant XSLT_IMT before
# instantiating the Processor class
proc = Processor.Processor()

# proceed as normal with the processor instance
# ...

And as you already discovered, you should direct your 4Suite questions to the
general 4suite mailing list.


More information about the XML-SIG mailing list