Re: ^ should not be allowed by XmlCharIncDash

At 2:16 PM +0900 2009-04-09, MURATA Makoto (FAMILY Given) wrote:
>"[^a]" can be interpreted as a posCharGroup, since
>
>charClassExpr -> '[' charGroup ']'
>   ->  '[' posCharGroup ']'
>   ->  '[' charRange charRange ']'
>   ->  '[' XmlCharIncDash XmlCharIncDash ']'
>   ->  '[' '^' 'a' ']'

There is a constraint immediately following the charGroup production:

>If the first character in a charGroup is '^', this is taken as 
>indicating that the charGroup starts with a negCharGroup. A 
>posCharGroup can itself start with '^' but only when it appears 
>within a negCharGroup, that is, when the '^' is preceded by another 
>'^'.

Good catch.  The constraint should probably be labelled more formally
as a constraint so it won't be overlooked.
-- 
Dave Peterson
SGMLWorks!

davep@iit.edu

Received on Thursday, 9 April 2009 13:59:15 UTC