- From: Abdalhmed Maran <Abdalhmed.Maran@supelec.fr>
- Date: Mon, 5 Nov 2001 05:18:43 -0500 (EST)
- To: xmlschema-dev@w3.org
Hi I need some help about <key> and <keyref> constructs. The situation is the following, may be that the syntax is not exact but it explains the problem ; <element name='A'> <complexType> <attribute name='a' type='string'/> </complexType> <key name='KEYa'> <selector xpath='.//A'/> <!-- to select the element A --> <field xpath='@a'/> <!-- to select the attribute a --> <key> <keyref name='RefToKEYb' refer='KEYb'> <selector xpath='.//A'/> <!-- to select the element A --> <field xpath='@a'/> <!-- to select the attribute a --> <key> </element> <element name='B'> <complexType> <attribute name='b' type='string'/> </complexType> <key name='KEYb'> <selector xpath='.//B'/> <!-- to select the element B --> <field xpath='@b'/> <!-- to select the attribute b --> <key> <keyref name='RefToKEYa' refer='KEYa'> <selector xpath='.//B'/> <!-- to select the element B --> <field xpath='@b'/> <!-- to select the attribute b --> <key> </element> May this schema be valid? Can a key reference another one and in the same time being referenced by the second key? May be that it is not so interesting when the key is just an attribute of type string but the case is different when the key is composed of different attributes and elements. Thanks a lot. Any help is wellcome Hamid Maran
Received on Monday, 5 November 2001 05:30:08 UTC