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

Subject: Re: [xsl] question about generate-id()
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Sat, 7 Aug 2010 07:16:44 +0100
On Fri, 06 Aug 2010 12:29:42 -0400
"G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:

> I don't follow your argument, Dave.  An input document's identifiers 
> have *no* relationship to generate-id().

Lets agree to differ on that one then Ken. 


> 
> Consider this:  if your reasoning that generate-id() must produce a 
> value set exclusive of the xml:id values to ensure that id values in 
> the output are unique,

No, I haven't said that. 

 this falls apart when you consider that the 
> aggregation of two documents where each are independently (and 
> validly) using the same value for xml:id=. 

Agreed. I won't go into how. I'm suggesting that amongst the present
xml:id values in the input document, the generated id values must
be as defined, i.e. unique. 


> However, if you follow my rule of thumb that *every* xml:id= or id= 
> or ID-typed attribute named prod= (for example) is translated to 
> output using the generate-id() for that node ... and every reference 
> to those identifiers is replaced with the generated identifier for 
> the referenced node, then the references will be both preserved and 
> unambiguous in the result.

which is a lot of work. Fine if you want to do it. 

> 
> As to the earlier comment contributed regarding pointers from outside 
> of the document to inside the document,
oo scope IMHO

> 
> Therefore, generate-id() is necessarily independent of any knowledge 
> of any content. 

In which case it's badly named Ken. Quite unlike James?





-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

Current Thread