F
FaensenD
Can someone explain why of the following two alternative ways to select
as specific node the first one doesn't work while the second one does?
Variant I:
<recordToken>
<xsl:value-of select="/Root/Case[Id=./Id]/RecordToken" />
</recordToken>
Variant II:
<xsl:variable name="Id">
<xsl:value-of select="./Id" />
</xsl:variable>
<recordToken>
<xsl:value-of select="/Root/Case[Id=$Id]/RecordToken" />
</recordToken>
In Variant I we always get the value of RecordToken of the first Case
node in the XML document. In Variant II we get the RecordToken of the
Case that has the same Id as the current node.
Thank you
Daniel
as specific node the first one doesn't work while the second one does?
Variant I:
<recordToken>
<xsl:value-of select="/Root/Case[Id=./Id]/RecordToken" />
</recordToken>
Variant II:
<xsl:variable name="Id">
<xsl:value-of select="./Id" />
</xsl:variable>
<recordToken>
<xsl:value-of select="/Root/Case[Id=$Id]/RecordToken" />
</recordToken>
In Variant I we always get the value of RecordToken of the first Case
node in the XML document. In Variant II we get the RecordToken of the
Case that has the same Id as the current node.
Thank you
Daniel