Translations:Documentation/ODF documents generation tools/17/en

From The Document Foundation Wiki
Jump to navigation Jump to search

The ODF standard consists in making a compressed file (by ZIP), which contains various data, most of them in XML format. There is no reason why a generic tool for handling XML should be discarded. Of course, this assumes that the person writing a script knows what XML is, what trees, subtrees, nodes, attributes, etc. are. A good way to work is to start from a template file, which already contains the constant parts of the document to be generated, with the right styles, and a suitable structure, and then create a lightweight script next to it that retrieves data from elsewhere, and uses the DOM tree of the template to generate an elaborate document. Thus, one easily separates the form (in the template) from the content (the data processing).