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

RE: <xsl:include> using relative paths and Saxon 8

Subject: RE: <xsl:include> using relative paths and Saxon 8
From: "Chris Ward" <cward@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Jan 2006 16:48:52 -0000
chris ward
> It's likely you'll need to call setSystemId() on the
> StreamSource, or on the TransformerHandler (if you are using
> either of them).

	Err... okay - will look into this.

> If not, post the part of your code that loads the stylesheet.

	Here's an outline of what I'm doing

	- - - - - - - - - - - - - - - - - - - - - - - - - - -

            URL url = new URL(xsltUrl);
            URLConnection urlConn = url.openConnection();

		InputStream is = urlConn.getInputStream();
		Source xslSource = new StreamSource(is);

		TransformerFactory transFact =
TransformerFactory.newInstance();
		Templates templates = transFact.newTemplates(xslSource);

		Transformer transformer = templates.newTransformer();


		<snip>

            DocumentSource source = new DocumentSource(getDocument());
            DocumentResult result = new DocumentResult();
            try {
                transformer.transform(source, result);
                if (DEBUG) {
                    System.out.println("transformer.transform()
succeeded");
                }
            }
            catch (TransformerException ex) {
                // transformation failed somehow - should log this
                if (DEBUG) {
                    System.out.println("transformer.transform()
failed");
                }
            }
            // should I have a finally block?
            this.transformedDocument = result.getDocument();

	- - - - - - - - - - - - - - - - - - - - - - - - - - -

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.