[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Regex syntax [+-]

From: Michael Kay <mike@saxonica.com>
Date: Fri, 5 Aug 2005 09:07:20 +0100
To: "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <xmlschema-dev@w3.org>
Message-ID: <E1E0xEl-0006bA-5Z@lisa.w3.org>
RE: Regex syntax [+-]

Yes, I know I can write these characters in escaped form, the question is
whether I can write them unescaped. The BNF and the prose seem to disagree
with each other on this point.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Pete Cordell [mailto:petexmldev@tech-know-ware.com] 
> Sent: 05 August 2005 08:09
> To: Michael Kay; xmlschema-dev@w3.org
> Subject: Re: Regex syntax [+-]
> 
> Original Message From: "Michael Kay" <mike@saxonica.com>
> 
> > In particular, what characters are allowed to appear as s 
> and e in a range
> > [s-e]?
> >
> > The production rules say
> >
> > [18]   seRange    ::=   charOrEsc '-' charOrEsc
> > [20]   charOrEsc    ::=   XmlChar | SingleCharEsc
> > [21]   XmlChar    ::=   [^\#x2D#x5B#x5D]
> >
> > which imply that [, ], \, and - are disallowed in both positions.
> 
> I'm not sure if I'm looking at the same version as you 
> (Schema part 2 second 
> edition), but my reading is that the characters [, ], \, and 
> - are covered 
> by the SingleCharEsc production:
> 
>       [24]    SingleCharEsc    ::=    '\' 
> [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]
> 
> 
> So you might end up with something like: [\[-\]]
> 
> Pete.
> --
> =============================================
> Pete Cordell
> Tech-Know-Ware Ltd
>                          for XML to C++ data binding visit
>                          http://www.tech-know-ware.com/lmx
>                          (or http://www.xml2cpp.com)
> =============================================
> 
> 
Received on Friday, 5 August 2005 08:07:34 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.