[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 18:55:01 -0400
Re:  Specify/determine element's "logical" parent
On Thu, 23 Sep 2004 23:08:55 +0100, David Carlisle wrote

Excellent post, thanks.

> perhaps you're more of a city dweller and more comfortable 
> following the crowds?

Actually I really like working with current tools but because of my
unfamiliarity it is easy to just blame the technology instead of myself.

>           <xsl:value-of select="key( 'ids', (@parentid|../@id)[last()
> ])/@id" />
> 

I think this says to look up the element pointed to by the key @parentid if it
is defined, ../@id otherwise, but I am not sure I understand the [last()] -
does that mean that if both parentid and ../@id are defined, ../@id will be
used (in which case I want the reverse, first()?  or is this just defensive
programming, habit or something else?

> actually it's an error to have two templates of the same priority

I had expected the system (IE) to throw an error in this undefined case, but
it recovers (somewhat randomly) I guess.

Thanks again,

   -John

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.