W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2003

RE: document is not an element, is it?

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Tue, 11 Mar 2003 22:47:58 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453E141@daemsg02.software-ag.de>
To: MW <onlymails@gmx.net>, public-qt-comments@w3.org

> The document function is defined in "XQuery 1.0: An XML Query 
> Language" as follows: "The fn:document function, when its 
> first argument is a string containing a single URI that 
> refers to an XML document, converts that document to a Data 
> Model representation and returns its document node." So I was 
> (and still am) assuming that the return type of the 
> document() function is of  type 'document' and not 'element', 
> since the document node is not a element node, is it?

Actually the document() function in the current working drafts allows the
URI to contain a fragment identifier, and if it does, the returned value may
be an element node rather than a document node. This is the way document()
is defined in XSLT 1.0.

We've made a recent decision, which (if all goes smoothly) will be reflected
in the next working drafts, to use a simplified version of the document()
function for XQuery. This will not allow fragment identifiers and will not
allow multiple URIs; it will always return either a document node, or
nothing.

Michael Kay
Received on Tuesday, 11 March 2003 16:48:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT