Re: [xml] Pattern contstraints in XML Schema (escaping period in character groups)

On Mon, Nov 19, 2007 at 09:32:02AM -0500, Andrew Tosh wrote:

   Hi All,
   Does  anyone  have any input on this?  I've used several other regular
   expression  engines,  and  they  treat '.' within a character group as
   representing a literal '.' character, not "all characters".
   The XML Schema specification states
   ([1]      that     a
   posCharGroup is:

   [14]    posCharGroup    ::=    ( [2]charRange | [3]charClassEsc )+

   '.'  is  a  valid  charRange.   Shouldn't it be considered a charRange
   rather  than a charClassEsc since it matches on charRange and the rest
   of the posCharGroup parses successfully?

 Resurrecting that old thread,
  "All XML characters are valid character ranges, except as follows:"
and only []^- are listed so you are right in that case . must be interpreted
as the character value in the context of a character range.
I got your test case, your patch, reproduced the problem, and ran regressions
tests with and without it. The patch looks fine to me (change to 
xmlFAParsePosCharGroup to avoid breaking on the '.' character),

  So I applied your patch, added the test to the regression suite and commited
to SVN,

  thanks a lot, and sorry for the delay !


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]