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

Re: Issue with document('') under Xalan-Java

Subject: Re: Issue with document('') under Xalan-Java
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 19 Jan 2010 08:37:26 +0000
Re:  Issue with document('') under Xalan-Java
2010/1/19 Nicholas W <4407@xxxxxxxx>:
> Dear All,
>
> I am trying to use a lookup embeded in the xslt source according to
> the tips on this page:
>
> http://www.ibm.com/developerworks/xml/library/x-xsltip.html
>
>
> I am creating an XSL transformer like this:
>
> TransformerFactory transformerFactory = TransformerFactory
>                .newInstance();
> transformerFactory.setAttribute("indent-number", new Integer(2));
> Transformer trans = transformerFactory.newTransformer(sheetSource);
>
> And in my document I have something like this:
>
>
> <xsl:variable name="langs-top" select="document('')/*/l:languagecodes"/>
>
>
> However I cannot seem to get this to work, it seems that the langs-top
> variable is always empty. Even if I do something like this:
>
> <xsl:variable name="langs-top" select="document('')"/>
>
> it seems to be empty. Is it possible to use document('') in Xalan-Java
>
> Or is there something I am not doing correctly?

You need to call setSystemId on the Stream, so call:

sheetSource.setSystemId("/path/to/stylesheet.xsl");

after you create sheetSource.


--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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.