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/

Received on Monday, 1 May 2000 16:46:15 UTC