Pages: 1
Print
Author Topic: Getting started w/ Author Enterprise 6.0.1 and DocBook  (Read 694 times)
jazzbaritone
Member

Posts: 1


« on: April 08, 2011, 11:20:17 AM »

Howdy,  y'all,

We're evaluating using a simple article based on DocBook, to be published as PDF. We're familiar with XML and DITA, but can't find a simple tutorial about creating the article and publishing as PDF. I searched the Help CHM and Googled, but nada.

Is there a tutorial document somewhere that I missed?

We'd like to adopt Author Enterprise as a standard for all XML-framed content creation and management.

Thanks kindly.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1546



WWW
« Reply #1 on: April 08, 2011, 05:07:16 PM »

Note that if anything below sounds like it is beyond the capabilities of your company ("customizing the product") we have various partners and our own Professional Services team that can be contracted.

DocBook Sample Customization:
There is a sample customization for DocBook 5 included with XMetaL Author Enterprise and XMetaL Author Essential, however, this does not provide transformation support, this sample would need to be extended to provide that feature. This sample is provided in part to demonstrate some features that a developer might use in their own customization of DocBook or in other schemas.

You may have seen this DocBook sample customization listed in Help > Samples (two sample documents are provided there, both end with "(DocBook)".

The DocBook sample customization (everything that makes the sample work, including the DTDs) is here: <xmetal install path>\Author\Rules\DocBook\

Transformation (PDF / HTML):
This sample could be extended to support output to PDF using Apache FOP (which we bundle) and as demonstrated in the Journalist sample. If you have XMetaL Author Enterprise (not Essential) you might choose instead to use the bundled copy of RenderX instead of FOP (there is no documentation on that but our Professional Service team could probably do something).

The same demo shows one way to transform to HTML. This concept might be extended to run any kind of XSLT or other 3rd party tool to produce any kind of output. Since you plan to work with DocBook it might be preferable to integrate the "DocBook XSL stylesheets" into this process: http://sourceforge.net/projects/docbook/ Note that programming (writing scripts) will be required.

We don't have any tutorials on doing that, but having a look at the "Journalist" demo's support for PDF and HTML output would give you an idea of what is possible. Note that the Journalist sample DTD was created long ago (the same time as the original DocBook DTD was being created) and is based on it but with some significant differences that make them incompatible (the most obvious being the element name camel casing). To see a PDF or HTML file produced from a Journalist document do this:

1. Open a sample: Help > Samples > Cameras in Focus (Journalist)
2. Right click anywhere on the toolbar area in XMetaL and enable the "Journalist" toolbar.
3. Select the "Save as PDF" or "Save as HTML" button and specify a place to save to.

To view the code that drives this feature see the following files:
<xmetal install path>\Author\Macros\journalist.mcr
(search for "saveAsPDF", "saveAsHTML", "previewHTML" or "previewPDF")

The following file defines most of the functionality:
<xmetal install path>\Author\Startup\multipleOutput.mcr

This functionality could be extended to produce other types of output based on the same principles for producing HTML by replacing the  XSLT used to produce HTML with something else (such as portions of the DocBook XSL stylesheets).

Our *.mcr files (which contain scripts to extend XMetaL functionality) are plain text files viewable in any text editor.

DocBook -> CHM:
There is a stylesheet driver file for generating HTML Help (CHM) as well as a short tutorial included with the "DocBook XSL stylesheets" at SourceForge (see link above).
Logged
Pages: 1
Print
Jump to: