I am using the following schema construct:
<xs:element name="pubDate" type="tRfc822FormatDate"/> <xs:simpleType name="tRfc822FormatDate"> <xs:restriction base="xs:dateTime"> <xs:pattern value="(((Mon)|(Tue)|(Wed)|(Thu)|(Fri)|(Sat)|(Sun)), *)?\d\d? +((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec)) +\d\d(\d\d)? +\d\d:\d\d(:\d\d)? +(([+-]?\d\d\d\d)|(UT)|(GMT)|(EST)|(EDT)|(CST)|(CDT)|(MST)|(MDT)|(PST)|(PDT)|\w)"/> </xs:restriction> </xs:simpleType>
I get the following error:
The element: 'pubDate' has an invalid value according to its data type.
<pubDate>Sun, 30 March 2003 12:48:13 GMT</pubDate>
If I change the schema to be <xs:restriction base="xs:string"> instead, then of course it works. However in that case, although I get the syntactic validation of the data, I have lost the semantic meaning of the schema type model.
Am I missing something obvious here?
From some items found by a Google search, I don't think so, but an extra 2000 pairs of eyes on a problem always help....
All content is
Copyright (c) 2010 Jorgen Thelin. All rights reserved.
The opinions expressed here represent my own views and not necessarily those of my current, prior or future employer(s).
Content is provided "as-is", without any representations or warrenties of any kind.
Contents of the Weblog Feed are licensed under a Creative Commons License.