Subject: Re: [xsl] How to select a node with parents? From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 13 May 2005 09:19:52 +0100 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to select a node with, chris | Thread | [xsl] Using XSL Values as hyperlink, Jonathan Marenus |
[xsl] Problem in the compilation of, Arvind Gupta | Date | RE: [xsl] Better include them in th, Michael Kay |
Month |