[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Params being intialised with variables based on attrib

Subject: Params being intialised with variables based on attributes
From: "gary cor" <stuff4gary@xxxxxxxxxxx>
Date: Wed, 26 Jun 2002 14:16:19 +0000
xsl value of select attrib
Hi,

I have many when test's to reference global variables in my code
and I can't seem to find a way of optimising the code so I am
wondering if someone can help.

For instance have some parameters in templates that are initialised with big statements like follows-


<xsl:template match=mediaobject ... <xsl:param name="column-number"> <xsl:choose> <xsl:when test="@grouping='avgroup'"> <!-- This is a global variable --> <xsl:value-of select="$avgroup-column-number"/> </xsl:when> <xsl:when test="@grouping='gallery'"> <xsl:value-of select="$gallery-column-number"/> </xsl:when> <xsl:when test="@grouping='free'"> <xsl:value-of select="$free-column-number"/> </xsl:when> <xsl:when test="@grouping='inline'"> <xsl:value-of select="$inline-column-number"/> </xsl:when> <xsl:when test="@grouping='list'"> <xsl:value-of select="$list-column-number"/> </xsl:when> <xsl:when test="@grouping='person'"> <xsl:value-of select="$person-column-number"/> </xsl:when> <xsl:when test="@grouping='wallpaper'"> <xsl:value-of select="$wallpaper-column-number"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$mediaobject-column-number"/> </xsl:otherwise> </xsl:choose> </xsl:param>

I suppose I sort of want to do something like...

<xsl:value-of select="${@grouping}-column-number"/>

but I know this isn't legal XSLT

Any ideas?

Cheers G.


_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.