W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2002

RE: Base URI as used by document

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Thu, 16 May 2002 07:56:20 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210602679DA9@daemsg02.software-ag.de>
To: Per Bothner <per@bothner.com>, public-qt-comments@w3.org
> The XQuery spec section mentions "Base URI" as part 
> of the static context, and that it is used by xf:document.  
> However, it doesn't actually define it.  The Functions and 
> Operator spec says the default base URI is "of the stylesheet 
> element containing the call to the document function".  But 
> what is a "stylesheet element"?  Is it defined anywhere?

This is a cut-and-paste error; the specification of the document() function
was transferred from the XSLT specification. The reference should now be to
the static context. And XQuery needs to define how this variable in the
static context will be initialized (it will probably just say that it's
implementation dependent).

> only thing I can think of is that it is the uri of the actual 
> XQuery source code.  But this seems rather useless.

Possibly. But it's the normal convention on the web that when one file
contains a reference to another, the reference is considered to be relative
to the file in which the reference was contained. Yes, this makes it
difficult to move files around: which is one reason xml:base was invented.
But of course, an XQuery expression, not being an XML document, cannot take
advantage of xml:base. In practice I think it's most likely that queries
will use absolute URIs.

Thanks for the comment.

Michael Kay
Received on Thursday, 16 May 2002 01:56:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:09 UTC