xsl-list
[Top] [All Lists]

Re: [xsl] Suggestions for naming files based on starting node?

2008-04-16 22:04:49
I incorporated <xsl:number> into a pre-process template that created new identifier attributes for each element, and it worked like a champ. Still a fair bit of overhead because of the pre-processing pass, but much less than using count(preceding::*). Thanks, David!

Chris

On Apr 16, 2008, at 2:08 PM, David Carlisle wrote:


This works quite well, but as you'd expect the overhead is
ridiculous.

<xsl:number/> is designed for doing this kind of counting and many
sytems optimise its use, caching the last calculated number and not
requiring a document traversal each time.

I always avoid using generate-id for any kind of filename of ID used for linking, the values can be highly unstable as documents are regenerated.

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--