[XSL-LIST Mailing List Archive Home]
Re: [xsl] Purpose of generate-id index 
Subject: Re: [xsl] Purpose of generate-id index |
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 24 Jun 2003 21:51:10 +0200
John Sharp wrote:
In general terms why is the  index present.
As you noticed, it is redundant. Two reasons why it is still
1. Make it explicit to human readers that the first element
of the node set returned by key() is used. Not everybody
has always all details of the spec at hand.
2. Moderatly clever processors might take the index as a clue
not to construct the whole node set, which can save time and
memory. Really clever processors could take the same clue
from the presence of the generate-id() function of course,
but the former is still a bit easier to implement and also
more worth to do because the optimization is also an improvement
in many more situations.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list