[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL resources - Flat to hierarchy - Common 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 ________________________________________________________________________
|
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
|