Basic Operation of Xhsc

Xhsc accepts two inputs: an input document, and a transform specification. It produces one output: an XML document based on the input, modified according to the specification.

Xhsc can operate in two modes: XML input mode, and text input mode. In XML input mode, the input document and the specification must both be well-formed XML; the output will also be well-formed XML. In text input mode, the input document is taken as plain text, line by line. The specification must be well-formed XML, and the output will be well-formed XML. Figure 1 illustrates the basic operation of Xhsc when it is used as an application.

Figure 1. Xhsc inputs and outputs

The specification tells Xhsc how to transform the input into the output. It can be one of three kinds of XML documents:

If the specification contains both Xhsc and XSLT processing instructions, the Xhsc transformation is applied first, and then the XSLT transformation is applied to the result.