xsl-list
[Top] [All Lists]

RE: Loosing children

2003-04-04 08:23:00
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(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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



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