E
Eshrath Khan
Hi all,
I have a .Net program which access transforms a XML using an XSL
stylesheet. The .net program calls Stylesheet main.xsl file.
The main.xls contains only <xsl:include> elements to include other XSL
files.
like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xslutput indent="yes" media-type="html"/>
</xsl:stylesheet>
Now I want to pass a parameter to the XSL from .Net. This parameter will
be used by the template present in two.xsl file. ie., it will be used
globally.
So I have added the Argumentlist (which is used to pass the parameter to
the XSL) in the .Net and the <xslaram> in the main.xsl file. Now the
main.xsl looks like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslaram name="esh" />
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xslutput indent="yes" media-type="html"/>
</xsl:stylesheet>
Now when i try to access this global variable from two.xsl it is
throwing error and it is not able to access the globa variable.
So is there a way to access the global parameter from the included
stylesheets. This is very urgent. Please reply back to me and also post
it in the forum.
Thanks and Regards,
-Eshrath.
I have a .Net program which access transforms a XML using an XSL
stylesheet. The .net program calls Stylesheet main.xsl file.
The main.xls contains only <xsl:include> elements to include other XSL
files.
like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xslutput indent="yes" media-type="html"/>
</xsl:stylesheet>
Now I want to pass a parameter to the XSL from .Net. This parameter will
be used by the template present in two.xsl file. ie., it will be used
globally.
So I have added the Argumentlist (which is used to pass the parameter to
the XSL) in the .Net and the <xslaram> in the main.xsl file. Now the
main.xsl looks like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslaram name="esh" />
<xsl:include href="../one.xsl"/>
<xsl:include href="../two.xsl"/>
<xsl:include href="../three.xsl"/>
<xsl:include href="../four.xsl"/>
<xsl:include href="../five.xsl"/>
<xslutput indent="yes" media-type="html"/>
</xsl:stylesheet>
Now when i try to access this global variable from two.xsl it is
throwing error and it is not able to access the globa variable.
So is there a way to access the global parameter from the included
stylesheets. This is very urgent. Please reply back to me and also post
it in the forum.
Thanks and Regards,
-Eshrath.