[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: 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
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member