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

Re: Referencing unique values by their order number.

Subject: Re: Referencing unique values by their order number.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 9 Dec 2006 01:17:49 GMT
Re:  Referencing unique values by their order number.
> The real input example has various sections of the original example -
> aside from being also more convoluted in other aspects. All sections
> need to use their own unique value set and reference it appropriately.
> My concern was that the top-level (i.e., somewhat global) key feature
> wouldn't be appropriate. 

you can make keys work locally by using concat to make up specific
identifiers, for example if you want all keys to be unique to descendants
of a given chapter, just make the chapter part of the key ie instead of
use="." use use="concat(ancestor::chapter/@id,':',.) or whatever works
in your case.

> Is there a way to do the same without keys?
perhaps, perhaps not, apart from making things faster the functional key
notation alows you to avoid some problems related to the fact that you
can't bind variables in xpath 1, variable binding has to be done at the
xslt level so can't happen within a path.  some cases of course don't
need variables, some do, not sure which case you are in, There are parts
of the world where it isn't 1 in the morning, someone else can think
about it:-) 

David

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.