[thelist] xsl:if query (xml newbie)

John.Bedard at ngc.com John.Bedard at ngc.com
Fri Nov 21 11:18:14 CST 2003


<xsl:variable name="salary" select="/person/salary" /> 
    <xsl:if test="$salary != ''">
	<xsl:text>£</xsl:text>      
	<xsl:value-of select="/person/salary"/>
    </xsl:if>

Just throwing £ in there does make it through FOP. I threw it into a document I'm working on. I suppose if you want to thorough find the unicode for the character.

HTH,

John

-----Original Message-----
From: John Dobson [mailto:j.dobson at find-a-part.com]
Sent: Friday, November 21, 2003 8:19 AM
To: Thelist (E-mail)
Subject: [thelist] xsl:if query (xml newbie)


If you have
 
<person>
<salary></salary> 
</person>
in which salary is either empty of not
is
 
<xsl:if test="person/salary">
£<xsl:value-of select="person/salary" />
</xsl:if>
 
the right way to check if it is empty or not, and then provide the salary with the £ sign in front?
 
AHA
 
John
-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list