PDF Schema Documentation Customization

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

PDF Schema Documentation Customization

Mon Oct 29, 2012 3:02 pm

I am using the trial version of Developer 14.1. I need a tool to generate PDF documentation from XML Schema. I've loaded my schema and generated documentation in both PDF and HTML formats. However, I would like to customize the PDF output in a couple of ways.

[*]Sort by Element (vs. by namespace), like what the HTML documentation lets you to do (I'm not looking to change interactively. I just want the static sort to be by element)
[*]Change the document header ("Schema Documentation for mySchema.xsd")
[*]Add a paragraph of text at the beginning to describe what the schema are for
[*]Remove the Resource Hierarchy listing

There also seems to be a bug with large attribute groups. The PDF documentation has an Instance of each object. My object contains a large attribute group which goes off the page instead of wrapping to the next line.

I also tried to generate PDF documents using the tip described in http://www.oxygenxml.com/forum/post19360.html#p19360 but the PDF document had all sorts of spacing errors and mixed fonts that made it look horrible.
Posts: 4144

Re: PDF Schema Documentation Customization

Mon Oct 29, 2012 5:58 pm


Please look first at this procedure for customizing the PDF output of the XML Schema documentation process to get familiar with the general customization process. That procedure covers already your second and third requirements, that is change the document header and add a paragraph of text at the beginning. For the fourth one (remove the Resource Hierarchy listing) you should just comment out the following element inside the template with match="schemaDoc", as part of step 1 from that procedure:

Code: Select all

<xsl:apply-templates select="schemaHierarchy"/>

For the first requirement you have to modify the template with name="main" by removing the entire element xsl:choose from this template except for the content of its xsl:otherwise branch. Of course you could further tweak the remaining xsl:for-each-group element, for instance by pulling the elements first always (in front of attributes, types, etc.), regardless of the order in which the elements, attributes, types, etc. are parsed from the XML Schema.

Posts: 3

Re: PDF Schema Documentation Customization

Mon Oct 29, 2012 10:18 pm

Thanks for the assistance, this was both exactly what I needed and also allowed me to see where other tweaks can be made.

Return to “XML Schemas”

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests