This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: generating a repeatable unique id


Hello.

Sebastian Rahtz wrote:
> All well and easy, if the <div> elements have ID attributes, but they
> don't. And generate-id() is not guarenteed to be the same on the next
> iteration (well, it isn't with libxslt, at least). So I thought I'd
> make myself a key table, which lets me identify a target <div> quickly
> when the key value is passed in:

> maybe the best answer is to insist on ID attributes for my <div> 
elements...

You may add "id" attributes to your div's (e.g., via generate-id)
during the first transformation and then use them in subsequent
transformations.

Another approach concerns implementing a custom extension function
wich does the work (this can be less costly than a purely XSLT solution).

Probably, there are other, more effective, solutions, I do not know right 
now.

-- 
Alexander E. Gutman

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]