Subject: Re: Suggestions for naming files based on starting node?
From: Chris von See <chris@xxxxxxxxxxxxx>
Date: Wed, 16 Apr 2008 22:04:20 -0700
|
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
|