|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Changing the content of an XML documentAndrew Welch andrew.j.welch at gmail.comTue 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:copy>
<xsl:apply-templates select="@*,node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="attribute()|text()|comment()|processing-instruction()">
<xsl:copy/>
</xsl:template>
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
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






