1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
|
---|
3 | "reference.dtd">
|
---|
4 | <reference id="preprocess-content-changes" rev="1.8" xml:lang="en-us">
|
---|
5 | <title>Content changes that occur during pre-processing</title>
|
---|
6 | <shortdesc>Pre-processing introduces changes to the DITA content that you might want to be aware
|
---|
7 | of if you work with the temporary files. While some steps, such as conref resolution, change the
|
---|
8 | DITA content in a way that is expected and mandated by the DITA specification, other steps
|
---|
9 | result in temporary output that does not comply with the DITA standard. In addition, if you are
|
---|
10 | using a restrictive specialization, the pre-processing steps might introduce content that is not
|
---|
11 | permitted by the content model of the specialization.</shortdesc>
|
---|
12 | <prolog>
|
---|
13 | <author type="creator">Robert D. Anderson</author>
|
---|
14 | <author type="contributor">Kristen James Eberlein</author>
|
---|
15 | <copyright>
|
---|
16 | <copyryear year="2013"/>
|
---|
17 | <copyrholder>DITA Open Toolkit </copyrholder>
|
---|
18 | </copyright>
|
---|
19 | <critdates>
|
---|
20 | <created date="2013-03-29"/>
|
---|
21 | </critdates>
|
---|
22 | </prolog>
|
---|
23 | <refbody>
|
---|
24 | <section><title>Changes that do not comply with the DITA standard</title><p>The DITA-OT makes certain changes to documents during the pre-processing operation, in order to
|
---|
25 | simplify or optimize later stages in the processing chain. These changes result in temporary
|
---|
26 | files that do not comply with the DITA standard.<draft-comment author="Kristen Eberlein"
|
---|
27 | time="29 March 2013">Robert, I don't think that the first two items are correctly phrased.
|
---|
28 | I couldn't manage to generate either the image or mapclass attributes in my intermediate
|
---|
29 | files ...</draft-comment><dl>
|
---|
30 | <dlentry>
|
---|
31 | <dt>Image attributes</dt>
|
---|
32 | <dd>If the document contains images, the DITA-OT adds @dita-ot:image-width and
|
---|
33 | @dita-ot:image-height attributes to the <image> elements. These attributes enable
|
---|
34 | scaling when the images are finally rendered.</dd>
|
---|
35 | </dlentry>
|
---|
36 | <dlentry>
|
---|
37 | <dt>@mapclass attribute on generated links</dt>
|
---|
38 | <dd>When links are generated based on information in the DITA map, a @mapclass attribute
|
---|
39 | is added to the <link> element that indicates the class of the <topicref>
|
---|
40 | element used to create the map. This attribute can be used to sort links or filter how
|
---|
41 | links are displayed in output.</dd>
|
---|
42 | </dlentry>
|
---|
43 | <dlentry>
|
---|
44 | <dt>Flagging</dt>
|
---|
45 | <dd>The flagging stage of the pre-processing operation creates pseudo-specializations of
|
---|
46 | the <foreign> element which contain flagging information. Flagging some elements,
|
---|
47 | such as <topic> and <row>, results in markup where the pseudo-specialization of
|
---|
48 | the <foreign> element is the first and last child of the element. </dd>
|
---|
49 | </dlentry>
|
---|
50 | </dl></p></section>
|
---|
51 | <section><title>Changes that might not comply with restrictive specializations</title><p>Some changes made during the pre-processing operation might not comply with restrictive
|
---|
52 | specialization. Most of these changes are listed here, athough the list is not exhaustive.
|
---|
53 | If you develop an output transformation for a restrictive specialization, you should be
|
---|
54 | aware of these changes. If necessary, you can customize the pre-processing operation to
|
---|
55 | avoid these changes.<dl>
|
---|
56 | <dlentry>
|
---|
57 | <dt>Related links</dt>
|
---|
58 | <dd>The maplink step of the pre-processing operation generates contextual links based on
|
---|
59 | the maps, for example, next and previous links; this step uses the <related-links>
|
---|
60 | element to contain the contextual links. This can cause unexpected output if a
|
---|
61 | specialized document type has removed the <related-links> element.</dd>
|
---|
62 | </dlentry>
|
---|
63 | <dlentry>
|
---|
64 | <dt>Cascade of map metadata</dt>
|
---|
65 | <dd>When metadata is specified in a map, it generally cascades to nested <topicref>
|
---|
66 | elements and the referenced topics. If the map contains specialized metadata elements
|
---|
67 | or attributes, the metadata might cascade to <topicref> elements or topic
|
---|
68 | <prolog> elements that are not intended to have the metadata. If a topic document
|
---|
69 | type has been specialized to disallow metadata, metadata specified in the map might
|
---|
70 | nonetheless cascade into the topic <prolog> element.</dd>
|
---|
71 | </dlentry>
|
---|
72 | <dlentry>
|
---|
73 | <dt>Title text in links</dt>
|
---|
74 | <dd> By default, links or cross references without link text are updated to include link
|
---|
75 | text. The link text is generally generated by using the title of the referenced topic.
|
---|
76 | This can cause unexpected output if cross references or links have been specialized
|
---|
77 | and the specialized content model does not allow text.</dd>
|
---|
78 | </dlentry>
|
---|
79 | <dlentry>
|
---|
80 | <dt>@xtrf and @xtrc elements</dt>
|
---|
81 | <dd>The pre-processing operation adds these two attributes to every element, in order to
|
---|
82 | provide trace-back information in case of errors. These attributes are added even for
|
---|
83 | specializations that forgot to define these attributes.</dd>
|
---|
84 | </dlentry>
|
---|
85 | </dl></p></section>
|
---|
86 | <section><title>Changes or files that are not intended to comply with existing document types</title><p>Some processes in the toolkit are not designed to produce documents that comply fully with a DITA
|
---|
87 | DTD or XSD.<dl>
|
---|
88 | <dlentry>
|
---|
89 | <dt>Topic merge</dt>
|
---|
90 | <dd>The topicmerge process is used by the PDF, ODT, and RTF transformations to produce a
|
---|
91 | single document that contains all of the content that is referenced by the master map.
|
---|
92 | This file is not DITA and is specific to the DITA-OT. Its purpose is to simplify
|
---|
93 | processing for output transformations that result in a single document.</dd>
|
---|
94 | </dlentry>
|
---|
95 | <dlentry>
|
---|
96 | <dt>Chunking</dt>
|
---|
97 | <dd>When the @chunk attribute is used in a map, DITA documents might be split or merged
|
---|
98 | in a way that does not comply with any existing document type. For example, merging
|
---|
99 | documents might result in a topic that nests concept, task, and specialized
|
---|
100 | troubleshooting topics, even if no existing DTD or Schema permits that combination in
|
---|
101 | a document.</dd>
|
---|
102 | </dlentry>
|
---|
103 | </dl>
|
---|
104 | </p></section>
|
---|
105 | </refbody>
|
---|
106 | </reference>
|
---|