Re: [xsl] question about generate-id()

Subject: Re: [xsl] question about generate-id()
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Sat, 7 Aug 2010 07:23:20 +0100
On Fri, 06 Aug 2010 18:15:13 +0100
David Carlisle <davidc@xxxxxxxxx> wrote:

> On 06/08/2010 16:53, Dave Pawson wrote:
> > It is the 'todays' version of id, as used in XML.
> > Hence in my view generate-id() function should generate an id value
> > as defined in XML rec.
> It generates a value legal as an id (as also used by xml:id)

Now we're getting down to definitions.
Agreed David, but that's only a part of the definition of ID?
The other half is that it's unique across the document. 

 I fail
> to see what else you could expect generate-id() to do.  Apart from
> anything else, generate-id() generates unique ids for the _source_
> documents:

I think that's the debate? That isn't in the spec and I'm guessing
that's why Ken goes to all the trouble of regenerating all ID's in
the input? 

"The generate-id  function returns a string that uniquely identifies a
given node. "
Doesn't say in what context? unique amongst....? what? Certainly not
covering Kens case of the prime input document and any read using doc()?

 it has no relationship to any ids that might be declared
> in the result. What specification would you expect?

Agreed, I didn't bring that up. 

> generate-id is a lot less needed in xslt2 where the  xpath is relation
> gives a far more direct access to much of teh functionality for which 
> generate-id was used.

I don't understand that argument David?

> David
> (My posting to the list will probably bounce, so Dave, if you reply
> can you quote me in full, as others won't have seen)

Key bounce as well David? No, it's gone to the list I think.



Dave Pawson

Current Thread