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 name="sally">
 <car color="blue">
 <car color="yellow">
 <car color="red">

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

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


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 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC