You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Tarek M. Nabil" <Ta...@itworx.com> on 2002/11/19 14:04:05 UTC
If condition
I have the following <page-link> tag in my XML
<page-link enabled="false">
<text>Next</text>
<page-link-url>/promotion/promotionTypeDetails.jsp?PromTypeID=14&PromBN=2</page-link-url>
</page-link>
and the corresponding tag in the XSL
<xsl:template match="page-link">
<A href="{page-link-url}"><xsl:value-of select="text"/></A> 
</xsl:template>
I want to change this so it only outputs the A tag if enabled is true, how do I do that?
Tarek M. Nabil
Software Engineer
ITWorx
Tarek.Nabil@itworx.com
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com
RE: If condition
Posted by Antony Quinn <an...@caret.cam.ac.uk>.
<xsl:template match="page-link[@enabled='true']">
<A href="{page-link-url}"><xsl:value-of select="text"/></A> 
</xsl:template>
-----Original Message-----
From: Tarek M. Nabil [mailto:Tarek.Nabil@itworx.com]
Sent: 19 November 2002 13:04
To: Xalan-J (E-mail)
Subject: If condition
I have the following <page-link> tag in my XML
<page-link enabled="false">
<text>Next</text>
<page-link-url>/promotion/promotionTypeDetails.jsp?PromTypeID=14&PromBN=
2</page-link-url>
</page-link>
and the corresponding tag in the XSL
<xsl:template match="page-link">
<A href="{page-link-url}"><xsl:value-of select="text"/></A> 
</xsl:template>
I want to change this so it only outputs the A tag if enabled is true, how
do I do that?
Tarek M. Nabil
Software Engineer
ITWorx
Tarek.Nabil@itworx.com
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com