Describing the File Formats

As discussed in Chapter 6, we're going to use our own XML-based language to describe the formats of our non-XML files. Although the different formats will have many characteristics in common, we'll have a different language for each. In addition, because some characteristics, such as those dealing with XML output, are not relevant for both to and from XML conversions, we'll have a separate language (and schema) for each direction. In this section I describe the organization, Elements, Attributes, and usage of the file description document. In the design section we'll review the schemas for the file description documents as well as the sample invoice and purchase order.

The CSV file description documents have three major sections, each represented by an Element that is a direct child of the root Element.

  • PhysicalCharacteristics: the CSV file characteristics

  • XMLOutputCharacteristics: XML output characteristics, required only when converting to XML

  • Grammar: CSV file grammar

The language that describes conversion from XML is a subset of the one that describes conversion to XML. Given this, the file description documents and the schemas that specify them are very similar. We'll review them in the upcoming section on high-level design.

The following three subsections describe the major sections of the file description documents. Each major section is handled by an Element that is a child of the file description document's root Element, CSVFileDescription.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset