OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] XQuery and DTD/Schema?

[ Lists Home | Date Index | Thread Index ]

The input to an XQuery query consists of (at compile time) a set of type
definitions and (at run time) a set of documents/trees with type
annotations. The set of type definitions can be empty, and the type
annotations can be defaulted, so queries can therefore be written
against documents that have not been subjected to schema processing.

The XQuery working group has only recently started work on conformance
statements. There is a draft proposal on the table that defines a
conformance level for implementations that don't support schema
processing - in other words, such implementations don't handle type
definitions or type annotations. Whether this proposal makes it into the
next draft depends more (I think) on getting the detail right than on
any differences about the principle.

Of course it's also possible that some vendors will want to impose
stronger constraints, for example that all the documents in the scope of
a single query conform to the same schema. Presumably people who don't
like such a constraint won't buy the product...

As far as the XQuery spec is concerned, although the type system is
chosen to be compatible with XML Schema, there is no requirement for the
type definitions and type annotations actually to be produced by XML
Schema processing (just as XSLT can process a source tree that wasn't
created by parsing source XML).

I hope this goes some way to answering the question.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 

> -----Original Message-----
> From: Betty Harvey [mailto:harvey@eccnet.com] 
> Sent: 02 July 2002 23:51
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] XQuery and DTD/Schema?
> I haven't been following the progress of XQuery closely.  I 
> was advised today that a W3C Schema had to be developed 
> instead of a DTD because XQuery only works with Schema.  I 
> was skeptical that the XQuery specification would really say 
> this.  However, I found what I believe to be conflicting 
> information in the XQuery specification:
>   "XQuery's type system is based on [XML Schema]. Work is in 
> progress to
>    ensure that the type systems of XQuery, the XQuery Core, 
> and XML Schema
>    are completely aligned."
> I interpret the above statement to mean that XQuery datatypes 
> will be based upon XML Schema.  I believe this statement may 
> be the reason for others thinking that an XML Schema and not 
> DTD's or RELAX NG was required in order to use XQuery.
> Any thoughts on my interpretation of the specification.  Thanks!
> Betty
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> Betty Harvey                         | Phone: 410-787-9200 FAX: 9830
> Electronic Commerce Connection, Inc. |
> harvey@eccnet.com                    | Washington,DC SGML/XML 
> Users Grp
> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an initiative of OASIS 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS