XML Script logo
About X-Tract
What it is

X-Tract is a data processing and transformation engine designed to process templates written in XML Script. It can be run from the command line or called from another process, such as a Web server.

How it works

X-Tract is an XML-based data transformation engine. It takes in code and data at one end, and puts out data at the other end. The processor gets its instructions from the code by searching it for elements it recognises as commands, and also for text which it needs to 'interpolate'. Command elements have tags such as _for or _if, while interpolations are recognised as being text content between 'hash' or 'pound' signs. If the processor recognises a command element or an interpolation, it will process it and replace it with its output. Otherwise it will leave it as it is. In either case, it will also go on to search the content of any elements for commands or interpolations. Whatever remains of the code after commands have been executed and interpolations expanded will be echoed to the output.

XML Scripts

The code instructions for the processor are written in XML Script, which defines the set of recognised commands and their effects. These instructions are contained within XML Script Templates, each of which is an XML element, typically denoted by XST element tags. Templates can be called from each other, can be nested, and can be generated dynamically from data.

Applying templates to data

Templates can be a mixture of XML and text content, and they can also import data from external sources. An external source could be a file, a database, a Web server, or another processor, and can be in any text format. Templates can use data to generate output, which can be in any text format, and/or dynamic code for further processing.

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited