Organisation for Economic Co-operation and Development - OECD SMF-STF Bridge - Technical manual Version 1.0 Status working document internal version subject to acceptance approved X SMF-STF Bridge - Technical manual OECD LISTE OF MODIFICATIONS Date Author Version Nature 20 March 2008 16 May 2008 16 July 2008 E. Rillaerts E. Rillaerts E. Rillaerts 0.1 0.2 0.3 6 October 2008 20 January 2011 E. Rillaerts E. Tassenoy 0.4 1.0 Created Global updated Added section 4.3. STF Validation Updated section 3 Update to version 1.0 REFERENCE LIST OECD-SMF-Manual: TIES - Tax Information Exchange System Manual. OECD: Manual on the implementation of exchange of information provisions for tax purposes. The OECD Standard Transmission Format for international information exchange in taxation An introduction Document name Date/Version Page 81914519 7/31/2017/ 0.4 2/8 SMF-STF Bridge - Technical manual OECD TABLE OF CONTENTS 1. INTRODUCTION ........................................................................................................................... 4 1.1. SUBJECT OF THE DOCUMENT .................................................................................................... 4 1.2. DEFINITIONS AND ABBREVIATIONS.............................................................................................. 4 2. STF XML SCHEMA ....................................................................................................................... 5 2.1. 3. XML SCHEMA (XSD) ................................................................................................................ 5 XML VALIDATION ........................................................................................................................ 6 3.1. VALIDATION USING XML PARSERS ............................................................................................. 6 3.2. VALIDATION USING STANDALONE AND WEB-BASED TOOLS........................................................... 6 4. OECD BRIDGE.............................................................................................................................. 7 4.1. PREPARATION PHASE................................................................................................................ 7 4.2. XSL TRANSFORMATION ............................................................................................................ 7 4.3. STF VALIDATION....................................................................................................................... 8 Document name Date/Version Page 81914519 7/31/2017/ 0.4 3/8 SMF-STF Bridge - Technical manual OECD 1. INTRODUCTION 1.1. SUBJECT OF THE DOCUMENT This document gives on overview of the different technical aspects related to the SMF-STF bridge. 1.2. DEFINITIONS AND ABBREVIATIONS SMF : STF : Standard Magnetic Format Standard Transmission Format for international information exchange in taxation. Document name Date/Version Page 81914519 7/31/2017/ 0.4 4/8 SMF-STF Bridge - Technical manual OECD 2. STF XML SCHEMA The STF XML schema describes the structure of a STF XML document. The schema representing the root element is defined in the xsd file stfdirect-2.1.xsd. This schema contains the STF_OECD element, the root element of an STF XML document. This element is in fact a complex type that contains a MessageSpec element and one or more STF_DIRECT elements. The STF_DIRECT element is a complex type that has several child elements of a specific type. The definition of these different types can be found in the xsd file stftypes-2.1.xsd. Other schema definitions can be found in isotypes_v2.1.xsd, oecdtypes_v1.xsd and specifictypes_v2.xsd. More information on the STF schema can be found in the document STFexplained-1.0a.doc - The OECD Standard Transmission Format for international information exchange in taxation - An introduction and STFexpl-1.0-app3-tecdocu.doc - The different schema elements in detail. Following chapter explains what an XML schema is. 2.1. XML SCHEMA (XSD) An XML Schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). An XML Schema instance typically has the filename extension ".xsd". XML Schema is an XML-based representation of the structure of an XML document. XSD provides the syntax and defines a way in which elements and attributes can be represented in a XML document. It also advocates that the given XML document should be of a specific format and specific data type. The XML Schema data model includes: the vocabulary (element and attribute names) the content model (relationships and structure) the data types. XSD is fully recommended by W3C consortium as a standard for defining an XML Document. To know more about latest information on XSD, please refer the W3C site (www.w3.org). Document name Date/Version Page 81914519 7/31/2017/ 0.4 5/8 SMF-STF Bridge - Technical manual OECD 3. XML VALIDATION A STF document should be well-formed and valid according to the STF XML schema. A XML Schema consists of a set of rules to which an XML document must conform in order to be considered 'valid' according to that schema. The process of checking to see if an XML document conforms to a schema is called validation, which is separate from XML's core concept of syntactic well-formedness. All XML documents must be wellformed, but it is not required that a document be valid unless the XML parser is "validating," in which case the document is also checked for conformance with its associated schema. Documents are only considered valid if they satisfy the requirements of the schema with which they have been associated. XML Schema validations can be effectively performed using specialized parsers like SAX, DOM and different open source and commercial standalone and web-based tools. The Bridge tool uses the SAX parser that is provided with the JAVA runtime. 3.1. VALIDATION USING XML PARSERS Several XML parsers are able to validate the parsed XML against an XML schema. Examples are implementations of the SAX (Simple API for XML) and DOM (Document Object Model) parser API, like Xerces (available in Java and C++) and Saxon. 3.2. VALIDATION USING STANDALONE AND WEB-BASED TOOLS A few examples of tools providing XML validation. XSV (XML Schema Validator) is an open source schema-aware processor. See http://www.w3.org/2001/03/webdata/xsv, http://www.ltg.ed.ac.uk/~ht/xsv-status.html. Commercial XML editors like XMLSpy, oXygen, ... Document name Date/Version Page 81914519 7/31/2017/ 0.4 6/8 SMF-STF Bridge - Technical manual OECD 4. OECD BRIDGE The bridge transforms a SMF file into the STF XML format and vice versa. The bridging is performed via an XSL transformation. There are two XSL transformation stylesheets and have the self-explanatory names smf2stf stf2smf The XML file created in the preparation phase (see 4.1) will serve as input for the XSLT transformation of SMF to STF. Transforming STF into SMF does not require preparation, since STF documents are actually XML documents. Chapter 4.2 XSL Transformation explains what an XSL transformation is. For more information about the mapping of the content between the two different formats, please refer to the document “SMF-STF Bridge Transformation”. 4.1. PREPARATION PHASE Bridging is done via an XSL Transformation. As such transformations operate on XML files, a preparatory task is to format the SMF file into an XML file. The transformation XSLT expects the input wrapped by a root element tag “SMFFile” and the individual records content stored into “Record” elements. This conversion is done by a custom parser. This parser read each line (record) of a SMF file and stores it as a « Record » element in the output XML file. Figure 1 - XML Schema of a SMF-XML file 4.2. XSL TRANSFORMATION Extensible Stylesheet Language Transformations (XSLT) is a language that lets you convert XML documents into something else. That something else can be another XML document, a HTML document, flat text file or almost anything you like. When you specify a series of XSLT instructions for converting a class of XML documents, you do so by creating a “stylesheet,” an XML document that uses specialized XML elements and attributes that describe the changes you want made. The definition of these specialized elements and attributes comes from the World Wide Web Consortium (W3C). Document name Date/Version Page 81914519 7/31/2017/ 0.4 7/8 SMF-STF Bridge - Technical manual OECD The version used in the Bridge Tool is XSLT 1.0. 4.3. STF VALIDATION When a STF is transformed into a SMF file it is first validated against the STF XML schema. The validation is performed by the default SAX parser and the XSL transformation by the XSLT engine provided by Java (J2SE). In java version 1.5 and 1.6 the provided parser is Xerces and the transformer engine is Xalan XSLTC. Java version 1.4 does not provide a XSD validating parser; this is the reason why java version 1.5 or higher is required to run this tool. Document name Date/Version Page 81914519 7/31/2017/ 0.4 8/8
© Copyright 2025 Paperzz