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

Re: RE: RE: XQuery and DTD/Schema?


dtd schema language
At 08:09 AM 7/7/2002 +0700, James Clark wrote:

>>>But seriously, what I would suggest is that the Query WG accept the
>>>reality that there is heterogeneity of XML schema languages (and
>>>applications that use no schema language)
>>
>>DTDs, well-formed documents, and XML Schema are all expressly supported
>>by XQuery.
>>
>>Other schema languages can be mapped into our data model, but that
>>requires someone to do the work. For RELAX-NG, that probably would
>>involve specifying how the type annotations are computed, and there are
>>some features of RELAX-NG, such as co-occurrence constraints, that are
>>not supported in our data model.
>
>As far as I can see, to use XML Query with RELAX NG, I would effectively 
>have to translate RELAX NG into something semantically equivalent to W3C 
>XML Schema.  Nothing in RELAX NG that goes beyond W3C XML Schema would be 
>useable with XML Query, even though it would perfectly feasible to 
>accomodate some RELAX NG features in your type-system, for example, 
>allowing choices between attributes or choices between elements and 
>attributes just as you now support choices between elements.  If so, 
>that's not exactly what I would call accepting a heterogeneity of XML 
>schema languages.

I am beginning to think it might be possible to support RELAX-NG in XQuery. 
I have not thought this through completely, but consider the following:

1. Allow schemas to be imported from any language that the environment supports
2. Let validate { } use the schema language associated with the definition
3. Add type annotations to the RELAX-NG instance when importing into the 
data model
4. Assume the presence of the XML Schema simple types
5. Eliminate purely structural typing and structural subsumption, using 
purely named typing - this would mean that the query language accepts the 
schema language's judgements about valididty.

The static type system would not support all of RELAX-NG, but the dynamic 
type system would. And the static type system does not support all of XML 
Schema either.

>I do understand why you are doing it
>
>- you can't do static typing and be neutral about your type-system
>- if you have to pick one, politics means you have no real choice
>
>but let's be clear about it: XML Query is based squarely on W3C XML Schema.

Yes, it is true that XQuery is based on W3C XML Schema. We didn't use the 
PSVI as the basis for our data model, besides making sure we could get all 
the information we require in our mappings from a validated document. 
Although XML Schema is the basis for our data model, it is not the only 
thing that can be supported - and supporting many data sources has always 
been an explicit goal. Because DTDs and well-formed documents can be mapped 
into XQuery, they are easy to support. Relational data can also be mapped 
into this model very well.

Jonathan
Jonathan


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.