Subject: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.
Subject: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.
Subject: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.