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

Re: Definition of object hierarchies in XML schema

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 26 Oct 2000 18:34:37 +0100
To: "Prosi, Rainer 4620 PPE-WT" <Rainer.Prosi@de.heidelberg.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5bk8avcxqq.fsf@cogsci.ed.ac.uk>
"Prosi, Rainer 4620 PPE-WT" <Rainer.Prosi@de.heidelberg.com> writes:

> Hi Folks;
> I am using XML as a data container and need "object-oriented" data types
> that allow overriding of defaults. The way this is done is that an element
> may contain nested elements of itself, e.g.
> <A att1="a" att2="b">
>   <A leaf="1" att1="aa" att3="c1"/>
>   <A leaf="2" att3="c2"/>
> </A>
> this is semantically equivalent to 
> <A att1="aa" att2="b" att3="c1"/>
> <A att1="a" att2="b" att3="c2"/>
> Is there any way in XML schema to specify that each leaf of the tree must
> have all three attributes att1, att2, att3 but not each individual node ar
> am I forced to simply make each attribute optional?
> Thanks 

In brief, 'no'.  The WG did not implement co-constraints (i.e. this
attr. iff not that attr) in XML Schema 1.0.

  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 Thursday, 26 October 2000 13:34:43 UTC

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