[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Transform object and pass in an InputStream of the

Subject: Re: 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
Re:  Transform object and pass in an InputStream of the
On 11/27/06, Murali P <p.muralii@xxxxxxxxx> wrote:
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.

That's fine.


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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.