[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
XSD modelling question


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

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

Let's say, I define this sgKey at 'sgs' element scope
as- 
   Selector= owner
   field=@id
   field=@name
   field=sg/name

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.
    
-D


      ____________________________________________________________________________________
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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.