RE: [transquery-discuss] XSLT as an XML update language

From: Evan Lenz (elenz@xyzfind.com)
Date: Fri Jan 04 2002 - 21:40:28 CET


Yes, that's what I meant. Thanks for the correction, Chris.

> -----Original Message-----
> From: Chris Bayes [mailto:chris@bayes.co.uk]
> Sent: Friday, January 04, 2002 1:04 AM
> To: 'Evan Lenz'; transquery-discuss@lists.oasis-open.org
> Subject: RE: [transquery-discuss] XSLT as an XML update language
>
>
> Evan,
> I think you meant
>
> <xsl:transform version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:tq="http://www.xmlportfolio.com/transquery">
>
> <xsl:param name="tq:input"/>
>
> <!-- Apply templates in the tq:update mode to each
> document in the TransQuery input collection -->
> <xsl:template match="/">
> <tq:documents>
> <xsl:apply-templates select="$tq:input" mode="tq:update"/>
> </tq:documents>
> </xsl:template>
>
> <!-- For each document in the TransQuery input
> collection, create a new document with the
> same generated id (effectively replacing it).
> Recursively apply templates in the tq:update
> mode to all descendants. -->
> <xsl:template match="/" mode="tq:update">
>
> <tq:document id="{generate-id()}">
> <xsl:apply-templates mode="tq:update"/>
> </tq:document>
>
> </xsl:template>
>
> <!-- The default rule for all elements,
> attributes, comments, PIs, and text
> nodes is to copy the node as is
> (and recursively apply templates to
> children of elements). -->
> <xsl:template match="@*|node()" mode="tq:update">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()" mode="tq:update"/>
> </xsl:copy>
> </xsl:template>
>
> </xsl:transform>
>
> Unfortunately I can't see any way of matching a generated id to a
> document for my implementation without doing 2 transforms and then there
> is no guarantee that the id will be the same each time. So I'll stick
> with the href route and tq:baseURI.
>
> Ciao Chris
>
> XML/XSL Portal
> http://www.bayes.co.uk/xml
>



This archive was generated by hypermail 2.1.4 : Fri Feb 22 2002 - 11:35:58 CET