xs field,what is xs field,xs 650,xs 650 problems,xs choice duplicate,stylus problems with 650,dstype, xml%%%xs field - Re: having problems with the "

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

Re: having problems with the "|" in field's element in the xs


xs field
Your basic approach is fine.  There are various minor errors in your
schema, and of course it was incomplete.  If I fix all that (see
below), XSV is happy with your instance, and correctly finds an error
if I change the content of the 2nd pickSurfName so it's the same as
the first:

  <invalid char="9" code="cvc-identity-constraint.2.2.3" line="13"
    resource="keyOr.xml">duplicate key (1L, u'LGC', u'C SAND') for
 {http://www.lgc.com/schema/OpenWorksData/2003}Pick_InHierarchy_Key_Definition,
 first appearance was in unnamed entity at line 4 char 9 of keyOr.xml</invalid>

ht

<?xml version='1.0'?>
<xs:schema xmlns:targetns="http://www.lgc.com/schema/OpenWorksData/2003"
 targetNamespace="http://www.lgc.com/schema/OpenWorksData/2003"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified">

 <xs:element name="PickData" type="targetns:PickData_Type">
   <xs:key name="Pick_InHierarchy_Key_Definition">
    <xs:selector xpath="targetns:Pick"/>
    <xs:field xpath="targetns:pickObsNo"/>
    <xs:field xpath="targetns:DataSrc/targetns:id|targetns:DataSrcRef/targetns:id"/>
    <xs:field xpath="targetns:VcPickSurfName/targetns:pickSurfName"/>
   </xs:key>
  </xs:element>

  <xs:complexType name="PickData_Type">
   <xs:sequence maxOccurs="unbounded">
    <xs:element name="Pick">
     <xs:complexType>
      <xs:sequence>
       <xs:element name="pickObsNo" type="xs:integer"/>
       <xs:choice>
        <xs:element name="DataSrc" type="targetns:DSType"/>
        <xs:element name="DataSrcRef" type="targetns:DSType"/>
       </xs:choice>
       <xs:element name="VcPickSurfName">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="pickSurfName" type="xs:token"/>
         </xs:sequence>
         <xs:attribute name="relationship" type="xs:NCName"/>
        </xs:complexType>
       </xs:element>
      </xs:sequence>  
     </xs:complexType>
    </xs:element>
   </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DSType">
   <xs:sequence>
    <xs:element name="id" type="xs:NCName"/>
   </xs:sequence>
   <xs:attribute name="relationship" type="xs:NCName"/>
  </xs:complexType>
</xs:schema>

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
    Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
     Fax: (44) 131 650-4587, e-mail: ht@c...
 URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.