- From: Eric van der Vlist <vdv@dyomedea.com>
- Date: Wed, 13 Sep 2000 10:10:51 +0200
- To: James Clark <jjc@jclark.com>
- CC: xsl-editors@w3.org
James, James Clark wrote: > > document() already supports XPointer: > > "If the URI reference does contain a fragment identifier, the function > returns a node-set containing the nodes in the tree identified by the > fragment identifier of the URI reference. The semantics of the > fragment identifier are dependent on the media type of the result of > retrieving the URI." > > The spec for text/xml says fragment identifiers use XPointer. > > XSLT implementations are allowed but not required to support XPointer: > > "An XSLT processor is not > required to support any particular media types. The documentation for > an XSLT processor should specify for which media types the XSLT > processor supports fragment identifiers." Ooops, focused on the specific syntax for XPointer, I had forgotten they were part of a bigger picture and coherent with the text/xml media type :( Thanks for the clarification. If I understand all the implications correctly, this means that a XSLT processor supporting the text/xml media type should also support XPointer. This support would indirectly give to the users of such a processor the ability to use variable XPath expressions over any text/xml document including the source document through writing : document($variable) where the variable value can have the form "#xpointer(XPath expression)". This is a feature which has been requested many times and many XSLT users should be happy if it happens. > > > However, the fact that a XPointer expression equal to "#id" is pointing > > to the node whose ID is "id" in the current document while document("") > > is pointing to the current stylesheet could, IMHO, make it quite > > confusing if we said that the current document() function was to be used > > with XPointers as an argument. > > Huh? I was just meaning that if document("#id") is identifying the fragment named "id" in the source document, one could expect document("") itself to identify the source document instead of the current stylesheet... Anyway, it's clearly documented and the document itself (or at least its document element) can be referenced through document("#/1"). Thanks Eric > James -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
Received on Wednesday, 13 September 2000 04:09:50 UTC