Nic Miloslav     Example 41    KEYWORDS      EXAMPLES      AUTHORS     

The not function returns true if its argument is false, and false otherwise.


     XML     HOME     XSL 1      
<xslTutorial >
<car id='a234' checked='yes' /> 
 <car id='a111' checked='yes' /> 
 <car id='a005' /> 
</xslTutorial>

     XSL 1     HOME     XML     HTML 1     OUTPUT 1     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:template match="car[not(@checked)]">
<P><B style="color:red"><xsl:value-of select="@id"/></B></P>
</xsl:template>
<xsl:template match="car[@checked]">
<P><B style="color:blue"><xsl:value-of select="@id"/></B></P>
</xsl:template>
</xsl:stylesheet>

     HTML 1     HOME     XML     XSL 1     OUTPUT 1     
<HTML>
<HEAD> </HEAD>
<BODY>
<P>
<B style="color:blue">a234</B></P>
<P>
<B style="color:blue">a111</B></P>
<P>
<B style="color:red">a005</B></P> </BODY> </HTML>

     OUTPUT 1     HOME     XML     XSL 1     HTML 1     

a234

a111

a005