W3C home > Mailing lists > Public > xsl-editors@w3.org > July to September 1999

document() and node identity

From: Kay Michael <Michael.Kay@icl.com>
Date: Tue, 24 Aug 1999 11:51:44 +0100
Message-ID: <93CB64052F94D211BC5D0010A800133170F062@wwmess3.bra01.icl.co.uk>
To: "'xsl-editors@w3.org'" <xsl-editors@w3.org>
The specification does not state whether two invocations of the document()
function always return distinct node-sets, or whether there are
circumstances in which two invocations can return the same node-set (or two
node-sets containing the same nodes, which amounts to the same thing). If
the latter, it needs to say what those circumstances are: e.g. only when the
URL is identical.

Of course, if the two invocations with the same URL return distinct
node-sets, [that is, if count(document("fred.xml") | document("fred.xml"))
!= count(document("fred.xml"))] then document() is not a pure function, and
the specification needs to say something about how often it is evaluated,
e.g. if it is referenced in a global variable or in a template match
pattern.

Two possible solutions:
- specify that two invocations of document() return the same node set iff
they have exactly the same URL arguments
- leave it all implementor defined.

Presumably there is no wish to get into a deeper definition of URL
equivalence.

Mike Kay
Received on Tuesday, 24 August 1999 16:08:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT