Re: [XSLT2.0] fragment identifiers, media types and document()

David Carlisle raised this comment {qt-2003Dec0130-01} at:

http://lists.w3.org/Archives/Public/public-qt-comments/2003Dec/0130.html

This is the official response from the Working Group, which considered
the comment on 2004-01-20.

The editor was asked to propose revisions that clarify existing text in
last              paragraph of 5.3.2, and modify 16.1 to point to 5.3.2.

I think we also need some changes to section 2.3.

XPath 2.0 formalizes the context-dependency of the fn:doc() function
using the notion of the "available documents" as part of the dynamic
context. This essentially models the web as a collection of (URI,
document) pairs, and says that the effect of the doc() function is to
get the document node corresponding to a given URI; all the machinery to
achieve this (including URI dereferencing, XML parsing and validation)
is regarded as part of the environment or context, and is inherently
implementation-dependent.

Because the document() function supports fragment identifiers, and the
meaning of a fragment identifier depends on the media type of the
document, we need to extend the context so that instead of (URI,
document) pairs, it contains (URI, document, media-type) triples. This
needs to be defined as part of the input to a transformation in section
2.3. Section 5.3.2, which explains how we initialize the dynamic context
for XPath, then needs to say that the available documents for XPath is
the projection of this table containing only the URI and document parts.
The reference in Section 16.1, which describes the document() function,
to section 2.3 can then remain, and a reference to section 5.3.2 can be
added.

The proposed revisions are as follows:

Section 2.3:

Add to the list of information items supplied when a transformation is
initiated:

* The available documents. This represents the total set of documents
accessible to the stylesheet by means of a URI supplied as an argument
to the doc() or document() functions. This information can be modeled as
a function that takes an absolute URI as input; if the document exists
then it returns a document node and a media type, otherwise it returns
an indication that the document does not exist. The set of documents
that are available to the stylesheet is implementation-dependent, as is
the processing that is carried out to get a document node representing
the resource retrieved using a given URI. Some possible ways of
constructing a document from an XML representation are described in
[Data Model].

Section 5.3.2:

Change this to say that the available documents in the XPath Context is
provided from the available documents supplied when the transformation
was initiated, as described in section 2.3; and to say that XSLT
augments the XPath-defined "available documents" information in the
dynamic context by adding for each URI a media type.

Section 16.1:

Explain the use of media type in relation to the definitions in 2.3 and
5.3.2.

I don't think we need to go into issues of resources vs resource
representations. This formalism of modeling the web as a mapping of URIs
to (document, media-type) pairs enables us to abstract such
complications away. 

David, thank you for raising the comment, and I would be grateful if you
would confirm that this provides an adequate resolution.

Best regards,

Michael Kay

Received on Sunday, 25 January 2004 16:48:24 UTC