Re[2]: [xsl] Ouput escaping / XPath

Subject: Re[2]: [xsl] Ouput escaping / XPath
From: Manuel Baehnisch <s716631@xxxxxxxxxxxxx>
Date: Tue, 15 Nov 2005 21:53:06 +0100
Hi David,

thanks allot. But I have to say I'm a bit baffled. To my understanding
this template copies only all the attributes (which I thought was
<element attribute="...">). How come this copies also the child
elements and the text???

DC> <xsl:template match="*" mode="copy">
DC>  <xsl:copy>
DC> <xsl:copy-of select="@*"/>
DC> <xsl:apply-templates mode="copy"/>
DC> </xsl:copy>
DC> </xsl:template>


>> The element() function seems to copy the comment
>> as well. What am I doing wrong here?

DC> If you copy an element node then the copy has exatly the same children
DC> as the original (or rather has copies of those children) so it has teh
DC> smae text, comments and child elements.

So for that matter if I <xsl:copy-of select="child::element()"/> it automatically
produces a deep-copy with which I don't have the opportunity to check
which parts I do and which I do not want to copy, right?

Manuel Baehnisch

Current Thread