W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2004

[XQuery] IBM-XQ-002 - Metadata

From: Andrew Eisenberg <andrew.eisenberg@us.ibm.com>
Date: Tue, 20 Jan 2004 16:58:05 -0500
To: public-qt-comments@w3.org
Cc: Don Chamberlin <chamberl@almaden.ibm.com>
Message-ID: <OF20F96571.F4635970-ON85256E21.007843A8-85256E21.0078AC26@us.ibm.com>
XQuery currently lacks a mechanism to return metadata describing the 
persistent objects of interest to its users. While this capability could 
be added to each of the APIs that are designed for XQuery, we suggest that 
it would be better for XQuery to provide this metadata.

SQL defines the Information Schema tables that reflect its metadata. While 
these tables were provided in SQL-92, they have not been widely 
implemented. By the time that they were published, vendors had already 
started defining their own tables and API methods to make this type of 
information available.

XQuery users can make reference to a number of objects in their queries. 
The following table shows each of these objects and describes which 
constructs allow their use.

XQuery object
clause that allows the use of this object
Schema Import in prolog
Module Import in prolog
Default Collation Declaration in prolog
OrderModifier in OrderBy Clause
functions such as fn:contains

XQuery metadata might be provided by a function, fn:metadata. This 
function would return the descriptions of schemas, modules, collations, 
collections, and documents that are accessible to the issuer of the query. 
A schema would be provided to describe the document or element produced by 
this function. Implementations could provide additional metadata by 
extending the types defined by this schema.

An application might request the entire metadata document, or it might 
operate on it with XQuery to return only part of this metadata.

We recognize that some XQuery implementations are "closed world", with all 
objects of these types registered in a repository of some sort, while 
others are "open world", attempting to resolve URI's across the world wide 
web. We suggest that the objects described by fn:metadata be defined to 
return a subset, possibly an empty subset, of the objects that can be used 
in a query. An open world implementation might return no object 
descriptions at all. 

A user might issue the following query:

        for $c in fn:metadata()//xqm:collection
        return fn:data($c/xqm:collection-uri)

This query might return the following:


                                                        -- Andrew

Andrew Eisenberg
5 Technology Park Drive
Westford, MA  01886

Phone: 978-399-5158    Fax: 978-399-5117
Received on Tuesday, 20 January 2004 17:08:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:52 UTC