Instead of the fixed standard XMLSpy design, you can create a customized design for schema documentation. The customized design is created in a StyleVision SPS, which is a design template for the output document.
Creating the SPS
A StyleVision Power Stylesheet (or SPS) is created using Altova's StyleVision product. An SPS for generating schema documentation must be based on an XML Schema that specifies the structure of the schema documentation. This schema is called SchemaDocumentation.xsd, and it is delivered with your XMLSpy package. It is stored in the folder: C:\Documents and Settings\<username>\My Documents\Altova\XMLSpy2020\Documentation\Schema.
When creating the SPS design in StyleVision, nodes from the SchemaDocumentation.xsd schema are placed in the design template and assigned styles and properties. Additional components, like links, tables and images, can also be added to the SPS design. In this way, the entire output document can be designed in the SPS. How to create an SPS design in StyleVision is described in detail in the StyleVision user manual.
The advantage of using an SPS for generating schema documentation is that you have complete control over the schema documentation design. Note also that PDF output of the schema documentation is available only if a user-defined SPS is used; PDF output is not available if the fixed XMLSpy design is used.
Specifying the SPS to use for schema documentation
After an SPS has been created, it can be used to generate schema documentation. The SPS you wish to use for generating the schema documentation is selected in the Schema Documentation dialog (accessed via the Schema Design | Generate Documentation command). In the Documentation Design pane of this dialog (see screenshot below), select the Use User-Defined Design radio button. You can then click the Browse button and browse for the SPS you want. Click the dialog's OK button, and, in the Save dialog that pops up, select the folder for, and enter the name of, the output file.
|Note:||The SPS file must correctly locate the schema on which it is based: SchemaDocumentation.xsd (see above).|
The following editable SPS designs for schema documentation generation are delivered with XMLSpy. They are in the Altova\XMLSpy2020\Documentation\Schema\ subfolder of the (My) Documents folder:
•OverallDocumentation.sps, which generates full documentation about the schema
•Statistics.sps, which lists the number of global and local elements, attributes and attribute groups, and simple and complex types for the main schema and for each schema file independently
•StructureOverview.sps, which outputs a structure of global elements and complex types up to a configurable depth
•TypeDerivations.sps, which lists simple and complex types and all their directly and indirectly derived types in the form of a tree
•XPathGenerator.sps, which generates all possible XPath statements up to a configurable depth
These files, together with other SPS files you have recently browsed for, will be available in the combo box of the Use User-Defined option (see screenshot above).
Clicking the Edit button in the Documentation Design pane launches StyleVision and opens the selected SPS in a StyleVision window. In order to preview the result document in StyleVision, you will need a Working XML file. The SPS designs listed above have already been assigned a sample XML file named Sample.xml, which is located in the (My) Documents folder, in the following subfolder:
|Note:||In order to use an SPS to generate schema documentation, you must have StyleVision installed on your machine.|