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


Help: OASIS Mailing Lists Help | MarkMail Help



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

[ Lists Home | Date Index | Thread Index ]

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.



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

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