xsl-list
[Top] [All Lists]

Re: changing node names in XML

2002-10-26 21:21:14
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



<Prev in Thread] Current Thread [Next in Thread>