![]() |
|
| Home | About GS1 | Products & Solutions | Services | Sectors | Contact GS1 | ||||||||||||||||||||||||||||||||||||||||
|
XML built-in typesThe XML standard developed by the World Wide Web Consortium (W3C) lists 44 data types that are embedded in the specification. This means that these data types can be used in XML schemas with no need to define them. These data types should be implicitly understood by all the XML-aware software tools. The built-in data types have certain standard facets to represent them in the schema or to restrict their range. In GS1 standards, only a subset of the built-in types is used. Some of the W3C data types have different representation in the Business Message Standards than the standard one used in the schema. This difference is due to the fact that the BMS contains a UML representation of the business document, which is meant to be independent from the syntax to which it will finally be mapped. The list of W3C data types used in GS1 standards, together with their representation in the schema and the BMS is presented below:
W3C data types currently NOT used by GS1:
Handling date and timeFor data elements where time is required, two built-in data-types are used within GS1 XML standards: 'dateTime' and 'time'. The value space of ‘time’ and ‘dateTime’ XSD data types is defined in article 5.3 of ISO 8601, the details can be found at the following links: http://www.w3.org/TR/xmlschema-2/#time As per the value space of ‘time’ and ‘dateTime’, additional fractional seconds (milliseconds) and Time zone information can specified. Use of millisecondsBoth ‘time’ and ‘dateTime’ data types allow use of additional digits increasing the precision of fractional seconds if desired, in the format ss.s. ‘ss.s’ denotes two digits of second (00 through 59) followed by one or more digits representing a decimal fraction of a second (milliseconds). The fractional seconds part is separated from the two digits of second by the use of a ‘dot’ as a separator. Though any number of digits for the fractional seconds is supported, only 3 precision digits should be used within GS1 XML messages to denote the milliseconds. Example 1
Use of time zonesBoth ‘time’ and ‘dateTime’ data types allow specifying the time zone, following the time information. The time zone information for non-UTC times within GS1 System must be expressed by specifying the difference between the local time and UTC. This is indicated by immediately following the time representation by a sign, + or -, followed by the difference from UTC represented as hh:mm (note: the minutes part is required). Example 2
Example 3 A composite example of the XSD data type ‘dateTime’ following the above mentioned guidelines:
|
|||||||||||||||||||||||||||||||||||||||
| Disclaimer/Copyright | Privacy | Sitemap | Contact webmaster | ||||||||||||||||||||||||||||||||||||||||