Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Michael Kay" <mike@--------.--->
To: <Paul.V.Biron@--.--->, <rjelliffe@-------.---.-->
Date: 3/9/2006 5:45:00 PM
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
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Paul.V.Biron@k...
> Sent: 09 March 2006 16:37
> To: rjelliffe@a...
> Cc: ElektonikaMail@f...; xml-dev@l...; 
> xmlschema-dev@w...; xmlschema-dev-request@w...
> 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
> 
> 
> 



From mike@s... Thu Mar 09 18:00:49 2006
Received: from lisa.w3.org ([128.30.52.41])
	


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent