Page 1 of 1

One documentation file for multiple schemas?

Posted: Tue Jan 08, 2013 8:24 pm
by jaltieri
Hello there,
Is there any way to make a single PDF file that combines the documentation for a set of xsd schemas? I have about 10 xsd files that I'd like to generate a single documentation file for.
Thanks,
Jim

Re: One documentation file for multiple schemas?

Posted: Mon Jan 14, 2013 3:14 pm
by ionela
Hello,

There is no built in support for selecting multiple schemas and generating their documentation in a single file. The Schema Documentation tool only supports one XML schema (XSD) as input.
However, there are a couple of possibilities to achieve that.

One is to generate the documentation for each schema in DocBook and then create a DocBook book that refers all the generated articles, something like:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Documentation for multiple schemas</title>

<xi:include href="docForSchema1.xml"/>
<xi:include href="docForSchema2.xml"/>
<!-- and so on -->
</book>
and then use the DocBook transformation scenarios to get different output formats.

Another workaround to create a master XML schema that includes or imports (using the xsd:include / xsd:import elements) all your other XML schemas and then use this master schema as input for the XML Schema documentation tool.

Let us know if you need further assistance.

Regards,
Ionela