Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Regex syntax [+-]

From: "Michael Kay" <mike@--------.--->
To: "'Pete Cordell'" <petexmldev@--------------.--->, <xmlschema-dev@--.--->
Date: 8/5/2005 10:07:00 AM
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@t...] 
> Sent: 05 August 2005 08:09
> To: Michael Kay; xmlschema-dev@w...
> Subject: Re: Regex syntax [+-]
> 
> Original Message From: "Michael Kay" <mike@s...>
> 
> > 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)
> =============================================
> 
> 



From petexmldev@t... Fri Aug 05 09:13:49 2005
Received: from lisa.w3.or


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent