W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2007

XSD modelling question

From: dave <ceek63@yahoo.com>
Date: Thu, 6 Dec 2007 11:07:36 -0800 (PST)
To: xmlschema-dev@w3.org
Cc: xml-dev@lists.xml.org
Message-ID: <305559.48751.qm@web38003.mail.mud.yahoo.com>

I need to define the Key constraint that consist of
{@id, @name, sg/name} for the below xml instance-

     <owner id="a" name="b">  <!-- part of sgKey -->
 	  <name>sg1</name> <!-- part of sgKey -->
        <sg> <name>sg2</name> <description/> </sg>
        <sg> <name>sg6</name> <description/> </sg>
        <!-- unbounded list of 'sg' elements -->
     <!-- unbounded list of 'owner' elements -->

Let's say, I define this sgKey at 'sgs' element scope
   Selector= owner

But this would be an invalid Key definition because
there will be Multiple 'sg/name' children for a given
'owner'. How would I define the Key in this situation.

Thanks for the tip.

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Received on Thursday, 6 December 2007 19:14:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:13 UTC