Subject: RE: Loosing children
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 4 Apr 2003 16:23:00 +0100
|
> Any errors in this? I loose children from my xml using it...
>
> <xsl:for-each select="child::*">
> <xsl:apply-templates/>
> </xsl:for-each>
xsl:apply-templates by default means <xsl:apply-templates
select="child::node()"/> - so you are processing the children of the
children.
Replace the above with <xsl:apply-templates select="child::*"/> to
process the child elements, or <xsl:apply-templates/> to process all the
children (elements, text nodes, etc).
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|