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 ]

From: "Betty Harvey" <harvey@eccnet.com>

> Does XQuery require a W3C Schema?  Does XQuery care?  Can I use the
> datatyping and validating capability within my database of choice
> if it supports XQuery.

I gather the answer is that an XQuery implementation would support 
getting access to database implementations by creating its own 
XML Schema components (based on the data definitions of the database)
and working with those, but that this would probably be transparent to the
user and probably never even serialized out to XML.
> If I currently have a DTD and thousands possibly millions of XML documents
> that conform to this DTD, why should I care about converting my DTD to W3C
> Schema just to use XQuery?

If you import XML data into a database with DTDs, there will be limited use
of datatyping (just whatever DTDs provide).  The DTD datatypes all have
WXS equivalents (with the possible exception of NOTATIONs, you figure out
why) and so an XQuery system (using WXS components) will be able to access
that DTD datatyping transparently.

I think it is important to see that WXS has three aspects:
  1) the XML syntax
  2) the schema components, which includes the type lattice idea
    (and which it is now clearer should also include TAI ideas)
  3) schema assessment of an infoset to make a PSVI 
    (rather like a super-DOM)

When using WXS with XQuery, I gather that there is no
need for the XML syntax to be involved, and no need to
validate to make a PSVI. 

This is another area where we can be talking at cross-purposes.
I think it is fair to say that for many on the W3C XML Schema
WG, the aspect 2) above is the nub of the issue: it is what they
need for type-aware manipulation of semi-structured data
and for database-interoperation and web services.  Aspects
1) and 3) are only of ephemeral interest at the edges when
the data is XML.  The XML Schemas specifications are
really careful to tease out these different aspects, allowing
future changes to the XML syntax or the validation
outcomes without altering the central core of components.
(Indeed, early drafts dealt with these aspects in separate sections.)

So when an XQuery or XML Schema WG person talks
about XML Schemas, chances are they are really talking
about the schema components and type lattice idea, rather
than about an explicit XML document containing a 
schema or about any validation using that schema.*

I think it is fair to say that the people attracted to ISO
DSDL have different priorities: that a type lattice
is not important, that having a straightforward 
syntax is important, and a focus on validation
without a disruptive new super-DOM.

Rick Jelliffe

* This is also one reason why there is no official
contraction for W3C XML Schemas Definition Language
(having no contraction is being discussed on another
thread): because the language (the XML syntax)
is less important than the schema components
(in the minds of the Schema WG IMHO).  It is
the components (and type lattice) that are the guts
of what is being defined there.


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

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