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

RE: Regex for QNames

From: Michael Kay <mike@saxonica.com>
Date: Fri, 9 Feb 2007 12:38:13 -0000
To: "'Florent Georges'" <darkman_spam@yahoo.fr>, <xmlschema-dev@w3.org>
Message-ID: <009801c74c47$2a8d22b0$6401a8c0@turtle>
RE: Regex for QNames

> 
>   I need the regular expression for a QName.  From §F.1 
> Character Classes [WXS-2] 
> (http://www.w3.org/TR/xmlschema-2/#charcter-classes),
> I thought the following would be correct:
> 
>     [\i-:][\c-:]*:[\i-:][\c-:]*
> 

I think you're trying to use "-" here for subtraction. For that you need the
second operand to be in square brackets:

[\i-[:]][\c-[:]]*

Otherwise it's interpreted as a range, like [a-z], and it's not a valid
range because \i represents a character class rather than a single
character.


Michael Kay
http://www.saxonica.com/
Received on Friday, 9 February 2007 12:38:25 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.