Subject: Re: [xsl] Transform object and pass in an InputStream of the said imported XSLT file as a parameter? From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Mon, 27 Nov 2006 09:36:09 +0000 |
2) The example is a success but I'm trying to change it such that I do not need to read from a local file and can instead read all imported style sheets and input files from an InputStream or an in-memory string object.
4) Where an XSLT file has a statement like <xsl:import href="FixedLengthRoutines.xsl" />, am I able to programmatically instantiate a Transform object and pass in an InputStream of the said imported XSLT file as a parameter? If I can, I would be able to avoid writing the entire imported XSLT objects to the file system prior to invoking the Transform method as I want to call my fixed width to XML class remotely.
Write a class that implements URIResolver that intercepts the import call and returns the in memory stylesheet as a Source.
Searching for "CustomURIResolver" should plenty of examples. The only catch is (if I remember correctly) to intercept imports/includes you need set the resolver on the TransformerFactory, the resolver set on the Transformer only is only used for document() calls.
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Transform object and pass in , Murali P | Thread | [xsl] transform from flat to hierar, Ken Tam |
[xsl] Manage XHTML-Output with XSL-, Michael Ruck @ GMX | Date | RE: [xsl] I'm trying to convert fix, Michael Kay |
Month |