White Papers/TransformerConf

From Docs

Jump to: navigation, search

Get PDF

< DiType White Papers

Configuring transformer to recognize and convert foreign documents

The transformer determines the document type, applies necessary transformations to convert it to XSL FO, and then passes on. This way, documents in !WordML, XHTML, XSL 1.1, DocBook and potentially other formats are processed automatically; alternatively, the transformer applies the stylesheet referred to in xml-stylesheet processing instruction, allowing custom transformations as long as they produce XSL FO. The transformer is also capable of applying non-XSLT transformations, for example, external programs such as RTF2FO. A stylesheet can be added to transformer.conf.

This is an example of docbook configuration:

<document type="docbook" transformer="XSLT" transformation="docbook/docbook-fo.xsl"
catalog="docbook/docbook/dtd/catalog.xml" result-type="xsl"/>

More details of transformer configuration can be found here: http://mediawiki.renderx.com/index.php/White_Papers/DiType_Configuration#TRANSFORMER

Transformer can also be configured to recognize document type in arx.conf

This is an example docbook settings in arx.conf:

grammars {
  docbook="docbook"
...
}

valid {
  start = element 
   (set|setindex|book|part|reference|
   preface|chapter|appendix|article|
   bibliography|glossary|index|
   refentry|sect1|sect2|sect3|sect4|sect5|section) {any}
  any = (element * {any}|attribute * {text}|text)*
} => docbook
...

The detailed arx configuration description can be found here: http://www.davidashen.net/rnv.html

Personal tools