X-definition

X-definition version 2.0 is the registered technology of Syntea for the work with XML documents

The X-definition is a program tool for describing the structure of XML documents. It is a legible and easy to maintain tool that can be used to create, validate, and process XML documents.

The X-definition is a template that describes the structure, content, and XML document processing. Using X-definitions, you can replace existing technologies used for validation (eg DTD, XML Schema) and even transformation (e.g., XSLT) of XML documents.

X-definitions, as well as the data described, is an XML document whose structure is very similar to the structure of the XML object described. This makes it possible to quickly and more or less intuitively design the corresponding X-definition for a given class of XML documents. The advantage of X-definition is a much simpler way of writing while maintaining flexibility, increasing the clarity and maintainability of these templates.

The X-definition software was designed to handle unlimited size data files. In current projects, XML documents with sizes up to hundreds of GB are processed thanks to X-definitions.

X-definition tutorial, you can find HERE, or you can download it directly HERE.
ATTENTION, 19.6.2018 we released the source code of the X-definition, which is now part of the JAR file placed on our web-site www.xdefinice.cz, in the DOWNLOAD SECTION. If you want to find out more about X-definition, please visit our website www.xdefinice.cz.

Example:
Xml data:

<Nehoda
      id        ="0012"
      casNehody ="2017.05.15T13:45"
      zraneno   ="1"
      usmrceno  ="0"
      skoda     ="345000.00" >
    <SPZ>1A29876</SPZ>
    <SPZ>9B8765</SPZ>
</Nehoda>

X-definition:

<xd:def xmlns:xd    ="https://www.syntea.cz/xdef/2.0"
      xd:name     ="Nehoda"
      xd:root     ="Nehoda">

    <Nehoda
          id        ="required int()"
          casNehody ="required dateTime()"
          zraneno   ="required int()"
          usmrceno  ="required int()"
          skoda     ="required dec()" >
        <SPZ xd:script="occurs 1..">
            required string(6,7)
        </SPZ>
    </Nehoda>
</xd:def>