|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: question about xsl:if
Subject: Re: question about xsl:if
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Fri, 30 Aug 2002 09:04:11 +0000
|
u cant use predicate with '.'
besides..if u explain what the statement
<xsl:if test=".[.!text()='TONY']"> intends to mean, it wud be gr8
also. please go through a standard XSLT book ( XSLT Programmer's reference
or any XSLT book)
before you start coding..
vasu
From: Alia Mikati <Aliam@xxxxxxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: question about xsl:if
Date: Thu, 29 Aug 2002 10:29:47 +0300
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
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|