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

key problems

From: Olivier B <obernou@yahoo.fr>
Date: Thu, 6 Mar 2003 16:55:50 +0100 (CET)
Message-ID: <20030306155550.57802.qmail@web40802.mail.yahoo.com>
To: xmlschema-dev@w3.org

hi, I've got a problem with keys :

I want to define key for 2 attributes on different levels.
for 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>

but how can I do ?
I thought I could retrieve the first attribute on the
second element, and then I would have 
<car color="yellow" name="jojo"> ? 
but i don't want to do this manually everytime I create a
new object

Olivier

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en franšais !
Yahoo! Mail : http://fr.mail.yahoo.com
Received on Thursday, 6 March 2003 11:02:39 GMT

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