- From: <Noah_Mendelsohn@lotus.com>
- Date: Tue, 11 Apr 2000 18:20:23 -0400
- To: Ani Pedersen <APeders@plexus.ca>
- Cc: www-xml-schema-comments@w3.org
<field> can be repeated to create a multi-field key. I think that's what you need, and "it's in there.". ------------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 Lotus Development Corp. Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------------ Ani Pedersen <APeders@plexus.ca> To: "'www-xml-schema-comments@w3.org'" Sent by: <www-xml-schema-comments@w3.org> www-xml-schema-comments-requ cc: (bcc: Noah Mendelsohn/CAM/Lotus) est@w3.org Subject: Multi-field key 04/11/00 05:22 PM Hello: I have just started digging into XML and I need some help regarding mutiple field keys. The new XML schema - Structures does not give any solution in how to implement multiple field keys. The only comment in section 3.10 is a note that mentions that is not supported by xsl:key. Is there an alternative way of defining multi-field keys? A workaround? Maybe I am missing something? This is an extract of what I anm working on and I need to define two fields as key values (they have to be together). Unfortunately the structure I came up with allows me to indicate that they both should be present and in that order (with group) and that both are keys. However, here I indicate that they are independent keys and I don't want that. Is there a way of restricting this looseness. <element name="primaryCustomer" type="PrimaryCustomer" > <complexType name="PrimaryCustomer"> <element ref="accountNumber" minOccurs = "0"/> ...... <group name = "customerKey" > <sequence> <element ref="customerNumber"/> <element ref="customerSuffix"/> </sequence> </group> </complexType> <key name = "customerNumber" > <selector> customerKey/customerNumber </selector> <field> @name </field> </key> <key name = "customerSuffix" > <selector> customerKey/customerSuffix </selector> <field> @name </field> </key> </element> Thanks for the help. Ani Pedersen
Received on Tuesday, 11 April 2000 18:41:10 UTC