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

Re: XSLT - update attribute with new value

Subject: Re: XSLT - update attribute with new value
From: Ann Marie Rubin <Annmarie.Rubin@xxxxxxx>
Date: Thu, 11 Nov 2004 14:02:07 -0500
xsl update param value
Hi David,

so I see how to use dynamically assign values to attribues but now my
problem is with a test that the value of the attribute $node (defined as
GARDEN) matches the name of the parent node for the current attribute. 
I don't think my test is constructed right. 

<xsl:param name="attr">ROSE</xsl:param>
<xsl:param name="value">RED</xsl:param>
<xsl:param name="node">GARDEN</xsl:param>
...
    <xsl:template match="@*" priority="10">
    <xsl:variable name="test" select="$node"/>
       <xsl:attribute name="{$attr}">
            <xsl:choose>
                <xsl:when test="$test=parent[name()]"><xsl:value-of
select="$value"/></xsl:when>
                <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
            </xsl:choose>
        </xsl:attribute>
 ...    

thanks for any light anyone can shed...

Ann Marie

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.