[Home] [By Thread] [By Date] [Recent Entries]

  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Subject: RE: having problems with the "|" in field's element in the xs:key el ement
  • From: Bill Riegel <BRiegel@l...>
  • Date: Wed, 21 May 2003 14:04:53 -0500

This spec is written very confusing

 

Selector

 

[1]   

Selector

   ::=   

http://www.w3.org/TR/xmlschema-1/#Path#Path ( '|' http://www.w3.org/TR/xmlschema-1/#Path#Path )*

 

[2]   

Path

   ::=   

('.//')? http://www.w3.org/TR/xmlschema-1/#Step#Step ( '/' http://www.w3.org/TR/xmlschema-1/#Step#Step )*

 

[3]   

Step

   ::=   

'.' | http://www.w3.org/TR/xmlschema-1/#NameTest#NameTest

 

[4]   

NameTest

   ::=   

http://www.w3.org/TR/REC-xml-names/#NT-QName | '*' | http://www.w3.org/TR/REC-xml-names/#NT-NCName ':' '*'

 

 

Field

 

[5]   

Path

   ::=   

('.//')? ( http://www.w3.org/TR/xmlschema-1/#Step#Step '/' )* ( http://www.w3.org/TR/xmlschema-1/#Step#Step | '@' http://www.w3.org/TR/xmlschema-1/#NameTest#NameTest )

 

 

Schema Component Constraint: Fields Value OK

All of the following must be true:

   1 Each member of the http://www.w3.org/TR/xmlschema-1/#fields#fields must be a valid XPath expression, as defined in http://www.w3.org/TR/xmlschema-1/#bib-xpath#bib-xpath.

   2 One of the following must be true:

   2.1 It must conform to the extended BNF given above for http://www.w3.org/TR/xmlschema-1/#Selector#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

   ::=   

http://www.w3.org/TR/xmlschema-1/#Path#Path ( '|' http://www.w3.org/TR/xmlschema-1/#Path#Path)*

 

[2]   

Path

   ::=   

('.//')? ( http://www.w3.org/TR/xmlschema-1/#Step#Step '/' )* ( http://www.w3.org/TR/xmlschema-1/#Step#Step | '@' http://www.w3.org/TR/xmlschema-1/#NameTest#NameTest )

 

[3]   

Step

   ::=   

'.' | http://www.w3.org/TR/xmlschema-1/#NameTest#NameTest

 

[4]   

NameTest

   ::=   

http://www.w3.org/TR/REC-xml-names/#NT-QName | '*' | http://www.w3.org/TR/REC-xml-names/#NT-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@b...]
Sent: Tuesday, May 20, 2003 12:44 PM
To: Murali Mani
Cc: Jeff Lowery; 'Bill Riegel'; 'xml-dev@l...'
Subject: Re: 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@l...]

> >

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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member