|
Page 1 of 11 Overview FSD - Flat Schema Definition Language provides a mechanism for describing the structure of flat data in terms of records, fields and sequences of records. FSD language is based on now widely used XML - Extensible Markup Language standard. Using the FSD, it is possible to describe the structure of flat data in a very a simple and very flexible format understood by SunSystems Transfer Desk ( TD) to convert that data into XML and vice-a-versa.
FSD is XML An FSD document is written in XML. It must therefore meet the normal requirements for being a well-formed XML document (i.e. it must have an XML declaration and a root tag). The XML declaration will look something likes this: <?xml encoding=’UTF8’ version=’1.0’ ?> The root tag for a valid FSD must by the schema element. This defines the XML namespace for the FSD and the version number of FSD that is being used. Therefore, the root tag will look like this: <fsd:schema xmlns:fsd='http://www.systemsunion.com/2001/SSTM/SSTransform/fsd/' version='1.0'> </fsd:schema> The FSD processor uses the schema element purely for validation and version checking. The schema element has not effect on conversion to or from flat data. Records & Fields At the heart of the FSD is the definition of the records and fields that will appear in the flat data. A record contains fields in a fixed order, and a field defines the structure of the actual data. Both records and fields have a name that will be used to generate XML tags. So, for example, the following FSD will generate the following XML structure. <?xml encoding=’UTF8’ version=’1.0’ ?> <fsd:schema xmlns:fsd='http://www.systemsunion.com/2001/SSTM/SSTransform/fsd/' version='1.0'> <fsd:sequence output=”no”> <fsd:record name=”parent”> <fsd:field name=”child”/> </fsd:record> </fsd:sequence> </fsd:schema>Example FSD 1 - Simple record and field<parent> <child/> </parent> Example Output Structure 1By default all records and fields will be generated to the output. This can be overridden by setting the ‘output’ attribute to ‘no’. This is useful where you want to specify the structure of the data without causing a tag to be generated in the XML. |