But since you need to apply different xpaths we can do something
similar...might be some scoping problems here (might have to move it
so the <xsl:variable wraps around) but something like this should work
(although I'm suspicious of the text(), it would seem to me you need
. or something similar).
<xsl:choose>
<xsl:when
test="document(Second.xml)/SubConcepts/SubConcept[1]/Value[$clsName=text()]">
<xsl:variable name="nodeToProcess"
select="document(Second.xml)/SubConcepts/SubConcept[1]/Value[$clsName=text()]"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="Values"
select="document(Second.xml)/SubConcepts/SubConcept/Value/@name[.=$clsName]"/>
<xsl:variable name="nodeToProcess" select="$Values[1]">
</xsl:otherwise>
</xsl:when>
<<<
You probably want:
<xsl:variable name="nodeToProcess">
<xsl:choose>
...
</xsl:choose>
</xsl:variable>
The choose should be inside the variable definition; else the variable goes
out of scope when the choose finishes.
Regards,
--A
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--