RE: Using appinfo annotations to store integrity constraints

Got it. 
I'm also thinking about appinfo for what I've taken to calling my "#IMPLIED
resolution strategy". I want my schema to state explicitly what to do if a
particular attribute is absent from an instance of an element for which that
attribute is declared. For instance, the strategy that most of my attributes
follow is:
ancestor-or-self::*[@implied-attribute][1]/@implied-attribute
which means that the attribute must exist somewhere among the containing
elements. Choosing the nearest value gives this useful behavior that the
attribute can be given a default, then the default overridden for any
subtree.
Is this idea of "absent attribute resolution strategy" useful enough to all
schemas that it should be part of XSchema itself, as opposed to hiding it
under the appinfo bushel?
Thanks,
David

-----Original Message-----
From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
Sent: Monday, May 01, 2000 4:46 PM
To: Vun Kannon, David
Cc: 'www-xml-schema-comments@w3.org'
Subject: Re: Using appinfo annotations to store integrity constraints


"Vun Kannon, David" <dvunkannon@kpmg.com> writes:

> 	I am considering, as the subject line says, using appinfo
> annotations to store integrity constraints. Consider a document as the
> transfer syntax for a database predicate. An integrity constraint might be
> "no worker earns more than their supervisor" or "pay_rate > 0". These
> integrity constraints could be expressed as CHECK constraints in SQL, for
> instance.

That's exactly the sort of thing appinfo is designed for.  Sorry the
documentation is less complete in this area than it should be.

As the schema for schemas reveals, the content model for appinfo is
constrained only in so far as it may not contain elements from the XML 
Schema namespace itself -- anything else, in any combination, is fine.

So declare a namespace at the top of your schema, and put whatever you 
like from that namespace inside appinfo.  If you give your schema
validator a schema for _that_ namespace as well as the schema for
schemas, the contents of appinfo from that namespace will get
schema-validated as well.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
*****************************************************************************

Received on Wednesday, 3 May 2000 11:53:30 UTC