Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Time wihtout Seconds [Thread Next] Re: Time wihtout SecondsTo: "Rowan Sylvester-Bradley" <rowan@-----------------.---> Date: 10/13/2008 7:13:00 PM
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@s...> 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
From petexmldev@c... Mon Oct 13 08:31:03 2008
Received: from maggie.w3 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
