The stylesheets presented here are geared towards the production of documentation from a RELAX-NG schema. The RELAX-NG syntax allows schemas to be annotated with documentation strings. The stylesheets use the structure of the RELAX-NG schema instance and the documentation strings to produce Docbook XML and SVG diagrams.
These stylesheets are licensed under the Apache Software Foundation license, the full text of the license can be found here.
This stylesheet takes a RELAX-NG schema and produces rudimentary documentation from it in Docbook XML. Each element and pattern definition gets its own documentation section. The content model of patterns/elements is described using an XML DTD-like shorthand notation.
This stylesheet makes simplifying assumptions about the relationship between elements and their attributes. In particular it makes the assumption that for documentation purposes, you do not care about the use of patterns to define the attributes for your elements. It also assumes that there are not conditional relationships between elements and attributes in a content model.
Download the stylesheet from here.
The stylesheet accepts the following parameters:
This is a small system of stylesheets that preprocess a RELAX-NG schema into a simple tree-like structure and then renders it as a tree in SVG.
The stylesheets divide the work up into three distinct steps. This is controlled by the ANT build file included with the stylesheets in the download.
In this first step, Eric van der Vlist's
stylesheet rng-simplification.xsl for applying the steps of
RELAX-NG schema simplification
is called. This performs (amongst other things) merging of imported
schema files.
The output of step 7-12 of Eric's process is used as input into
the stylesheet rng-simplify-defines.xsl
which applies step 7-18 of the RELAX-NG schema simplification
process (the intermediate steps are skipped because they would
significantly impact the tree that describes the schema).
This step generates a simple tree representation of the entire schema. The output of this step is a render-neutral description of the schema tree. A lot of the complexity of (and information in) the source schema(s) is stripped out at this point.
This step generates one or more SVG files depending on the parameters used to invoke the process. By default one SVG file is created diagramming the entire schema, but you can produce a single diagram of a given element or pattern, or generate separate diagrams of every element and/or pattern defined in the schema.
nsName element.choice element inside name.
The complete package is available for download from here. The zip file contains a README.txt file that explains everything!
| Previous: TMTab: A Topic Map Plug-in For Protégé | Next: Papers and Publications |