Subject: RE: Use document() function to get a reference to the input doc
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 18 Jul 2006 06:08:07 +0100
|
> When I brought this issue up off-list, this is the response I
> received:
>
> > > I'm getting two different generate-id() values for the same
> > > document's root node.
> >
> >That's because they aren't the same document... they are two
> different documents loaded from the same URL.
> >
> >That can't happen if they were both loaded using the document()
> >function - but in this case, one was and one wasn't, so
> there are no guarantees.
This sounds a bit as if I might have written it, so let me expand. It's
actually been quite a troublesome area, in sorting out the detailed
semantics of the document-uri() function.
If you're interested in the subtleties you might like to follow the
discussion at
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3173
which is not yet resolved, but which I think is heading in the direction of
relaxing the requirement that
doc(document-uri(D)) is D
must always hold.
Michael Kay
|