xsl-list
[Top] [All Lists]

RE: [xsl] xsl if statement

2006-08-16 06:22:33
<xsl:template match="child">
<xsl:if test="'[child=&#x21C4]'">
try:
<xsl:if test=".=&#x21C4;">

first remove apostroph.
second you already matched child element. use only dot. 

You caught two of his errors but missed the third. It should be

<xsl:if test=".='&#x21C4;'">

Personally, I would write

<xsl:template match="child[.='&#x21C4']">
<span style="color:red">
  <xsl:apply-templates/>
</span>
</xsl:template>

<xsl:template match="child"/>

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>