Menu

Iso5436_2.xsd Log in to Edit

Dr. Schorsch

This article describes the xml data type definition (xsd) for the ISO5436-2 xml data format used in [X3p]-files.

The header defines the encoding of the file, which is UTF-8 in our case and links the data type definition

<?xml version="1.0" encoding="UTF-8"?>

The schema defines the target name space and includes name spaces that are refered.

<xsd:schema targetNamespace="http://www.opengps.eu/2008/ISO5436_2"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://www.opengps.eu/2008/ISO5436_2"
            elementFormDefault="unqualified">

Root Element

There is only one global element, which is the root element of the document.

<xsd:element name="ISO5436_2" type="ISO5436_2Type"></xsd:element>

Below the root element there are four records as defined in the ISO5436-2 standard. The nodes are named Record1 to Record4. They contain

Record1: Header, datatypes and axes definitions,
Record2: Optional record containing the document's meta data,
Record3: The actual profile data,
Record4: An md5 checksum of this xml-document.

The type definition for the root element defines a sequence of the four records plus a [Vendor_specific_extension_hook] and looks like this:

<xsd:complexType name="ISO5436_2Type">
 <xsd:sequence>
   <xsd:element name="Record1" type="Record1Type" maxOccurs="1" minOccurs="1"></xsd:element>
   <xsd:element name="Record2" type="Record2Type" maxOccurs="1" minOccurs="0"></xsd:element>
   <xsd:element name="Record3" type="Record3Type" maxOccurs="1" minOccurs="1"></xsd:element>
   <xsd:element name="Record4" type="Record4Type" maxOccurs="1" minOccurs="1"></xsd:element>
   <xsd:element name="VendorSpecificID" type="xsd:anyURI" minOccurs="0" maxOccurs="1"></xsd:element>
 </xsd:sequence>
</xsd:complexType>

Record1

Record1 contains the basic definitions for the file contents like revision, file contents and axes definitions.

<xsd:complexType name="Record1Type">

Record1 contains the following sequence:

<xsd:sequence>

Format Revision

The first element defines the revision of the file format used. Currently this is "ISO5436 - 2000".

<xsd:element name="Revision" type="xsd:token" minOccurs="1" maxOccurs="1"></xsd:element>

Feature Type

The next element decides whether the document describes a line profile or a surface. If it contains the string "SUR" it is a surface type feature. The string "PRF" denotes a line profile feature and "PCL" stands for an unordered point cloud. Profile features are always defined as a matrix of size (N,1,M) with

N: being the number of points in the profile and
M: the number of layers in z-direction.

<xsd:element name="FeatureType" maxOccurs="1" minOccurs="1">
 <xsd:simpleType>
  <xsd:restriction base="xsd:token">
   <xsd:whiteSpace value="collapse"></xsd:whiteSpace>
   <xsd:enumeration value="PRF"></xsd:enumeration>
   <xsd:enumeration value="SUR"></xsd:enumeration>
   <xsd:enumeration value="PCL"></xsd:enumeration>
  </xsd:restriction>
 </xsd:simpleType>
</xsd:element></nowiki>

Axes definitions

For each coordinate axis X,Y, and Z there has to be an axis definition:

<xsd:element name="Axes" type="AxesType" maxOccurs="1" minOccurs="1"></xsd:element>

The sequence ends here:

</xsd:sequence>

As well as the definition of Record1Type

</xsd:complexType>

<xsd:complexType name="AxesType">
  <xsd:sequence>
     <xsd:element name="CX" type="AxisDescriptionType" maxOccurs="1" minOccurs="1">
        <xsd:annotation>
           <xsd:documentation>
     Description of X-Axis
    </xsd:documentation>
        </xsd:annotation>
     </xsd:element>
     <xsd:element name="CY" type="AxisDescriptionType" maxOccurs="1" minOccurs="1">
        <xsd:annotation>
           <xsd:documentation>
     Description of Y-Axis
    </xsd:documentation>
        </xsd:annotation>
     </xsd:element>
     <xsd:element name="CZ" type="AxisDescriptionType" maxOccurs="1" minOccurs="1">
        <xsd:annotation>
           <xsd:documentation>
     Description of Z-Axis
    </xsd:documentation>
        </xsd:annotation>
     </xsd:element>
     <xsd:element name="Rotation" type="RotationType" maxOccurs="1" minOccurs="0">
        <xsd:annotation>
           <xsd:documentation>
     An optional rotation of the data points. If this
     element is missing a unit transformation is
     assumed.
    </xsd:documentation>
        </xsd:annotation>
     </xsd:element>
  </xsd:sequence>
</xsd:complexType>

Record2

The type definition for Record2 is a sequence comprising several elements describing the document's meta data. Record2 is optional.

<xsd:complexType name="Record2Type">

The sequence definition

<xsd:sequence>

contains the following elements:

Dataset Creation Time

Date and time of data set creation.

<xsd:element name="Date" type="xsd:dateTime" maxOccurs="1" minOccurs="1"></xsd:element>

Creator's Name

The data set creator's name:

<xsd:element name="Creator" type="xsd:token" maxOccurs="1" minOccurs="0"></xsd:element>

Instrument Description

