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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] having problems with the "|" in field's element inthe xs:

[ Lists Home | Date Index | Thread Index ]

The use of the "|" (union) operator is valid in the xs:field element, as
the contents of this field must be a valid XPath expression (and "|" is
a component of a valid XPath expression).

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton

Murali Mani wrote:
> 
> my broad understanding is:
> 
> W3C XML-Schema requires that each field expression return one and exactly
> one value.
> 
> If we use | it may not be able to ensure this. I would assume that | is
> not allowed to be part of field..
> 
> Hopefully others well versed with the spec well will answer..
> 
> regards - murali.
> 
> On Tue, 20 May 2003, Bill Riegel wrote:
> 
> >
> >    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
> > <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
> > <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
> >
> >
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
begin:vcard 
n:Chiusano;Joseph
tel;work:(703) 902-6923
x-mozilla-html:FALSE
url:www.bah.com
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
version:2.1
email;internet:chiusano_joseph@bah.com
title:Senior Consultant
fn:Joseph M. Chiusano
end:vcard




 

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

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