W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Re: key problems

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Mar 2003 16:08:01 +0000
To: Olivier B <obernou@yahoo.fr>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bbs0oeavy.fsf@erasmus.inf.ed.ac.uk>

Olivier B <obernou@yahoo.fr> writes:

I'm not sure I understand your example.

> <person name="bob" >
>  <car color="blue">
>  <car color="black">
> </person>
> <person name="sally">
>  <car color="blue">
>  <car color="yellow">
>  <car color="red">
> </person>
> and I can't have this key :
> <xs:key name="test">
>  <xs:selector xpath="person"/>
>  <xs:field xpath="@name"/>
>  <xs:field xpath="car/@color"/>
> </xs:key>

Do you mean that you want the key for the first person to be
<'bob','blue'> and the key for the second person <'sally','blue'>?

This would be possible if the following key definition were allowed

<xs:key name="test">
 <xs:selector xpath="person"/>
 <xs:field xpath="@name"/>
 <xs:field xpath="car[1]/@color"/>

But as things stand that's not allowd.

Feel free to send a suggestion for a 1.1 or 2.0 requirement to

  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 Thursday, 6 March 2003 11:08:03 GMT

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