Description of the measurement instrument used:

<xsd:element name="Instrument" type="InstrumentType" maxOccurs="1" minOccurs="1"></xsd:element>

Calibration Time

The date and time of the current system calibration:

<xsd:element name="CalibrationDate" type="xsd:dateTime" maxOccurs="1" minOccurs="1"></xsd:element>

Probing System Type

The type of the probing system:

<xsd:element name="ProbingSystem" type="ProbingSystemType" maxOccurs="1" minOccurs="1"></xsd:element>

This can be one of "Contacting", "NonContacting" or "Software". The last one is an extension to ISO 5436-2 and should be used for synthetic data sets or software normals.

Comment

A comment string describing the data set:

<xsd:element name="Comment" type="xsd:string" maxOccurs="1" minOccurs="0"></xsd:element>

The end of the sequence and the type definition for Record2

</xsd:sequence>
</xsd:complexType>

Record3

Record3 contains the actual surface or profile data set or - in case of a binary encoding - at least a link to the binary file(s). Record3 is defined as a complex type containing a sequence:

<xsd:complexType name="Record3Type">
<xsd:sequence>

Matrix and List Dimensions

The sequence contains a choice of one of a matrix or list data type. The matrix data type stores the topologic neighbourhood of the data set, the list type stores only an unsorted list of points with an undefined neighbourhood.

<xsd:choice maxOccurs="1" minOccurs="1">

The MatrixDimension element defines the dimensions of a matrix and contains three unsigned integers for the u,v, and w dimension of the data matrix.

<xsd:element name="MatrixDimension" maxOccurs="1" minOccurs="1" type="MatrixDimensionType"></xsd:element>

The ListDimension element is a simple unsigned long integer specifying the length of an unordered data list:

<xsd:element name="ListDimension" type="xsd:unsignedLong" maxOccurs="1" minOccurs="1"></xsd:element>

End of this choice.

</xsd:choice>

The next element in Record3 is a choice containing either a list of 3-d points or a link to a binary data file.

<xsd:choice maxOccurs="1" minOccurs="1">

A DataLink does specify a link to an external file containing a compact binary representation of the profile data:

<xsd:element name="DataLink" type="DataLinkType" maxOccurs="1" minOccurs="1"></xsd:element>

A DataList does contain an ASCII representation of the data values. The data points are ordered with u as the fastest index, v as the second index and w as the slowest index.

<xsd:element name="DataList" type="DataListType" maxOccurs="1" minOccurs="1"></xsd:element>

To clarify the data order see the following example:

Example for index order in DataList

u 1 2 3

v w=1

1
P_1:(x_1,y_1,z_1)
P_2:(x_2,y_1,z_1)
P_3:(x_3,y_1,z_1)

2
P_4:(x_1,y_2,z_1)
P_5:(x_2,y_2,z_1)
P_6:(x_3,y_2,z_1)

w=2

1
P_7:(x_1,y_1,z_2)
P_8:(x_2,y_1,z_2)
P_9:(x_3,y_1,z_2)

2
P_10:(x_1,y_2,z_2)
P_11:(x_2,y_2,z_2)
P_12:(x_3,y_2,z_2)

End of choice and sequence

</xsd:choice>
</xsd:sequence>
</xsd:complexType>

Record4

Record4 contains a link - more precisely an URI - to an md5 digest with a 32 byte hexadecimal md5 checksum. This file looks like the one created by the md5 Unix command line tool for the "main.xml" document. While the URI could point to any resource on the world it is recommended to store the checksum file in the root directory of the container as "md5checksum.hex".

To create the checksum file manually use the command

md5sum main.xml >md5checksum.hex

To check it manually type

md5sum -c md5checksum.hex

The definition of Record4 is provided here:

<xsd:complexType name="Record4Type">
 <xsd:sequence>
   <xsd:element name="ChecksumFile" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
 </xsd:sequence>
</xsd:complexType>

Vendor Specific Extension

This is an extension hook for vendor specific data formats derived from x3p. This tag contains a vendor specific ID which is based on the URL of the vendor. It does not need to be valid but it must be worldwide unique! By using a domain name you own this is guaranteed at least for the lifetime of your domain. Example:

http://www.example-inc.com/myformat

[Category:Programmers_help] [Category:x3p]


Related

Wiki: Main_Page
Wiki: Vendor_specific_extension_hook
Wiki: X3p

Discussion

  • Anonymous

    Anonymous - 2018-10-04

    Hello,
    where can I find the xsd schema?

    Best regards,
    Giacomo

     
  • Dr. Schorsch

    Dr. Schorsch - 2018-10-04

    The XSD-scheme is in the source codes. Latest version that should be identic to ISO 25178-72 standard can be found here:
    https://sourceforge.net/p/open-gps/code/HEAD/tree/ISO5436_XML/branches/Kohler_LinuxPort/src/ISO5436_2_XML/iso5436_2.xsd

     
    • Anonymous

      Anonymous - 2018-10-09

      Thanks a lot! I was trying to get it at the link http://www.opengps.eu/2008/ISO5436_2/ISO5436_2.xsd but it was unavailable.

      Best regards!

       

Anonymous
Anonymous

Add attachments
Cancel