Page 1 of 1

Schema documentation to DocBook with Article

Posted: Thu Mar 08, 2018 6:58 pm
by WalterKuhn
Hi, is there a simple way to generate a docbook from a schema, however different to the default that generates an "article", I would like to get a document with a root element "chapter"? (Needed for inclusion in another docbook document and proper numbering there).

Re: Schema documentation to DocBook with Article

Posted: Fri Mar 09, 2018 12:25 pm
by adrian
Hi,

It's possible to customize the stylesheet that generates the DocBook output.

First, make a copy of the folder Oxygen/frameworks/schema_documentation and test test that you can successfully use the custom stylesheet. In the Schema Documentation dialog you have to use Format: Custom, press the Options button and choose as Custom XSL: schema_documentation Copy/xsl/xsdDocDocbook.xsl (this is a copy of the Oxygen builtin stylesheet).
Also enable the option "Copy additional resources...".

To adjust the generated output, open xsl/xsdDocDocbook.xsl from the copied folder, search for xsl:template match="schemaDoc". Within this template you will find the <article> element. Change it to <chapter>. Generate the documentation again and check the DocBook output.

Regards,
Adrian

Re: Schema documentation to DocBook with Article

Posted: Fri Mar 09, 2018 3:39 pm
by WalterKuhn
Thanks, that is perfect.