W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Re: Using appinfo annotations to store integrity constraints

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 01 May 2000 21:46:13 +0100
To: "Vun Kannon, David" <dvunkannon@kpmg.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5br9bmyp62.fsf@cogsci.ed.ac.uk>
"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.

  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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC