Re: [xsl] How to select a node with parents?

Subject: Re: [xsl] How to select a node with parents?
From: chris <oneskiingfool@xxxxxxxxx>
Date: Thu, 12 May 2005 20:07:23 -0600
You are right, my terminology didn't make much sense.  I wanted to
copy, not select.  Essentially wanted to do something like a
<xsl:copy-of select="xxx"/> and have it bring over its ancestor nodes
rather than descendant nodes.  Sounds like templates is the only way
to go.  Thanks for your response.

On 5/12/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> If you select a node, then it keeps its original parents, siblings,
cousins,
> and aunts. In your example, the output node has the same parent and
> grandparent but different siblings from the original. That means it isn't
> the same node as the original - it must be a copy.
>
> So you're not in the business of selecting nodes here, you are doing a copy
> with modifications; which means using the identity template overridden with
> templates for the nodes you want to modify, in the usual way.
>
> Michael Kay
> http://www.saxonica.com/

Current Thread