W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2008

Re: Time wihtout Seconds

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Mon, 13 Oct 2008 13:54:45 +0530
Message-ID: <7870f82e0810130124o55ae6472mfc151e6599ed2e44@mail.gmail.com>
To: "Rowan Sylvester-Bradley" <rowan@sylvester-bradley.org>
Cc: xmlschema-dev@w3.org

Please try this,

<xs:element name="time" type="timeType" />

 <xs:simpleType name="timeType">
   <xs:restriction base="xs:string">
     <xs:pattern value="[0-9][0-9]:[0-5][0-9]" />
   </xs:restriction>
 </xs:simpleType>

On Sun, Oct 12, 2008 at 4:12 AM, Rowan Sylvester-Bradley
<rowan@sylvester-bradley.org> wrote:
> How do I write a schema that will validate an element containing a time in
> the format hh:mm (without any seconds)? I'm trying to write a schema for an
> existing XML file that's generated by a piece of software which I have no
> access to, so I can't just add the seconds...
>
> Thanks - Rowan



-- 
Regards,
Mukul Gandhi
Received on Monday, 13 October 2008 08:25:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 March 2009 11:13:42 GMT