[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|