3 ms·
I flagged this article. It needs a [2003] tag to indicate that's it's completely outdated and obsolete.
by lbenes 10y ago
I flagged this article. It needs a [2003] tag to indicate that's it's completely outdated and obsolete.
- r00fus 10y agoUnfortunately, it's still valid for the most part. You can't reassign variables, but instead are forced to if-blocks within variable assignments to e.g. assign c node if it exists, otherwise b. <xsl:variable name="BorC"> <xsl:choose> <xsl:when test="/a/b/c"> <xsl:value-of select="/a/b/c"> </xsl:when> <xsl:otherwise> <xsl:value-of select="/a/b"> </xsl:otherwise> </xsl:choose> </xsl:variable>
- trmsw 10y agoXPath 2 supports conditionals so you could put all that in a single select expression.