Basic data types

The following general requirements apply to the content and format of basic data types in the XML specification.

xs:string

  • Trim any excess whitespace before or after the string.

  • To aid readability, if you present a lowercase string like tornado warning to end users, then convert the data to title case, when possible. In other words, change tornado warning to Tornado Warning.

  • Don't use unsupported punctuation, and use XML escape characters when appropriate. For example, use & instead of &.

xs:dateTime

Use ISO-8601 format in the form of YYYY-MM-DDThh:mm:ssXzh:zm, defined as follows:

  • YYYY indicates the year.

  • MM indicates the month.

  • DD indicates the day.

  • T indicates the symbol "T" and marks the start of the required time section.

  • hh indicates the hour.

  • mm indicates the minute.

  • ss indicates the second.

  • X indicates one of these symbols:

    • "+" if the preceding date and time are in a time zone ahead of UTC.

    • "-" if the preceding date and time are in a time zone behind UTC, or if the time is in UTC.

  • zh indicates the hours of offset from the preceding date and time to UTC, or 00 if the preceding time is in UTC.

  • zm indicates the minutes of offset from the preceding date and time to UTC, or 00 if the preceding time is in UTC.

As an example, for May 24, 2002 at 16:49 PDT, use 2002-05-24T16:49:00-07:00.

Don't use alphabetic time zone designations like "Z." You must represent the time zone for UTC as -00:00.

xs:language

As described in the CAP standard, represent languages by a valid RFC 3066 identifier. We recommend that you designate only primary language tags in lowercase.

An example is en-US.