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

Re: Is there a way to relate source tree nodes to resu

Subject: Re: Is there a way to relate source tree nodes to result tree nodes?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sat, 28 Jul 2001 12:16:54 -0700 (PDT)
 Re: Is there a way to relate source tree nodes to resu
David Penton wrote:

[snip]

> If I understand xslt correctly (which I would certainly not bet the ranch on), the
> identity of the
> nodes in the source DOM are lost to the xslt transform, and are available only as
> xslt tree objects.
> I would guess that this is so even if I get the result tree as a DOM 2 document, 
> in that the xslt
> transformer cooks up its own result DOM with no navigable relationship with the 
> source DOM.
> 
> I guess I might be able to figure out some way to use the position of elements in
> document order, or
> change the dtd so that elements have id attributes that I could navigate back to,
> or something.  But
> it would sure be nice to to have a simpler way to identify the node in the source
> DOM per se that I
> have at a given spot in the stylesheet.

One unique ID of a node is an XPath expression that returns exactly that node. Any
such expression remains constant unless the source xml has been changed.

A stylesheet producing an XPath expression for a node can be found at:

http://www.dpawson.co.uk/xsl/sect2/N6077.html#d176e20

or at

http://www.vbxml.com/snippetcentral/main.asp?view=viewsnippet&id=v20010323001030

Hope this helped.

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.