[Xml-compile] Possible xsd duration validation problem

Mark Overmeer mark at overmeer.net
Sun Apr 25 08:37:29 GMT 2010


* Robin V. (robinsp at gmail.com) [100424 19:35]:
> It looks like x:s validation rejects PT5M as an invalid duration but
> according to wikipedia page on ISO 8601, PT5M is needed to
> disambiguate from P5M which could mean 5 minutes or 5 months.

True.
I have no idea (yet) why this string does not match

   'PT5M' =~ m/^\-?P(?:\d+Y)?(?:\d+M)?(?:\d+D)?
      (?:T(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d+)?)S)?$/x

anyone?
-- 
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list