Subject: Re: [xsl] undo a transformation From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 25 Apr 2007 13:08:18 +0100 |
in xslt2, if I understand you correctly something like <xsl:variable name="a" select="/"/> <xsl:variable name="b" as="item()*"> <xsl:apply-templates mode="a" select="$a"/> </xsl:variable> <xsl:variable name="c" as="item()*"> <xsl:apply-templates mode="b" select="$b"/> </xsl:variable> <xsl:sequence select="if(deep-equal($b,$c)) then $a else $c"/> In the above I have understood > If the second stylesheet doesn't match anything to mean that it returns its input unchanged (which means that it must havehad at least a default template matching everything) If you really don't match anything so the result of the second transformation is empty then change the last line to <xsl:sequence select="if(empty($c)) then $a else $c"/> David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] undo a transformation, Andrew Welch | Thread | Re: [xsl] undo a transformation, Garvin Riensche |
Re: [xsl] Invoking XSLT 2.0, Abel Braaksma | Date | RE: [xsl] suggestions for per reque, Michael Kay |
Month |