Subject: Re: question about generate-id()
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Sun, 8 Aug 2010 14:42:25 +0100
|
On Sun, 08 Aug 2010 08:06:40 -0400
"G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> >So not 'unique' as xml:id defines unique?
>
> Yes as xml:id defines "unique", just not within xml:id's uniqueness
> scope.
>
> It has the same properties as xml:id, just in a different value set
> than where you find a document's xml:id values.
>
> It *is* an identifier. It *is* a name token. It *is* unique in
> *its* value set.
Which is my point. an xml:id has other properties, different scope
(= value set??? )
>
> It also happens to have a lexical constraint of only alphanumeric
> characters,
The other half of xml:id, no problem with that.
always generated from different nodes."
> >
> >Again only in the context of the call to the function.
> >I.e. there is no explicit scope.
>
> That sentence describes the scope: the set of nodes. That scope
> doesn't say anything about the document's identifiers, but just to be
> clear, Mike cites the sentence in 16.6.4 in response to what you
> posit here:
> > > The spec explicitly says "There is no guarantee that a generated
> > > unique identifier will be distinct from any unique IDs specified
> > > in the source document.".
Yes. agreed, that is the bummer. Why not? James isn't normally so
sloppy.
> >
> >So 'generate-a-random-string' might be more accurate than
> >generate-id?
>
> No, "generate-a-name-token-suitable-for-an-id()" might be more
> "accurate",
I think, slowly, we're agreeing. The name is inaccurate, read today.
16.6.4 is the get-out. a context definition would help, 16.6.4
with both 'unique' and 'distinct' is the oddity.
Again. I'll leave it at that. Seems Mike won't be taking it to the WG.
Tks Ken.
--
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
|