Re: Is <pattern value="(.)+\.(gif|jpg|jpeg|bmp)"/> allowed?

Ross,

Actually, it can be more succinctly represented as:
  ".+"
because "." will match the rest of the pattern string.

My point is:
  For the particles, they are subject to ambiguity constraints (
  Unique Attribution ($3.8.6)).  For example, if an instance
   element could match either an explicit particle and a wildcard
   that model is in error.

Do we have something similar to Unique Attribution for patterns?
In my original posting, there was a typo.  The better specification
is
   <pattern value="[^\.]+\.(gif|jpg|jpeg|bmp)"/>

which is not ambiguous.  And I don't think most of the schema
processor will try to roll back and find a better matching as described
in Kongyi's response!

-Stanley

Ross Thompson wrote:

> Stanley Guan writes:
>  > Hi,
>  >
>  > Please see the following discussions for details.  But, is the
>  > following regular expression allowed?
>  >     <pattern value="(.)+\.(gif|jpg|jpeg|bmp)"/>
>
> Yes it's allowed.  It could be expressed slightly more simply as
>
>     <pattern value=".+\.(gif|jpg|jpeg|bmp)"/>
>
> which is exactly equivalent.
>
> - Ross
>
> ---
> Withough 'g-o-d', 'good' would be 'o'   -- unknown

Received on Wednesday, 17 October 2001 14:34:28 UTC