[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL resources - Flat to hierarchy - Common ancesto

Subject: Re: XSL resources - Flat to hierarchy - Common ancestors
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 27 Jul 2004 16:37:03 +0100
ancesto
> 1) do the nodes returned by ancestor-or-self retain their hierarchy?
If you mean what I think, then yes. Nodes live in the input tree and
have the same parents children etc however they are selected.

< 2) when I do an apply templates on ancestor-or-self, do they 'remember'
> the rest of the document, ie. Can the called template access their
> children etc.?

yes, see above

> 3) Why do I need the ::Menu?

when you go select="foo" it is short for seelct="child::foo" and selects
the foo children of wherever you are. If that's notthe direction you
want to go, you head in another direction around the tree with another
axos eg select="following-sibling::foo" selects siblings instead of
children. Since yor posted code was child::Menu the short answer to your
question is: you don't need it.

> 4) Why does child::Menu seem to return all the descendants and not just
> the first generation?

It doesn't it just selcts the children.
but you have copy of and copy of on an element node copies the entire
branch rooted at that node. If youjust want a "shallow" copy that gets
that element but none of its children ise xsl:copy.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.