W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Re: key/keyref problem

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 23 Aug 2001 10:26:02 +0100
To: kboo@ca.ibm.com
Cc: "Jun Wang" <t-junw@microsoft.com>, "Aung Aung" <aaung@microsoft.com>, <xmlschema-dev@w3.org>
Message-ID: <f5by9obktzp.fsf@cogsci.ed.ac.uk>
kboo@ca.ibm.com writes:

> > Part II:
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Aung:
> > >> How about this: should this work? (how/why?)
> > >> C:
> > >> <root>
> > >> <element name="a">
> > >>         <key   name="A">
> > >> </element>
> > >> <element name="b">
> > >>         <keyref   refer="A">
> > >> </element>
> > >> </root>
> >
> > Priscilla:
> > > No, because the key and keyref have to be defined in the same element,
> > or
> > the key has to be defined in a child element.  Neither is the case here.
> 
> > ht:
> > Not quite, Priscilla -- since <b> is unconstrained, in a valid
> > instance an <a> might occur inside it, so the above is OK.
> 
> Could you give me an example of a valid instance that shows the above is
> ok?

Maybe I'm confused by the picture above -- if that's the schema, then
an instance like this is OK.

<b>
 <a/>
</b>

If Aung's picture is the instance, Priscilla was
right, and there's no possibility of reference.

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 Thursday, 23 August 2001 05:25:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:23 GMT