[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|