| User's Guide for Xhsc | ||
|---|---|---|
| <<< Previous | Next >>> | |
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.
The specification tells Xhsc how to transform the input into the output. It can be one of three kinds of XML documents:
An XSLT stylesheet with embedded Xhsc instruction elements (the Xhsc elements may appear anywhere in the stylesheet, although it is best to put them in a bunch near the beginning)
A collection of Xhsc instruction elements, under a root Xhsc element.
An XSLT stylesheet (this is permitted, for completeness, but it is rather silly to use Xhsc for this when many better interfaces to XSLT exist)
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.
| <<< Previous | Home | Next >>> |
| Before You Start | A Simple Example |