Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [XML Schema 1.1] I need an example that illustrates the

From: "C. M. Sperberg-McQueen" <cmsmcq@-------------.--->
To: "Costello, Roger L." <costello@-----.--->
Date: 7/22/2009 5:52:00 PM
On 22 Jul 2009, at 05:37 , Costello, Roger L. wrote:

>
> Hi Mukul,
>
> Yesterday I was talking with a colleague and I described to him  
> Conditional Type Alternative (CTA) and then xs:error. He was puzzled  
> about xs:error. He couldn't see a legitimate (nonredundant) use case  
> for it. As I got to thinking about it, I agreed with him.

Just as discussions of regular expressions and regular
languages find it helpful to have a way to write down
an expression denoting the empty set, so also it can be
convenient, in thinking about document validation, to have
a name for a type with no valid instances.  I think
xsd:error would be a convenient thing to have even if
XSD 1.1 had not adopted conditional type assignment.

Consider a practical scenario (real example, names
suppressed to avoid distractions):  project P is working with
a local specialization of a large generic vocabulary V.
P uses all of the elements defined by V as required, and
some of the elements defined by V as optional.  Some
elements which are optional in V are optional in P,
some are required in P, and others are forbidden in P.

It is not enough for project P to tell its users "Don't
use element E" -- part of checking the acceptability of
documents for project P is checking that element E
does not occur at all, even though it's optional in
the base vocabulary V.

With some validation mechanisms, such as DTDs, it suffices
to provide a way to ensure that E is not declared.  But
if the validation language includes lax wildcards, that
won't be enough.  It would be convenient for project P
to be able to declare a simple restriction of vocabulary
V by writing

   <override schemaLocation="main.path.to.V">
     <element name="E" type="error"/>
     <!--* other elements can be excluded here by the same
         * method ... *-->
   </override>

And in XSD 1.1, that can be done.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************







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