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

Re: in-document references

Subject: Re: in-document references
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Tue, 7 Jan 2003 17:01:11 -0500
ancestors of woodside

On Monday, January 6, 2003, at 08:14 PM, Robert Koberg wrote:


<snip/>
The problem is that the "context" of the context node includes the
ancestor elements and so on, which I wish to access from <xsl:template
match="define">. Does that make sense?

not understanding... ancestors are not in the context node.

Er.. what I mean, but I'm not saying it very well. I'll use tree terminology instead. When I encounter the "ref" node, there is a context node which is part of a tree. The context node is the "ref" node, which has ancestors but no descendants, because "ref" never has any children.


What I want to do is to locate the appropriate "define" node-set, and have XSLT pretend that the "define" nodeset is in the place of the "ref" node. Right now I am using <xsl:apply-templates> to apply the templates to the "define" nodeset. But that's not good enough, because I'd like to be able to treat the anscestors of the "ref" node as the ancestors of the "define" nodeset. That would make my programming a lot easier.

How do I do that?

(This doesn't address optimization of course--this search pattern can
be
quite expensive.)

I can live with that, I'm using AxKit and static data.

You don't want to live with that :). I believe what you want is what I provided.
Let me know (offlist if you want) what did not make sense. I copied the examples
out of context with your examples so i can see how they might be confusing.

You, re right, it is pretty slow ! However, with AxKit, it caches results of stylesheet transformations across a pipeline. So, the first time it is accessed, it may be slow, but thereafter, it simply uses the cache. So, provided the original data is static, it will be quick from then on.


simon

---
     anti-spam: do not post this address publicly
www.simonwoodside.com -- 99% Devil, 1% Angel


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.