Generating XML Schema Documentation From the Command-Line Interface
You can export the settings of the XML Schema Documentation dialog box to an XML file by pressing the Export settings button. With the exported configuration file, you can generate the same documentation from the command-line interface by running the following script:
schemaDocumentation.bat
on Windows.schemaDocumentation.sh
on OS X / Unix / Linux.
The accepted syntax and arguments are as follows:
schemaDocumentationschemaFile[[-cfg:configFile]|[[-out:outputFile][-format:<value>][-xsl:<xslFile>][-split:<value>][-openInBrowser:<value>]]|--help|-help|--h|-h]
- schemaFile
- The XML Schema file.
- -cfg:configfile
- The exported configuration file. It contains the output file, output format options, split method, and some advanced options regarding the included components and components details. If an external configuration file is specified, all other supplied arguments except for the XML Schema file will be ignored.
- -out:outputFile
- The file where the generated documentation will be saved. By default, it is the name of the schema file with an html extension.
- -format:<value>
- The output format type used when generating the documentation. Possible values are
as
follows:
html
- To generate documentation in HTML format.pdf
- To generate documentation in PDF format.docbook
- To generate documentation in DocBook format.custom
- To generate documentation in a custom format.
- -xsl:<xslFile>
- The XSL file to be applied on the intermediate XML format. If there is no XSL file provided, the result will be in the HTML format.
- -split:<value>
- The split method used when generating the documentation. Splitting is recommended
for
large schemas. Possible values are as follows:
none
(default value) - To generate one single output file.namespace
- To generate an output file for every namespace in the schema.component
- To generate an output file for every component in the schema.location
- To generate an output file for every schema location.
- -openInBrowser:<value>
- Opens the result of the transformation in a browser or system application. Possible
values are
true
orfalse
(default value). - --help | -help | --h | -h
- Displays the available options.
Example of the script in a Windows command
line:
schemaDocumentation example.xsd -out:schemaDocumentation.html -format:custom -xsl:example.xsl -split:namespace