3 ms·
This article is from 2003. Notably, since then XSLT 2.0, XPath 2.0, and XSLT 3.0 have been released. Whether unfortunate, or due to design, most/all of these
by r00fus 10y ago
This article is from 2003. Notably, since then XSLT 2.0, XPath 2.0, and XSLT 3.0 have been released.
Whether unfortunate, or due to design, most/all of these are still valid.
- lbenes 10y agoI 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.