W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

{ characters in regexp in schema spec (part 2)

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 26 Mar 2003 10:27:15 GMT
Message-Id: <200303261027.KAA29190@penguin.nag.co.uk>
To: xmlschema-dev@w3.org

Can I use { to denote itself in a regexp if it is in a context that
isn't part of the {} occurrence syntax? Or do I have to use \{ ?

Some tools seem to allow it but other tools have objected so I got round
to reading the spec....

I'm certainly _allowed_ to (and probably should) use \{ as it is listed
here as a single character escape: 

But ...

The BNF for Char
  Char    ::=    [^.\?*+()|#x5B#x5D]  
ie every XML character except .\?*+()|[].

in the text a paragraph or so above this, meta characters are defined
a metacharacter is either ., \, ?, *, +, {, } (, ), [ or ]. 

Normal characters are defined as 
A normal character is any XML character that is not a metacharacter

So note that "normal Characters" are characters meeting the Char
production with the _exception_ of { and }

So it seems to me that according to the BNF, { and } may be used as
atoms, as they match Char, however according to the prose they may not
as they are not "normal Characters".

Is the spec contradictory here or am I just confused?


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Wednesday, 26 March 2003 05:27:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:00 UTC