Subject: Re: [xsl] comparing attributes if missing at times From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 26 Mar 2014 13:04:15 +0000 |
<x> <elem x="1"/> <elem x="1"/> <elem x="2"/> <elem/> <elem x="3"/> </x>
<xsl:template match="elem"> <elem
test1="{@x != preceding-sibling::elem[1]/@x}" test2="{not(@x = preceding-sibling::elem[1]/@x)}" test3="{string(@x) != preceding-sibling::elem[1]/string(@x)}" test4="{not(string(@x) = preceding-sibling::elem[1]/string(@x))}" > <xsl:copy-of select="@*"/> </elem> </xsl:template> </xsl:stylesheet>
<elem test1="false" test2="true" test3="false" test4="true" x="1"/> <elem test1="false" test2="false" test3="false" test4="false" x="1"/> <elem test1="true" test2="true" test3="true" test4="true" x="2"/> <elem test1="false" test2="true" test3="true" test4="true"/> <elem test1="false" test2="true" test3="true" test4="true" x="3"/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] comparing attributes if missi, Szabo, Patrick (LNG- | Thread | Re: [xsl] comparing attributes if m, Michael Kay |
[xsl] comparing attributes if missi, Szabo, Patrick (LNG- | Date | Re: [xsl] comparing attributes if m, Michael Kay |
Month |