Re: Content Constraints in Table Rows

"Daniel Brauer" <daniel.brauer2@img-online.de> writes:

> So is it possible to define a single type "Row" type with an attribute like
> "position" which can be "first"/"middle"/"last" and use it to check the
> content?

The literal answer is "no", computed types/co-constraints are not
supported in general.  If you don't mind using the name "xsi:type"
(with an appropriate namespace) instead of "position", then you can do
this.  Define types called 'first', 'middle' and 'last', then define
<row> to have a type definition which subsumes all of them, and write
e.g.

 <tableName xmlns:xsi="http://www.w3.org/2001/XMLSchema">
  <row xsi:type="first">
  . . .
  </row>
  <row xsi:type="middle">
  . . .

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Tuesday, 15 April 2003 05:52:01 UTC