W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2006

RE: [xml-dev] Two Questions - on XML Schema

From: Michael Kay <mike@saxonica.com>
Date: Thu, 9 Mar 2006 18:00:37 -0000
Message-ID: <000301c643a3$5e901930$0115a8c0@Elektonika.local>
To: <ElektonikaMail>
Cc: <ElektonikaMail@frink.w3.org>, <xml-dev@lists.xml.org>, <xmlschema-dev@w3.org>, <xmlschema-dev-request@w3.org>

The reference is W3C-member restricted.

It might be that we've reached the stage where we can't afford to do things
properly so we have to do them cheaply. If that's the case, then this is
probably the right way forward. However, one needs to be aware of its
limitations. For example, if there are two possible content models for an
element and you want to control which one to use based on an attribute, then
you have to define the union of the two content models and design XPath
expressions that implement two permitted subsets. That seems pretty unusable
to me.

To my mind, grammar-based constraints and value-based constraints should be
much more closely integrated than this. And I don't think it's impossible.
One way of doing co-occurrence constraints is to think in terms of a
"computed xsi:type" where the effective value of xsi:type on an element is
computed as the result of an XPath expression in the schema, applied to the
element instance as context node. This expression can default to
"@xsi:type", so the current xsi:type facility becomes just a special case.

That doesn't preclude the needs for generalized XPath-based constraints in
the schema, of course.

Michael Kay

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Paul.V.Biron@kp.org
> Sent: 09 March 2006 16:37
> To: rjelliffe@allette.com.au
> Cc: ElektonikaMail@frink.w3.org; xml-dev@lists.xml.org; 
> xmlschema-dev@w3.org; xmlschema-dev-request@w3.org
> Subject: Re: [xml-dev] Two Questions - on XML Schema
> > Well, can I recommend just officialy recommending the  
> simple Schematron 
> > assert statements as the easiest way forward for everyone, 
> using the 
> > schematron namespace, and inside <appinfo>
> Rick, that is exactly what I have proposed, see [1], and one of the 
> options the WG is seriously considering.  I'm really 
> interested in your 
> reactions to my proposal.
> pvb
> [1] 
> http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2006Jan/
> 0137.html

The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

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

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>
Received on Thursday, 9 March 2006 18:00:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:09 UTC