Le mardi 18 octobre 2005 à 14:34 +0100, Dave Pawson a écrit :
> On 18/10/05, Robin Berjon <[EMAIL PROTECTED]> wrote:
> > On Oct 18, 2005, at 15:03, Eric van der Vlist wrote:
> > > RNG is just borrowing straight from W3C XML Schema facets and WXS
> > > hasn't
> > > included the possibility to add regexp options (other options such
> > > as /i
> > > would be handy)...
>
>
> <data type="token">
> <param
> name="pattern">\d{4}(-((0[1-9])|(1[0-2]))(-(([0-2][1-9])|(3[0-1])))?)?</param>
> <param name='flags'>Pattern.COMMENT</param>
> </data>
>
> I'm ignoring the XSD issue for the moment.
> Does that syntax look OK?
What do you mean by OK?
<param name='flags'>Pattern.COMMENT</param> could have been an option
but this isn't part of the current spec!
Note that you can have several pattern parameters in which case, it
wouldn't have been very clear to which pattern param a flags param
belonged...
In your regexp, you should take care that \d{4} allows any Unicode digit
not only [0-9]. That's why when you derive token datatypes, it's safer
to write [0-9] (if that's what you mean).
The other option is to use a xsd:date instead of token.
And if you want to leave days and months optionals, you can make a
choice between the corresponding WXS datatypes...
Hope this helps.
Eric
>
--
Don't you think all these XML schema languages should work together?
http://dsdl.org
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rng-users/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/