[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
I want to assign a node-set returned by key() to a variable.
This works fine : <xsl:variable name="foo" select=3D"key('XXX', YYY)"/>
But now I have a condition and I have to use <xsl:choose>. And in such case I am not able to set the variable.
The pseudo for what I want is something like this:
<xsl:variable name="foo">
<xsl:choose>
<xsl:when test="SOME-TEST">
SELECT node-set returned by key('XXX', YYY)
</xsl:when>
<xsl:otherwise>
SELECT node-set ancestor::*[1]
<xsl:otherwise>
</xsl:choose>
</xsl:variable>
Any suggesstions? Thanks.
Sameer.
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
xsl:variable and key
Subject: xsl:variable and key From: "Sameer N" <samooo_vc@xxxxxxxxxxx> Date: Thu, 10 Jun 2004 19:34:41 -0700 |
I want to assign a node-set returned by key() to a variable.
This works fine : <xsl:variable name="foo" select=3D"key('XXX', YYY)"/>
But now I have a condition and I have to use <xsl:choose>. And in such case I am not able to set the variable.
The pseudo for what I want is something like this:
<xsl:variable name="foo">
<xsl:choose>
<xsl:when test="SOME-TEST">
SELECT node-set returned by key('XXX', YYY)
</xsl:when>
<xsl:otherwise>
SELECT node-set ancestor::*[1]
<xsl:otherwise>
</xsl:choose>
</xsl:variable>
Any suggesstions? Thanks.
Sameer.
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Building a hierarchy base, M. David Peterson | Thread | RE: [xsl] xsl:variable and key, M. David Peterson |
Building a hierarchy based on sibli, Ryan Graham | Date | RE: [xsl] xsl:variable and key, M. David Peterson |
Month |