XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ali EbrahimSubject: System Variable
Author: Ali Ebrahim
Date: 21 Jan 2007 02:44 AM
Hello,


I would like to know if it is possible to obatin a system declared variable in XSLT? If so how?


Regards,
Ali

Postnext
Tony LavinioSubject: System Variable
Author: Tony Lavinio
Date: 21 Jan 2007 05:55 PM
It depends on your XSLT processor since some have extensions to do
this. But usually it is done by passing in the value as a parameter
to the transform.

Postnext
Ali EbrahimSubject: System Variable
Author: Ali Ebrahim
Date: 21 Jan 2007 06:00 PM
Thanx Tony,

We using XalanJ and our CRM Product Siebel only supports xsl v1.0.

Are you able to provide me with an example?


Thanx Ali

Postnext
Michael KweeSubject: System Variable
Author: Michael Kwee
Date: 21 Jan 2007 09:55 PM
Originally Posted: 21 Jan 2007 09:53 PM
Just to add on Ali's requirement....we want to pass a system variable to a xslt so that we can include it in the path of the <xsl:include href=..> tag.

Example :
<xsl:include href="d:/oexml/test_lov/SBLGetKNVInbound.xsl"/>

This is to tell xslt XALAN processor the exact location to look for the xslt file to be included in the parent xslt file. We can't use hardcoded or relative path here because we keep the xslt file to be included in a different location from the working directory of this process. The location of these xslt files will vary in different environments as well.

Thanks,
Michael

Posttop
Tony LavinioSubject: System Variable
Author: Tony Lavinio
Date: 22 Jan 2007 11:17 AM
You can find how to pass parameters from Java into XSLT by looking
at the JAXP documentation. Search for JAXP on Google.

As for passing in the parameter for an xsl:include href, that won't
work. The stylesheet is compiled before parameters are evaluated.
To change the location at runtime, you should look into OASIS catalogs.
See http://www.stylusstudio.com/super_catalogs.html for more info.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.