Schema documentation to DocBook with Article

This should cover W3C XML Schema, Relax NG and DTD related problems.
WalterKuhn
Posts: 2

Schema documentation to DocBook with Article

Thu Mar 08, 2018 6:58 pm

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: 2441

Re: Schema documentation to DocBook with Article

Fri Mar 09, 2018 12:25 pm

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

Re: Schema documentation to DocBook with Article

Fri Mar 09, 2018 3:39 pm

Thanks, that is perfect.

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest