XML schema ENGINE="xs:date"

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf XML schema ENGINE="xs:date"

  • Creator
    Topic
  • #52501
    Karen Newlove
    Participant

    When useing a schema that has date elements specified as ENGINE=”xs:date” which format will CL expect it to be?

    The schema reference for xs is xmlns:xs=”http://www.w3.org/2001/XMLSchema“.

    When having a date element with timezone like 2011-05-33+02:00 CL put the following error in the err log:

    [xlt :xlat:ERR /0:meddis_pas_xlate:05/24/2011 13:44:59] [0.0.69894023] Xlate ‘XDIS20toMEDDIS.xlt’ failed: Input validation errors: Error generated during parsing. – Element ‘Date’ got Datatype error, Type:SchemaDateTimeException, Message:TimeZone is expected ! ‘2011-05-13?02?00’ . – Line 1, Col 339

Viewing 1 reply thread
  • Author
    Replies
    • #74475
      Levy Lazarre
      Participant

      Karen,

      It appears that the parser is trying to read an ISO 8601 point-in-time specification in the following format:

      YYYY-MM-DDThh:mmTZ (where TZ is the time zone designator)

      Since your date string did not provide hours and minutes (hh:mm), the parser grabbed the time zone designator (+02:00) as the hours, minutes and then complained that the time zone was missing!

      If Tcl is the parser, you have a problem.

      Even if you managed to add the time as 00:00, it still wouldn’t work because the string would not be scanable by the ‘clock’ command in Tcl 8.4 (Cloverleaf).

      In Tcl 8.5, the ‘clock scan’ command has a new ‘-format’ option that would allow you to do:

      set date “2011-05-13 +02:00”

      set s [clock scan $date -format {%Y-%m-%d %Z}]

      puts $s

      Since this option is not available in Tcl 8.4, I believe that the best way to resolve your issue is to drop the time zone (+02:00) in your dates, if it is

      acceptable in your situation.

    • #74476
      Karen Newlove
      Participant

      Levy,

      Thanks for your reply and suggestion.

      😀

Viewing 1 reply thread
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10