OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

    

   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

 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS