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

Re: Specify/determine element's "logical" parent

Subject: Re: Specify/determine element's "logical" parent
From: "john-xsl-list" <john-xsl-list@xxxxxxxx>
Date: Thu, 23 Sep 2004 15:47:10 -0400
xsl determine top level parent
On Thu, 23 Sep 2004 20:29:59 +0100, Jeni Tennison wrote

Hi, thanks for your response (I was beginning to think it was not possible).

> It would certainly be easiest to use the parentid attribute. To do 
> that, all you have to do is set up a key that indexes the <item> 
> elements based on their id attribute:

This data structure could be very large; would this have a performance impact
(hashing or whatever the entire document) or would it just hash or whatever
the keys when it needs them?   If so, is it possible (in ASP.NET) to share
these keys in memory for the entire application, or will these be processed
each time this XSL is invoked?  Sorry if this does not makse sense; I am
somewhat new to XSL and .NET and have never worked with XSL key.

> I'm not sure where the infinite recursion might occur, unless you 
> want to get the parent of the parent once you find it?

Any item could have a parentid defined as any other itme.  I think this could
result in infinite recursion when I try to generate left nav.  This condition
seems illogical but could be possible if I don't take steps to avoid it.  For
instance:

<items>
  <item id="A1" parentid="B2">
    <item id="A2" />
  </item>
  <item id="B1">
    <item id="B2" parentid="A2" />
  </item>
</items>

Trying to find B2's top-level parent would result in infinite recursion.

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.