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 in the x

[ Lists Home | Date Index | Thread Index ]

This spec is written very confusing

 

Selector

 

[1]   

Selector

   ::=   

Path ( '|' Path )*

 

[2]   

Path

   ::=   

('.//')? Step ( '/' Step )*

 

[3]   

Step

   ::=   

'.' | NameTest

 

[4]   

NameTest

   ::=   

QName | '*' | NCName ':' '*'

 

 

Field

 

[5]   

Path

   ::=   

('.//')? ( Step '/' )* ( Step | '@' NameTest )

 

 

Schema Component Constraint: Fields Value OK

All of the following must be true:

   1 Each member of the {fields} must be a valid XPath expression, as defined in [XPath].

   2 One of the following must be true:

   2.1 It must conform to the extended BNF given above for Selector, with the following                 modification:

 

My interpretation is for field, just change the Path definition that was used in the Selector definition

 

So. Field becomes:

 

Field

   ::=   

Path ( '|' Path)*

 

[2]   

Path

   ::=   

('.//')? ( Step '/' )* ( Step | '@' NameTest )

 

[3]   

Step

   ::=   

'.' | NameTest

 

[4]   

NameTest

   ::=   

QName | '*' | NCName ':' '*'

 

 

 

XMLSpy treats it this way. ( Or so I believe, based on my testing. )

 

 

Bill Riegel

LandMark Graphics

713-839-3388

 

-----Original Message-----
From: Chiusano Joseph [mailto:chiusano_joseph@bah.com]
Sent: Tuesday, May 20, 2003 12:44 PM
To: Murali Mani
Cc: Jeff Lowery; 'Bill Riegel'; 'xml-dev@lists.xml.org'
Subject: Re: [xml-dev] having problems with the "|" in field's element in the xs:key el ement

 

Oh, I see now - please disregard my last e-mail. Thanks for putting me

on the "path" to enlightenment. :)

 

Murali Mani wrote:

>

> that is correct, if you see

> http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint

>

> it says selector can include |, but field cannot include |. This is to be

> expected, right?, from what is the general principle: any path expression

> in the field should return one and exactly one value.

>

> cheers and regards - murali.

>

> On Tue, 20 May 2003, Jeff Lowery wrote:

>

> > Not for the field XPaths.  If the OR's not in single quotes ('|'), then it's

> > part of the BNF grammar, not part of the XPath grammer.

> >

> > > -----Original Message-----

> > > From: Bill Riegel [mailto:BRiegel@lgc.com]

> >

> > > This list the "|" has a valid option.

> >

> > -----------------------------------------------------------------

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

> >

>

> -----------------------------------------------------------------

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





 

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

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