Page 1 of 1

Schema documentation pdf

Posted: Tue Feb 04, 2014 9:28 pm
by p0963942
Hi,

I'm trying to generate a pdf version of our documentation. Our target schema is: http://www.erudit.org/xsd/article/3.0.0 ... rticle.xsd.

I first receive the following error:

The following errors were encountered when generating schema documentation:
- E The FOP process ended with code: 1.
The error was:
ERROR - Couldn't find hyphenation pattern for lang="en".
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
Specify more memory for the FOP as explained in the section 'Performance Problems',
subsection 'External Processes' in the User Manual.

I then increased the FOP memory to 1024. Still doesn't work.

I decided to try the docbook version and then transform it to pdf. However, the annotations are included verbatim. Is there a way to generate a pdf version in which the annotations would be minimally formatted.

Thanks

Re: Schema documentation pdf

Posted: Wed Feb 05, 2014 6:30 pm
by adrian
Hi,

What version of Oxygen are you using?
Did you modify the FOP memory in Options > Preferences, XML > XSLT-FO-XQuery > FO Processors?

Depending on how large is the schema hierarchy, it's possible for the FOP to need more memory, even more than 1024. Try 1200 or 1400. If you're running a 64-bit distribution of Oxygen, you can try 2000 or more. This memory is only used for the duration of the FOP processing.

Regards,
Adrian

Re: Schema documentation pdf

Posted: Fri Feb 07, 2014 7:46 pm
by p0963942
Hi,

I use Oxygen 14.1, build 2012121012; French.

I did increase the memory, up to 5500. This time i received the following error message:
The following errors were encountered when generating schema documentation:
- E The FOP process ended with code: 1.
The error was:
ERROR - Couldn't find hyphenation pattern en
ERROR - Error while rendering page 14. Reason: org.apache.fop.pdf.PDFConformanceException: PDF/A-1b does not allow the use of transparency. (file:///C:/Users/p0963942/Documents/test_schemas/TEST_OXYGEN/test_pdf/img/Cycle8.png)
ERROR - Exception
As mentionned in my previous message, I also tried the docbook version and then transformed it to pdf. However, the annotations are included verbatim. Is there a way to generate a pdf version, via docbook, in which the annotations would be minimally formatted.

Thank you.

Re: Schema documentation pdf

Posted: Fri Feb 07, 2014 10:50 pm
by ionela
Hello,

Regarding this error, please make sure that Generates PDF/A-1b output option is not enabled from Options > Preferences, XML > XSLT-FO-XQuery > FO Processors.

If you have generated Schema documentation to DocBook, you can open the generated XML (DocBook) document in oXygen and then transform it to PDF. To obtain a transformation scenario with the same PDF styling, duplicate the DocBook PDF transformation scenario and:
- Give the new scenario a proper name e.g. DocBook XSD Doc PDF
- Change the stylesheet(XSL URL) to: <Oxygen>/frameworks/docbook/oxygen/xsdDocDocbookCustomizationFO.xsl
Applying this transformation scenario will yield the same styling as when generating the PDF directly from the Schema Documentation dialog.

Let us know if you need further assistance.

Regards,
Ionela

Re: Schema documentation pdf

Posted: Mon Feb 10, 2014 5:33 pm
by p0963942
Hi,

Thank you for the information.
What should I do in order to be able to format the content of our annotations for our pdf documentation. Our annotations are very elaborate. We use html lists, html tables, exemples of source code, etc. Is there a way to apply these styles so that they are rendered in the pdf documentation?

Thank you.

Re: Schema documentation pdf

Posted: Tue Feb 11, 2014 2:48 pm
by alex_jitianu
Hello,

The schema documentation process first generates an temporary XML file. This XML file contains all the schema components and their meta information (like the annotation). On this XML format we apply XSLTs to obtain either HTML or Docbook output. These stylesheets are available in {INSTALLATION_DIRECTORY}/frameworks/schema_documentation/xsl.

Here is what you must do:
1. Edit xsdDocDocbook.xsl and add some templates to transform the HTML elements from the annotation to DocBook elements. The template of interest is buildAnnotation and by default, for your settings, it will just copy the elements as they are. Instead of copying them you must apply the previously created transformation templates upon them.
2. In the XML Schema documentation dialog, the Settings tab, make sure the option Escape XML Content is unchecked. This will ensure that the HTML elements from the annotation will be copied in the temporary XML format without being altered.
3. You can use the modified xsdDocDocbook.xsl by using the custom format option in the XML Schema documentation dialog. Click the Options button, select the path to xsdDocDocbook.xsl and also don't forget to check the Copy additional resources to output folder button.

Now if you transform the resulting DocBook to PDF the annotations will be rendered as expected.

Best regards,
Alex