Lexxia Command Options

Important Notes

It is important to understand that there are two types of document processors:

Normal (Type N)
The processor processes a document passed to it. It typically has the side effect of writing to an output file, and it does not change the document, which is therefore available for subsequent (downstream) processors;
Mutator (Type M)
The processor either modifies the document passed to it, or makes a totally different document available to downstream processors. The processor does not produce output. If output is required, it should be followed by an ''-O'' or ''-o'' command.

LaTeX Building

-L+output path
Build a LaTeX document using the default settings for XHTML (Note the ''+'' character!);
-L csspath+output path
Build a LaTeX Document using an external stylesheet;

System Output Commands

-w
Wrap an XML document in an XHTML wrapper to provide head and body (M).
-w cssPath
Wrap an XML document in an XHTML wrapper to provide head and body (M). The head includes a reference to a CSS stylesheet.
-w cssPath1+cssPath2
Wrap an XML document in an XHTML wrapper to provide head and body (M). The head includes a reference to a CSS display stylesheet (cssPath1) and a printing stylesheet (cssPath2).
-W
Wrap an XML document in an XHTML wrapper to provide head and body (M).
-W cssPath
Wrap an XML document in an XHTML wrapper to provide head and body (M). The head includes a copy of the contents a CSS stylesheet.
-W cssPath1+cssPath2
Wrap an XML document in an XHTML wrapper to provide head and body (M). The head includes a copies of the contents of the CSS stylesheets.

Stylesheet Building and Transformation

-P
Prototyper. Build a default XSLT stylesheet from an (inline) Schema document (M). Use after -1;
-M stylesheet path
Mutator. Transform the input document (M). Used to pass a new document to the next processor. There is no output. (Compare ''-T''.)
-T stylesheet path
Transfomer. The normal method for XSLT transformation of a document with output as a side effect (N). The output is to standard out, and can be redirected (with ''> file name'') or piped (such as ''|less''). (Compare ''-M''.)
-T stylesheet path+output path
Transfomer. The normal method for XSLT transformation of a document with output as a side effect (N). The output is to a defined path.
-T stylesheet path+output path+true or false
Transfomer. The normal method for XSLT transformation of a document with output as a side effect (N). The output is to a defined path; ''true'' specifies that the transformation creates an XML document, which is then copied to the output path; ''false'' (the default) specifies that the output does not involve an intermediate document. This is always faster, and obligatory if the transformation result is not an XML document. It is best simply to leave this decision to the system.

System Output Commands

-O
Output in XML format to standard out (N). Useful for piping and linking to external commands.
-O filePath
Putter (Outputter) to a specified path. The format of the output is determined by the extension of the file path (xml, html and txt are most common);
-o
Output in XML format to standard out (N). Useful for piping and linking to external commands.
-o fileExtension
Output to standard out (N) in a format given by the file extension. Useful for piping and linking to external commands.
-V
Verbose operation, showing a list of input files and the total timing.

Editing

-A attribute name
Replace an element with this attribute with an element with name equal to the attribute value and copy all child nodes from the old element to the new;
-a
AttributeStripper stripper. Remove all attributes from a document;
-c node path
Cutter. Promote all children of each node with this path by inserting them before the specified node. Then remove that node;
-C node path
Cutter. Remove all elements with this path, together with their children.
-z
TextStripper: Remove (zap) all empty elements;
-n node path, element name
NewNamer. Replace all elements matching the node path with an element with the new name and transfer all descendent nodes to the new element.
-N node path, element name
NewNamer: Replace all elements matching the node path with an element with the new name, but do not transfer descendent nodes to the new element.
-r
RootStripper. Repeatedly remove document (root) elements until one is reached with more than a single child node.
-t
TextStripper. Remove all text nodes;
-J output path, root name, title string with underscores
Joiner. Add all source files to a new document with a specified root name and title string.

Analysis and Reporting

-q
Simple query with a Reporter (N);
-Q schema or DTD file path
Detailed query with a Reporter, including structure check against schema or DTD(N).

Lexxia Tools

-1
SchemaBuilder. Build a Schema document from the input file (M);
-2
SchemaInspector. Process a Schema document and build a document listing all element paths in a document (M). Use after -1;
-23
SchemaInspector. Process a Schema document and build a document listing all element paths in a document (the path length is limited in this case to 3) (M). Use after -1;
-3
XMLMapper. Build an XSLT stylesheet to convert the input file to XML (M). Use after -1 -2;
-4
SchemaMapper. Build an XSLT stylesheet to convert the input file to LaTeX (M). Use after -1 -2. Now deprecated.