Subject: Re: [xsl] Output a default value for an empty node From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 6 Oct 2004 12:07:27 +0100 |
<xsl:template match="foo"> <xsl:copy-of select="."/> </xsl:template> <xsl:template match="foo[not(text()]"> <foo>hello mum</foo> </xsl:template> will convert <foo>zzz</foo> to <foo>zzz</foo> and <foo/> to <foo>hello mum</foo> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Output a default value for an, Aaron Johnson | Thread | Re: [xsl] Output a default value fo, Aaron Johnson |
Re: [xsl] Re: [xslt transform & gro, Michael PG | Date | RE: [xsl] Re: [xslt transform & gro, Michael Kay |
Month |