cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: Tags in the value of an XSLT variable?
Date Mon, 30 Jun 2008 07:50:46 GMT
And that is not a "trick", but standard XSLT; see: 
as select="." only selects the value (string) inside the tag/s.

>>> On 2008/06/27 at 06:48, in message <>,
"Betty Harvey" <> wrote:
Try this for your xsl:copy:

<xsl:copy><xsl:apply-templates select="@* | node()" /></xsl:copy>

<quote who="Andrew Chamberlain">
> Hi All,
> It's quite possible that this is more XSLT-related than Cocoon itself,
> but wasn't sure where else to post.
> I'm using an XSL transformer and need to capture a tree fragment in the
> value of variable ... including the tags themselves.  The reason for
> this is because I need to pass the XML excerpt (as a string) to a Java
> class which is specifically written to parse it.
> I'm trying the following, but this only seems to include the values, and
> not the tags:
>     <xsl:variable name="gml">
>       <xsl:copy-of select="."/>
>     </xsl:variable>
> Can anyone help?  Is there a trick for this?
> Many thanks,
> Andy

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice,
and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message