Subject: Re: [xsl] where's here the error From: "graham.heath" <graham.heath@xxxxxxxxx> Date: Mon, 02 Jan 2012 20:59:19 +0100 |
<xsl:template match="section/entry">Use a predicate:
<h2><value-of select="title" /></h2>
</xsl:template>
The problem with this generic solution is that if there is no title element (as this is the case for image/section/entry), you will get an empty h2 element.
You can add a test here or just deal with the first solution.
<xsl:template match="section/entry[boolean(title)]"> <h2><value-of select="title" /></h2> </xsl:template>
Regards Graham
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] where's here the error, Matthieu Ricaud-Duss | Thread | Re: [xsl] where's here the error, Andrew Welch |
Re: [xsl] Path according to a child, Martin Honnen | Date | Re: [xsl] where's here the error, Andrew Welch |
Month |