[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XQuery and DTD/Schema?

At 06:51 PM 7/2/2002 -0400, Betty Harvey wrote:

>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.

XQuery works with well-formed documents, DTD-governed documents, or XML 
Schema-governed documents. I think the following quote from the Data Model 
draft is clear and straightforward on this subject:

 From http://www.w3.org/TR/query-datamodel/#psv:

>3.3 XML Schemas and the XML Information Set
>The data model supports the following classes of XML documents:
>1. Schema-validated documents, i.e., those validated with respect to a
>2. DTD-valid documents, i.e., those documents validated with respect
>to a DTD, and
>3. Well-formed documents with no corresponding DTD or schema.

The mappings from DTDs and well-formed documents to the equivalent schema 
documents are not yet finished, as editorial notes in the Data Model 
document point out.

As you note, XQuery does not define a mapping for RELAX-NG. This is also an 
issue for relational data, object data, or any other kind of typed data 
that is not actually an XML file governed by a schema. To make XQuery work 
for these data sources, you must define a mapping, either to the PSVI or 
directly to the XML Query and XPath Data Model. For relational sources, 
this is done by SQL/XML, a specification being developed by ISO/ANSI [1], 
which defines the mapping in terms of equivalent XML schemas and documents.

To my knowledge, nobody has done this for RELAX-NG. Anybody who wants to do 
such a mapping will need to think about how to match the purely structural 
typing of RELAX-NG to the named typing used in XQuery.


[1]  Relevant SQL/XML specs:

       The XML Data type and Publishing Functions:

       Table Mapping:

       Mapping non-predefined data types:


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.