W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2002

Pattern matching (XSV vs. Xerces)

From: Stanley Guan <stanley.guan@oracle.com>
Date: Tue, 3 Dec 2002 10:52:48 -0800
Message-ID: <175701c29afd$2e71ab80$c5b42382@us.oracle.com>
To: <xmlschema-dev@w3.org>
Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, "Kongyi Zhou" <Kongyi.Zhou@oracle.com>
Given the following element definition

         <element name ="Path2" minOccurs="0" maxOccurs="unbounded">

           <simpleType>

             <restriction base ="string">

               <pattern value="(\.//)?((child::)?((\i\c*:)?(\i\c*|\*)))|\."/>

              </restriction>

           </simpleType>

         </element>
and an element in an instance document
         <Path2>.//.</Path2>


XSV thinks this is valid.  But, Xerces thinks this is invalid.  In my opinion,
Xerces is right because '|' has the lowest precedence.  Am I right?

Thx,

-Stanley
Received on Tuesday, 3 December 2002 13:56:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT