[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
ALl,
I want to test if the first child node is a specific name "NodeName" node.I use the following expression.
But it doesn't work.
Then I changed the expression to
or
They all seem work.
Chen Yi
_________________________________________________________________
SkA*;z5DEsSQ=xPP=;Aw#,GkJ9SC MSN Messenger: http://messenger.msn.com/cn
[xsl] how to test if a child node have a specific name?
Subject: [xsl] how to test if a child node have a specific name? From: "Chen Yi" <chen_yi36@xxxxxxxxxxx> Date: Fri, 28 May 2004 20:52:45 +0800 |
ALl,
I want to test if the first child node is a specific name "NodeName" node.I use the following expression.
<xsl:if test="child::node()[1]=NodeName"> ... </xsl:if>
But it doesn't work.
Then I changed the expression to
<xsl:if test="child::node()[1]='NodeName'"> ... </xsl:if>
or
<xsl:if test="name(child::node()[1])='NodeName'"> ... </xsl:if>
They all seem work.
I want to know which one is the correct one? Thanks.
Chen Yi
_________________________________________________________________
SkA*;z5DEsSQ=xPP=;Aw#,GkJ9SC MSN Messenger: http://messenger.msn.com/cn
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] From Thread: XHTML to XHTML t, Mayo | Thread | Re: [xsl] how to test if a child no, G. Ken Holman |
RE: [xsl] XHTML [WAS: Grouping into, Daniel Joshua | Date | Re: [xsl] NEED good information on , Steve Brown |
Month |