[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
there are several problems here.
1. you are testing on element child, even though your xsl:template has made the child element the context node. so the child element you're using in your test doesn't exist, as the match would occur on child/child.
2. your xslt syntax is not well-formed XML.
3. your test syntax is not properly formed. i don't know what you're trying to accomplish with the brackets, but i'm assuming that you want to copy
to the output if a child's content is equal to C4;
what you want is:
--Bill
vanaja selvaraj wrote:
Re: [xsl] if statement
Subject: Re: [xsl] if statement From: Bill French <bfh@xxxxxxxxxxxxx> Date: Wed, 16 Aug 2006 14:56:15 -0700 |
there are several problems here.
1. you are testing on element child, even though your xsl:template has made the child element the context node. so the child element you're using in your test doesn't exist, as the match would occur on child/child.
2. your xslt syntax is not well-formed XML.
3. your test syntax is not properly formed. i don't know what you're trying to accomplish with the brackets, but i'm assuming that you want to copy
<span style="color:red"> <xsl:apply-templates/> </span>
to the output if a child's content is equal to C4;
what you want is:
<xsl:if test=". = '⇄'"> <span style="color:red"> <xsl:apply-templates/> </span> </xsl:if>
--Bill
vanaja selvaraj wrote:
<root> <child>⇄</child> <child>)</child> </root>
Using if statement I have coded like below:
<xsl:template match="child"> <xsl:if test="'[child=⇄]'"> <span style="color:red"> <xsl:apply-templates/> </xsl:if> </span> </xsl:template>
Regards,
S.Vanaja
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] if statement, vanaja selvaraj | Thread | [xsl] xsl if statement, vanaja selvaraj |
RE: [xsl] Need help with XSLT: addi, Michael Kay | Date | Re: [xsl] Need help with XSLT: addi, Nishi Bhonsle |
Month |
Keywords