Jonathan Looney writes:
>Actually, come to think of it, this (while untested) will probably work and
>be much simpler:
>
>param $interface = "undef";
>
>for-each ($result/physical-interface[$interface == "undef" || name ==
>$interface]) {
Yup. The ternary operator ("?:") turns into an <xsl:choose>, so it's
not suitable for all expression locations. SLAX is actually hiding quite
a fair bit of XSLT plumbing behind "?:".
% slaxproc --slax-to-xslt --partial --name -
var $x = favorite-color ? "blue" : "green";
^D
<xsl:variable name="slax-ternary-1">
<xsl:choose>
<xsl:when test="favorite-color">
<xsl:copy-of select=""blue""/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select=""green""/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable xmlns:slax="http://xml.libslax.org/slax" name="x"
select="slax:value($slax-ternary-1)"/>
Thanks,
Phil
_______________________________________________
juniper-nsp mailing list [email protected]
https://puck.nether.net/mailman/listinfo/juniper-nsp