[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simpleType hh:mm:ss:ff
- From: Bob Kline <bkline@rksystems.com>
- To: =?UNKNOWN?Q?Jos=E9?= Manuel Beas <jmbeas@telenium.es>
- Date: Mon, 22 Jan 2001 08:43:00 -0500 (EST)
On Mon, 22 Jan 2001, [UNKNOWN] José Manuel Beas wrote:
> I need to define an xsd:simpleType to match strings formatted as
> hh:mm:ss:ff (hours,minutes,seconds and frames -between 00 and 24-).
>
> I've defined:
> -------
> <xsd:simpleType name="myTime">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{2}:\d{2}:\d{2}:\d{2}"/>
> </xsd:restriction>
> </xsd:simpleType>
> -------
>
> But with this definition strings like "01:12:75:23" would match, and
> that cannot be accepted.
>
> How should I define this type?
How about "([01]\d|2[0-3]):[0-5]\d:[0-5]\d:([01]\d|2[0-4])"?
--
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com