[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using Variables to determine which node to use (ASP and
Greg, It's kinda hard to tell what your question is ;) I think it's to do with: > I need to then pass that information to the .xsl and use that to > determin which node to display ( home, info, contact....). What you're after are stylesheet parameters. You declare them at the top level of your stylesheet (with a default value if you want): <xsl:param name="item" select="'home'" /> and pass them into the stylesheet in a processor specific way. For MSXML, you use .addParameter: XSLTProcessor.addParameter('item', 'info'); [see the MSXML SDK documentation] You can then use them within your stylesheet as you would any variable. For example: <xsl:choose> <xsl:when test="$item = 'contact'"> <!-- display stuff about contacts --> </xsl:when> <xsl:when test="$item = 'info'"> <!-- display stuff about info --> </xsl:when> <xsl:otherwise> <!-- display stuff about home --> </xsl:otherwise> </xsl:choose> I hope that helps point you in the right direction, but do barrage us with more specific questions if not. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|