Custom Information in pdf Dokumentation

Oxygen general issues.
ispos
Posts: 4
Joined: Mon Aug 20, 2012 5:34 pm

Custom Information in pdf Dokumentation

Post by ispos »

Hello,
is there a option to insert custom Information in the generated pdf Dokumentation like last updated from, or a general description

thx
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Custom Information in pdf Dokumentation

Post by sorin_ristache »

Dear ispos,

The PDF output of the documentation for an XML Schema can be customized but you need to run two transformations and to customize the intermediate file (the output of the first transformation) instead of just running the action XML Schema Documentation from menu Tools -> Generate Documentation. You can follow this procedure which has two parts for the two transformations and for inserting the custom text in the documentation (updated from, general description, etc):

1. Customize the XSLT stylesheet [Oxygen-install-dir]/frameworks/schema_documentation/xsl/xsdDocDocbook.xsl for including the text that you want in the content of the schema documentation.

In the XSLT template with the attibute match="schemaDoc" you should add your content between the following two elements:

Code: Select all


  <info>
<pubdate><xsl:value-of select="format-date(current-date(),'[Mn] [D], [Y]', 'en', (), ())"/></pubdate>
</info>
and

Code: Select all

<xsl:apply-templates select="schemaHierarchy"/>
Please note that you should insert here DocBook XML elements like <para>, <figure>, etc. If you are not familiar with DocBook XML documents please look at this video demo on the page with all the Oxygen video demos.

2. Create an intermediary file with the content of the documentation for your XML Schema.

2.1 Go to menu Tools -> Generate Documentation -> XML Schema Documentation.

2.2 Select the Custom radio button in the dialog box XML Schema Documentation.

2.3 Press the Options button which opens a new dialog box called Custom format options and in this dialog select the following:

- Custom XSL: [Oxygen-install-dir]/frameworks/schema_documentation/xsl/xsdDocDocbook.xsl

- select the checkbox Copy additional resources to the output folder

- press the OK button.

2.4 When you return to the Custom format options dialog box just press the Generate button which will generate a DocBook XML file with an intermediary form of the schema documentation.


3. Create the final PDF document.

3.1 Create a new transformation scenario associated with the intermediary XML file that you edited at step 2 by going to menu Document -> Transformation -> Configure Transformation Scenario (or by pressing the toolbar button with the same tooltip text, that is Configure Transformation Scenario).

3.2 In the dialog box for editing the new transformation, on the XSLT tab you should enter the following file in the XSL URL combo box by using the small yellow folder icon (which opens a file system navigator dialog box):

[Oxygen-install-dir]/frameworks/docbook/oxygen/xsdDocDocbookCustomizationFO.xsl

3.3 On the FO Processor tab of the same dialog box select the radio buttons Perform FO Processing and XSLT result as input.

3.4 On the Output tab you should set an output file path where you want to create the final PDF document.

3.5 Press the OK button in the dialog box for editing the transformation.

3.6 Press the Apply Associated button in the dialog box called Configure Transformation Scenario.

At the end of this procedure you should get the customized PDF output for the documentation of your XML Schema.


Regards,
Sorin
martyp
Posts: 3
Joined: Mon Oct 29, 2012 2:37 pm

Re: Custom Information in pdf Dokumentation

Post by martyp »

I'm a new user and had a couple of minor issues getting this to work.

Step 2.3: In the "Schema Documentation" in the Output tab there is a line for "output file" with a default choice [at least for me] of "${cfn}.pdf". This is the intermediate XML file, so you need change it to have a .xml extension.

Step 3.2: When creating a new transform scenario, select the "new" button which bring up several choices. The choice that worked for me was "XML Transform with XSLT".
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Custom Information in pdf Dokumentation

Post by sorin_ristache »

Hi,
martyp wrote:Step 2.3: In the "Schema Documentation" in the Output tab there is a line for "output file" with a default choice [at least for me] of "${cfn}.pdf". This is the intermediate XML file, so you need change it to have a .xml extension.
In fact when the Custom radio button is selected the file extension in the Output file text box remains from the previous selection of the above radio box group, that is .html, .pdf or .xml. Custom output could be an unknown file type so we did not set a specific file extension by default in case of this radio button.
martyp wrote:Step 3.2: When creating a new transform scenario, select the "new" button which bring up several choices. The choice that worked for me was "XML Transform with XSLT".
Right, sorry for not being more specific, since the current file is of XML type (is edited in an XML editor panel) as in your case (DocBook XML) the type of transformation should be XML transformation with XSLT.


Regards,
Sorin
ispos
Posts: 4
Joined: Mon Aug 20, 2012 5:34 pm

Re: Custom Information in pdf Dokumentation

Post by ispos »

thx a lot ...
Post Reply