[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: simpleType hh:mm:ss:ff

  • From: Bob Kline <bkline@r...>
  • To: =?UNKNOWN?Q?Jos=E9?= Manuel Beas <jmbeas@t...>
  • Date: Mon, 22 Jan 2001 08:43:00 -0500 (EST)

define hh mm ss
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@r...
http://www.rksystems.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.