Re: [xsl] changing node names in XML

Subject: Re: [xsl] changing node names in XML
From: Mitch Amiano <mitch.amiano@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Oct 2002 00:21:14 -0400
Counting children is inefficient; just check for the presence of any child node. Also, if there are no children, there will be no nodes against which to apply-templates, no?

<xsl:template match="employee[count(child::*)=0]">
	<leaf>
		<xsl:copy-of select="attribute::*"/>
		<xsl:apply-templates select="*"/>
	</leaf>


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread