[xquery-talk] Changing the content of an XML document

Andrew Welch andrew.j.welch at gmail.com
Tue Sep 2 12:22:50 PDT 2008

> The identity transform will work, and is essentially the same as the
> transformation function that Wolfgang suggests. However I think a transform
> expression is easier to understand

The XSLT 2.0 identity transform is perhaps a little more intuitive:

<xsl:template match="element()">
    <xsl:apply-templates select="@*,node()"/>

<xsl:template match="attribute()|text()|comment()|processing-instruction()">

XQuery and XSLT should compliment each other - and the task of
modifying sections of a single document in a single pass is definitely
a job for XSLT.

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

More information about the talk mailing list