- From: David Carlisle <davidc@nag.co.uk>
- Date: Wed, 26 Mar 2003 10:27:15 GMT
- 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: http://www.w3.org/TR/xmlschema-2/#nt-SingleCharEsc But ... The BNF for Char http://www.w3.org/TR/xmlschema-2/#nt-Char is Char ::= [^.\?*+()|#x5B#x5D] ie every XML character except .\?*+()|[]. However in the text a paragraph or so above this, meta characters are defined http://www.w3.org/TR/xmlschema-2/#dt-metac as a metacharacter is either ., \, ?, *, +, {, } (, ), [ or ]. and http://www.w3.org/TR/xmlschema-2/#dt-normalc 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? David ________________________________________________________________________ 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: http://www.star.net.uk ________________________________________________________________________
Received on Wednesday, 26 March 2003 05:27:46 UTC