Subject: Re: [xsl] how to test if a child node have a specific name? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 28 May 2004 09:14:35 -0400 |
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?
-- Public courses: Spring 2004 world tour of hands-on XSL instruction Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004
World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] how to test if a child node h, Chen Yi | Thread | Re: [xsl] how to test if a child no, David Carlisle |
RE: [xsl] NEED good information on , Pieter Reint Siegers | Date | Re: [xsl] NEED good information on , David Carlisle |
Month |