|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to select a node with parents?
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/
|
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
|

Cart








