You can't make up the syntax as you go along!
<xsl:if test=".[.!text()='TONY']">
is absolute nonsense. I don't know what you expected it to mean, perhaps
<xsl:if test=". != 'TONY'">
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Alia Mikati
> Sent: 29 August 2002 08:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: question about xsl:if
>
>
> Hi all,
> I have the foolowing xml and xsl files:
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="testing.xsl"?>
> <html>
> <body>
> <table>
> <tr>
> <td>
> <font color="#800080">Balance
> 1:</font>
> </td>
> <td>
> <input type="text"
> name="balance1" size="20" value="200$"/>
> </td>
> </tr>
> </table>
> <table>
> <tr>
> <td>
> <font color="#800080">Balance
> 2:</font>
> </td>
> <td>
> <input type="text"
> name="balance2" size="20" value="500$"/>
> </td>
> </tr>
> <tr>
> <td>
> Tony
> </td>
> <td>
> 10000
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> and the xsl file is:
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:template match="/">
> <html>
> <body>
> <p align="center">
> <b><font size="5">Welcome to Book Store</font></b>
> </p>
> <xsl:apply-templates select="/html" />
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="/html">
> <xsl:apply-templates select="body/table/tr/td" />
> </xsl:template>
>
> <xsl:template match="body/table/tr/td">
> <xsl:if test=".[.!text()='TONY']">
> alia
> </xsl:if>
> <xsl:apply-templates select="input" />
> </xsl:template>
>
>
> <xsl:template match="input">
> <xsl:if test="@name='balance2'">
> <b> Balance value is : <xsl:value-of select="@value" />
> </b><br/>
> </xsl:if>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Can u plz tell me y am i getting this msg ???
> Expected token 'eof' found '['. .-->[<--.!text()='TONY']
>
> Thx a lot
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|