Schema documentation to DocBook with Article

This should cover W3C XML Schema, Relax NG and DTD related problems.
WalterKuhn
Posts: 2
Joined: Thu Mar 08, 2018 6:50 pm

Schema documentation to DocBook with Article

Post 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).
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Schema documentation to DocBook with Article

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
WalterKuhn
Posts: 2
Joined: Thu Mar 08, 2018 6:50 pm

Re: Schema documentation to DocBook with Article

Post by WalterKuhn »

Thanks, that is perfect.
Post Reply