TIO is a data format used to provide informations about consumption, invoicing and state history.
TioFormat XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Define the XML Schema of a transaction -->
<xs:element name="journal">
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="start_date" type="xs:string"/>
<xs:element name="stop_date" type="xs:string"/>
<xs:element name="reference" type="xs:string"/>
<xs:element name="currency" type="xs:string"/>
<xs:element name="payment_mode" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="arrow" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="destination" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="movement" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="resource" type="xs:string"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:float"/>
<xs:element name="price" type="xs:float"/>
<xs:element name="VAT" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Name | journal |
Type | journal |
Documentation | journal is the root element in the XML file |
Schema Component Representation:
<xs:element name="journal">
Name | journal |
Documentation | Tio document contains transactions |
Schema Component Representation:
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
Name | transaction |
Documentation | transaction contains a title, a start_date, a stop_date, a reference, a currency, a payment mode, some categories, some arrows and a list of movement. |
Schema Component Representation:
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="start_date" type="xs:string"/>
<xs:element name="stop_date" type="xs:string"/>
<xs:element name="reference" type="xs:string"/>
<xs:element name="currency" type="xs:string"/>
<xs:element name="payment_mode" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="arrow" maxOccurs="unbounded">
</xs:element>
<xs:element name="movement" maxOccurs="unbounded">
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
Name | title |
Type | string |
Documentation | title is the name of the transaction |
Schema Component Representation:
<xs:element name="title" type="xs:string" minOccurs="0"/>
Name | start_date |
Type | string |
Documentation | the date at which a service started |
Schema Component Representation:
<xs:element name="start_date" type="xs:string"/>
Name | stop_date |
Type | string |
Documentation | the date at which a service was completed |
Schema Component Representation:
<xs:element name="stop_date" type="xs:string"/>
Name | reference |
Type | string |
Documentation | absolute reference of the transaction |
Schema Component Representation:
<xs:element name="reference" type="xs:string"/>
Name | currency |
Type | string |
Documentation | currency used in the transaction |
Schema Component Representation:
<xs:element name="currency" type="xs:string"/>
Name | payment_mode |
Type | string |
Documentation | payment mode of the transaction |
Schema Component Representation:
<xs:element name="payment_mode" type="xs:string"/>
Name | category |
Type | string |
Documentation | To add your own category section in the transaction |
Schema Component Representation:
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
Name | arrow |
Type | arrow |
Documentation | represents who provided a service to somebody else |
Schema Component Representation:
<xs:element name="arrow" maxOccurs="unbounded">
Name | arrow |
Documentation | contains a source and a destination. |
Schema Component Representation:
<xs:complexType>
<xs:sequence>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="destination" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
Name | source |
Type | string |
Documentation | who provided the service |
Schema Component Representation:
<xs:element name="source" type="xs:string" minOccurs="0"/>
Name | destination |
Type | string |
Documentation | who received the service |
Schema Component Representation:
<xs:element name="destination" type="xs:string" minOccurs="0"/>
Name | movement |
Type | movement |
Documentation | represents how much service exchanged in the transaction |
Schema Component Representation:
<xs:element name="movement" maxOccurs="unbounded">
Name | movement |
Documentation | contains a resource, a title, a reference, a quantity, a price, a VAT and some categories |
Schema Component Representation:
<xs:complexType>
<xs:sequence>
<xs:element name="resource" type="xs:string"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:float"/>
<xs:element name="price" type="xs:float"/>
<xs:element name="VAT" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Name | resource |
Type | string |
Documentation | represents the kind of service provided |
Schema Component Representation:
<xs:element name="resource" type="xs:string"/>
Name | quantity |
Type | float |
Documentation | represents the amount of service exchanged |
Schema Component Representation:
<xs:element name="quantity" type="xs:string"/>
Name | price |
Type | float |
Documentation | represents the price of service exchanged |
Schema Component Representation:
<xs:element name="price" type="xs:string"/>
Name | VAT |
Type | string |
Documentation | represents the VAT of service exchanged |
Schema Component Representation:
<xs:element name="VAT" type="xs:string"/>