Subject: RE: [xsl] Issue with child:: element From: "wrew ewrwe" <meenananju@xxxxxxxxxxx> Date: Tue, 21 Nov 2006 11:26:11 -0500 |
From: "Michael Kay" <mike@xxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Issue with child:: element Date: Mon, 20 Nov 2006 23:20:31 -0000
> <xsl:if test="child::*[1][self::note]"> > <xsl:apply-templates > select="note" mode="level1"/> > </xsl:if> >
That says "if the first child is a note then display all the child notes."
I suspect you wanted to say "if the first child is a note then display it".
That's simply:
<xsl:apply-templates select="child::*[1][self::note]" mode="level1"/>
(which does nothing if the first child is not a note).
Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Issue with child:: elemen, Michael Kay | Thread | [xsl] sort by xsl:if and then sort , Max Bronsema |
RE: [xsl] XSL-FO positioning inline, Wendell Piez | Date | Re: [xsl] XPath parsing in XSLT (ve, Mukul Gandhi |
Month |