Mohamed hi
> In 5.1.4 Extended regular expressions
>
> Please precise that "name" is a NCName or may be a QName ?
NCName I think. I can't see a use for a QName here?
> == Regex ==
>
> A bunch of issues :
> what happen if we do
>
> 1) (?'a'[0-9](?'b'[0-9]+)) against '098' (a inside b)
>
> 2) (?'a'[0-9]*(?'b'[0-9]+)) against '098' (a inside b
> with tricky boundaries)
>
> 3) (?'a'[0-9](?'a'[0-9]+)) against '098' (a inside a)
I think the way it works is that the validator will simply associate the
value of the match with the name of the group, irrespective of whether
it's nested (I can't see that nested groups make much sense in DTLL
regexps). So,
(1) $a="098" and $b="98"
(2) Depends on the regex engine's greediness (does the Schema rec spell
this out?). Normally in order to match the 'b' group I'd expect the
engine to unmatch the final '8' from previous match, so: $a="098" and
$b="8".
(3) It should be an error (I suggest) to duplicate group names in an
extended regex.
> 4) <list
> separator="\s*,\s*"><datatype><regex>[0-9]+</regex></datatype>
> </list> against " , , 123, , 234, , 456, , " (empty values
> not allowed by regex)
In this case I'd make the separator "," set the @ignore-regex-whitespace
attribute to "true" on the type, and make the matching regex [0-9]* (if
I wanted to allow empty values).
> 5) <list
> separator="\s*,\s*"><datatype><regex>[0-9]*</regex></datatype>
> </list> against " , , 123, , 234, , 456, , " (empty values
> allowed by regex)
As above.
> 6) <list
> separator="[0-9]*\s*,\s*[0-9]*"><datatype><regex>[0-9]+</regex
> ></datatype></list> against "123, 234, 456" (separator
> conflict with content)
The validator would report the candidate type as invalid, because it is
entirely consumed by the separator expression, leaving nothing to match
against the list item candidates.
In general, I think we have to accept that there's lots of potential for
GIGO when using regexs ...
> Please tell me if you have any idea of the schedule for me to
> join the discussiong by skype
As Martin has mentioned it'll be horribly early or horribly late!
Hope to speak soon,
- Alex.
-- DSDL comments To unsubscribe, please send a message with the command "unsubscribe" to dsdl-comment-request@dsdl.org (mailto:dsdl-comment-request@dsdl.org?Subject=unsubscribe)Received on Tue Dec 4 11:50:53 2007
This archive was generated by hypermail 2.1.8 : Tue Dec 04 2007 - 12:38:03 UTC