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

Re: How to select a node with parents?

Subject: Re: How to select a node with parents?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 13 May 2005 09:19:52 +0100
select node where parent
> And I want to select a specific employee node but get all the parent
> nodes along with it... for example...

You can't do that with a single xpath(*) as you don't want the parent
(ancestor) nodes as the children of a node are an intrinsic property of
the node, and you wnat nodes with different children, therefore you need
to create new nodes with the same names and attributes but different
children. So you need template invocation for that.

* I put a note here as because in XSLT2 you can in priinciple do
  everything in a single XPath as you can wrap up any nu,berr of
  apply-template or other xsl instructions into an xsl:function and then
  call that function from XPath, but in order to create new nodes you
  must use the xsl instruction <xsl:element or ,xsl:copy or a literal
  result element at some point.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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.