xml schema ENGINE="xs:date"

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

  • Creator
    Topic
  • #54223
    shikher arya1
    Participant

      I am using xml schema at Outbound thread that has a date element ‘METER_DATE’ specified as ENGINE=”xs:date”. Which format is it suppose to expect?

      The incoming datetime variable is 2014-04-20T08:46:45Z which I am converting to date format at xlate pre-proc using :

      set var [lindex $xlateInVals 0];

      set part [string range $var 0 [expr {[string first “T” $var] -1 }]]

      echo “>>$part”

      set xlateOutVals [clock format [clock scan $part] -format {%Y-%m-%d}]

      But CL is producing error:

      Warning: The format of source value ‘2014-04-20’ is inconsistent with its type: ‘xmlts’

      [0:TEST] Message encode warnings: Error generated during parsing. – Element ‘METER_DATE’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 914

      Output validation errors: Error generated during parsing. – Element ‘METER_DATE’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 914

      [0:TEST] Error generated during parsing. – Element ‘METER_DATE’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 914

      XML Error Source – Message Body for  mid [0.0.1]

      1:’ER_NAME>ADX0142568.000000<'

    Viewing 2 reply threads
    • Author
      Replies
      • #80633
        Charlie Bursell
        Participant

          IAW W3C the Date type is defined:  http://www.w3schools.com/schema/schema_dtypes_date.asp

          Date Data Type

          The date data type is used to specify a date.

          The date is specified in the following form “YYYY-MM-DD” where:

        • #80634
          shikher arya1
          Participant

            Thanks for the info Charlie.

            The incoming XML tag has ENGINE=xs:dateTime and value is like this:

            2014-04-20T08:46:45Z

            I just want to get the date into the OB tag which has xs:date type in schema definition.

            I am using the xlate pre proc and getting the error message as mentioned above.

          • #80635
            Charlie Bursell
            Participant

              The web site I referenced should help you

              Note the message:”The format of source value ‘2014-04-20’ is inconsistent with its type: ‘xmlts'”

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