xs key,dataset xs key,atom datasrc,dataset datasrc,xs field,datasrc,xml xs key element,having relationship problems, xml%%%xs key - having problems with the "

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

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

  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Subject: having problems with the "|" in field's element in the xs:key element
  • From: Bill Riegel <BRiegel@l...>
  • Date: Tue, 20 May 2003 11:46:12 -0500

xs key

    

   Using Xerces 2.4,

   My intension is to define a unique key from the PickData level. Should

   Keys are

            Pick/pickObsNo

            Pick/DataSrc/id or Pick/DataSrcRef/id

            Pick/VcPickSurfName/pickSurfName

 

 

  Parser fails; complains my constraint failed. If I have a DataSrc in one Pick and a DataSrcRef in the other.  

 

       Parser Error: Not enough values specified for <key name="Pick_InHierarchy_Key_Definition"> identity constraint specified for element "PickData".

 

 

 If I have a DataSrc in both Picks, all is ok.

 

 

 Is the "|" an or ?

 Can I use the "|" in this way.

 

 

   <xs:schema  xmlns:targetns=http://www.lgc.com/schema/OpenWorksData/2003 >

 

   <xs:element name="PickData" type="PickData_Type" minOccurs="0">

            <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:schema

 

    instance document

 

    <DataSet xmlns=http://www.lgc.com/schema/OpenWorksData/2003>

 

     <PickData>

        <Pick>

          <pickObsNo>1</pickObsNo>

          <DataSrc relationship="pickBy">

            <id>LGC</id>

          </DataSrc>

          <VcPickSurfName relationship="pickName">

            <pickSurfName>C SAND</pickSurfName>

          </VcPickSurfName>

        </Pick>

        <Pick>

          <pickObsNo>1</pickObsNo>

          <DataSrcRef relationship="pickBy">

            <id>LGC</id>

          </DataSrcRef>

          <VcPickSurfName relationship="pickName">

            <pickSurfName>BASE-POROSITY-C SAND</pickSurfName>

          </VcPickSurfName>

        </Pick>

      </PickData>

  </DataSet>       

 

Bill Riegel

LandMark Graphics

713-839-3388

 


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.