Edit online

Customizing PDF or DocBook Output of Generated XML Schema Documentation

To customize the PDF or DocBook output of the generated XML Schema documentation, use the following procedure:
  1. Customize the [OXYGEN_INSTALL_DIR]/frameworks/schema_documentation/xsl/xsdDocDocbook.xsl stylesheet to include the content that you want to add in the PDF or DocBook output. Add the content in the XSLT template with the match="schemaDoc" attribute between the <info> and <xsl:apply-templates> elements, as commented in the following example:
    <info>
        <pubdate><xsl:value-of select="format-date(current-date(),
             '[Mn] [D], [Y]', 'en', (), ())"/></pubdate>
    </info>
       <!-- Add the XSLT template content with match="schemaDoc" attribute here -->
    
    <xsl:apply-templates select="schemaHierarchy"/>
  2. Create an intermediary file that holds the content of your XML Schema documentation by following these steps:
    1. Go to Tools > Generate Documentation > XML Schema Documentation.
    2. Select Custom for the output format and click the Options button.
    3. In the Custom format options dialog box, do the following:
      1. Enter the customized stylesheet in the Custom XSL field ([OXYGEN_INSTALL_DIR]/frameworks/schema_documentation/xsl/xsdDocDocbook.xsl).
      2. Select the Copy additional resources to the output folder option and leave the default selection in the Resources field.
      3. Click OK.
    4. When you return to the XML Schema Documentation dialog box, just click the Generate button to generate a DocBook XML file with an intermediary form of the Schema documentation.
  3. If you want the DocBook file to be transformed into a PDF document, follow these steps:
    1. Use the Configure Transformation Scenario(s) action from the toolbar or the Document > Transformation menu, click New, and select XML transformation with XSLT.
    2. In the New Scenario dialog box, go to the XSL URL field and choose the [OXYGEN_INSTALL_DIR]/frameworks/docbook/oxygen/xsdDocDocbookCustomizationFO.xsl file.
    3. Go to the FO Processor tab and select the Perform FO Processing and XSLT result as input options.
    4. Go to the Output tab and select the directory where you want to store the XML Schema documentation output and click OK.
    5. Click Apply Associated.
Tip: If you want your modifications to be permanent so that you can simply select the PDF output format in the XML Schema Documentation dialog box, rather than configuring a custom format each time you generate this documentation, follow this procedure:
  1. Create a JAR or ZIP file that includes the modified stylesheet (customized in step 1 above), placed in the following directory structure: builtin/documentation/schema_documentation/xsdDocDocbook.xsl.
  2. Create a new directory named endorsed inside the [OXYGEN_INSTALL_DIR]/lib directory and place the created JAR or ZIP file inside it.
  3. Restart Oxygen XML Editor and the PDF output format will now use your customized stylesheet.