Accessing an Global Parameter from inside a included stylesheet.

Discussion in 'XML' started by Eshrath Khan, Dec 23, 2004.

  1. Eshrath Khan

    Eshrath Khan Guest

    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"/>
    <xsl:eek:utput 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 <xsl:param> 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">
    <xsl:param 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"/>
    <xsl:eek:utput 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.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Eshrath Khan, Dec 23, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    561
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  2. Steven An
    Replies:
    1
    Views:
    490
    Martin Honnen
    Nov 23, 2004
  3. David Blickstein
    Replies:
    3
    Views:
    1,024
    David Blickstein
    Aug 2, 2005
  4. David Blickstein
    Replies:
    14
    Views:
    6,304
    Harrie
    Oct 16, 2005
  5. Stuart Redmann
    Replies:
    5
    Views:
    465
    Stuart Redmann
    Dec 14, 2007
Loading...

Share This Page