Project

General

Profile

Actions

Bug #2520

closed

XML Doesn't validate: DateTime invalid

Added by Michael Lee about 18 years ago. Updated about 18 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
userLoad
Target version:
Start date:
08/24/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2520

Description

In our XML stream, we have tons of date fields that are now being output like so:

<observation.obsStartDate>2001-10-24 01:00:00-06</observation.obsStartDate>

but we need to make them XML conformant, i.e. like this:
<observation.obsStartDate>2001-10-24T01:00:00-06:00</observation.obsStartDate>

which matches the pattern:
\-?([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9])\-(0[1-9])|(1[0-2])\-(0[1-9])([12][0-9])|(301)
T(([01][0-9])|(2[0-3]):[0-5][0-9]:([0-5][0-9])(\.[0-9]+)?)|(24:00:00(\.0+)?)
([+\-](0[0-9])|(1[0-4]):[0-5][0-9])?

as specified by w3.org:
http://www.w3.org/TR/xmlschema11-2/#dateTime

I don't know if other fields fail to validate, it's unlikely that other are wrong as other data types are more compatible.

Actions #1

Updated by Chad Berkley about 18 years ago

Fixed this bug in the xsl stylesheet that generates the java code for the beans. the date is now xml compliant.

Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 2520

Actions

Also available in: Atom PDF