Subject: how to match true and false and display yes and no instead?
From: Christian Rasmussen <byggemandbob@xxxxxxxxx>
Date: Wed, 27 Jul 2005 18:57:40 +0200
|
Hi experts,
It seems to be a pretty simple question, but I'm newbie and I cannot
figure out how to do it :-(
please help me!
here is some sample xml showing my problem:
<members>
<profile>
<name>Bill Clinton</name>
<married>false</married>
<kid>joe</kid>
</profile>
</members>
my xsl looks something like this:
<xsl:template match="members">
xsl-fo goes here.....
</xsl:apply-templates>
<xsl:template match="members/profile/married">
<xsl:if test=".='false'">no, he is not married</xsl:if>
<xsl:if test=".='true'">yes, he is married</xsl:if>
</xsl:apply-templates>
<xsl:template match="kid">
xsl-fo goes here.....
<xsl:apply-templates select="../married"></xsl:apply-templates>
I simply want to display "yes" and "no" instead of "true" and "false".
So I have made a template match which specifically matches the element
which holds the true or false value. After matching this element, I
test whether its true or false, and returns the text instead.
nothing shows up :-(
Thanx in advance for you help
/Christian
|