1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
2 | <!--
|
---|
3 | | LICENSE: This file is part of the DITA Open Toolkit project hosted on
|
---|
4 | | Sourceforge.net. See the accompanying license.txt file for
|
---|
5 | | applicable licenses.
|
---|
6 | *-->
|
---|
7 | <!--
|
---|
8 | | (C) Copyright IBM Corporation 2006. All Rights Reserved.
|
---|
9 | *-->
|
---|
10 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
|
---|
11 | "topic.dtd">
|
---|
12 | <topic id="docbook2dita" xml:lang="en-us">
|
---|
13 | <title>The Docbook to DITA transform</title>
|
---|
14 | <shortdesc>This directory provides the docbook-to-dita transform. </shortdesc>
|
---|
15 | <body>
|
---|
16 | <p>The Docbook-to-DITA transform uses a design pattern that might be called <term>a
|
---|
17 | dialogue transform</term>. This approach makes a strict separation between
|
---|
18 | the input and output logic. Generating an output element requires a conversation
|
---|
19 | between the output writer and the input reader:</p>
|
---|
20 | <dl><dlentry>
|
---|
21 | <dt>DITA writer</dt>
|
---|
22 | <dd>The DITA writer knows how to generate DITA output. After producing an
|
---|
23 | element, the writer requests the attributes and content of the element from
|
---|
24 | the reader. For instance, the paragraph output rule generates a <codeph><p></codeph> element
|
---|
25 | and then requests the id attribute and other attributes of the paragraph and
|
---|
26 | then the paragraph content. Where the content is a simple sequence (for instance,
|
---|
27 | as with a topic or list), the writer requests in the subelements individually. </dd>
|
---|
28 | </dlentry><dlentry>
|
---|
29 | <dt>Docbook reader</dt>
|
---|
30 | <dd>The Docbook reader knows how to read Docbook input. When the DITA writer
|
---|
31 | requests an attribute or content, the reader is responsible for satisfying
|
---|
32 | the request from the current input context. For instance, when the DITA paragraph
|
---|
33 | writer requests an id attribute, the reader might copy the id attribute from
|
---|
34 | the current Docbook input element or from a nearby Docbook input element.
|
---|
35 | The reader can also generate an id attribute or skip the id attribute. Similarly,
|
---|
36 | when the DITA paragraph writer requests paragraph content, the reader can
|
---|
37 | provide paragraph content by invoking the output rules on any of the text
|
---|
38 | and subelements from the input (often but not necessarily from content of
|
---|
39 | the current input element).</dd>
|
---|
40 | </dlentry></dl>
|
---|
41 | <p>This directory provides the following modules:</p>
|
---|
42 | <dl><dlentry>
|
---|
43 | <dt>docbook2dita.xsl</dt>
|
---|
44 | <dd>This module combines the Docbook reader and DITA writer to transform Docbook
|
---|
45 | input to DITA output.</dd>
|
---|
46 | </dlentry><dlentry>
|
---|
47 | <dt>dbReader.xsl</dt>
|
---|
48 | <dd>This module provides the base Docbook reader. The module can be extended
|
---|
49 | by other modules that override the base module to handle requests from the
|
---|
50 | DITA writer in different ways.</dd>
|
---|
51 | </dlentry></dl>
|
---|
52 | </body>
|
---|
53 | </topic>
|
---|