xsl-list
[Top] [All Lists]

RE: Escaping the root node when using xsl:copy-of

2004-01-27 23:31:26
Hi,

Is there any way i can escape the root node (just the element 
tag) being copied while all the children are copied as is.

  <xsl:template match="/*">
    <xsl:copy-of select="node()"/>
  </xsl:template>

Currently am using <xsl:copy-of 
select="node()[not(self::DURATION)]"/> which copies 
everything except the DURATION child. Problem it also copies 
the root node which is the node where i start copying.

I'm not sure if this is what you mean,

  <xsl:copy-of select="*[not(self::DURATION)]/node() | node()[not(self::*)]"/> 

Cheers,

Jarno -  Delerium: Truly (Club)

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