VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/doc/dev_ref/processing-order.html@ 99507

最後變更 在這個檔案從99507是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.0 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html xml:lang="en-us" lang="en-us">
5<head>
6<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7<meta name="copyright" content="(C) Copyright 2005"/>
8<meta name="DC.rights.owner" content="(C) Copyright 2005"/>
9<meta name="DC.Type" content="concept"/>
10<meta name="DC.Title" content="DITA-OT processing order"/>
11<meta name="abstract" content="The order of processing is often significant when evaluating DITA content. Although the DITA specification does not mandate a specific order for processing, the DITA-OT has determined that performing filtering before conref resolution best meets user expectations. Switching the order of processing, while legal, may give different results."/>
12<meta name="description" content="The order of processing is often significant when evaluating DITA content. Although the DITA specification does not mandate a specific order for processing, the DITA-OT has determined that performing filtering before conref resolution best meets user expectations. Switching the order of processing, while legal, may give different results."/>
13<meta name="DC.Relation" scheme="URI" content="../dev_ref/DITA-OTArchitecture.html"/>
14<meta name="DC.Format" content="XHTML"/>
15<meta name="DC.Identifier" content="processing-order"/>
16<meta name="DC.Language" content="en-us"/>
17<link rel="stylesheet" type="text/css" href="../commonltr.css"/>
18<link rel="stylesheet" type="text/css" href="../dita-ot-doc.css"/>
19<title>DITA-OT processing order</title>
20</head>
21<body id="processing-order">
22
23
24<h1 class="title topictitle1">DITA-OT processing order</h1>
25
26
27<div class="body conbody"><p class="shortdesc">The order of processing is often significant when evaluating DITA content. Although the
28DITA specification does not mandate a specific order for processing, the DITA-OT has determined that
29performing filtering before conref resolution best meets user expectations. Switching the order of
30processing, while legal, may give different results. </p>
31
32<div class="section">
33<div class="p">The DITA-OT project has found that filtering first provides several benefits. Consider the
34following sample that contains a &lt;note&gt; element that both uses conref and contains a @product
35attribute:<pre class="pre codeblock">&lt;note conref="documentA.dita#doc/note" product="MyProd"/&gt;</pre>
36</div>
37<p class="p">If the @conref attribute is evaluated first, then documentA must be parsed in order to retrieve
38the note content. That content is then stored in the current document (or in a representation of
39that document in memory). However, if all content with product="MyProd" is filtered out, then that
40work is all discarded later in the build.</p>
41<div class="p">If the filtering is done first (as in the DITA-OT), this element is discarded immediately, and
42documentA is never examined. This provides several important benefits:<ul class="ul">
43<li class="li">Time is saved by discarding unused content as early as possible; all future steps can load the
44document without this extra content.</li>
45
46<li class="li">Additional time is saved case by not evaluating the @conref attribute; in fact, documentA does
47not even need to be parsed.</li>
48
49<li class="li">Any user reproducing this build does not need documentA. If the content is sent to a translation
50team, that team can reproduce an error-free build without documentA; this means documentA can be
51kept back from translation, preventing accidental translation and increased costs.</li>
52
53</ul>
54</div>
55
56<div class="p">If the order of these two steps is reversed, so that conref is evaluated first, it is possible
57that results will differ. For example, in the code sample above, the @product attribute will
58override the product setting on the referencing note. Assume that the &lt;note&gt; elements in
59documentA is defined as
60follows:<pre class="pre codeblock">&lt;note id="note" product="SomeOtherProduct"&gt;This is an important note!&lt;/note&gt;</pre>
61</div>
62
63<p class="p">A process that filters out product="SomeOtherProduct" will remove the target of the original
64conref before that conref is ever evaluated, which will result in a broken reference. Evaluating
65conref first would resolve the reference, and only later filter out the target of the conref. While
66some use cases can be found where this is the desired behavior, benefits such as those described
67above resulted in the current processing order used by the DITA-OT..</p>
68</div>
69
70</div>
71
72<div class="related-links">
73<div class="familylinks">
74<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../dev_ref/DITA-OTArchitecture.html" title="The DITA Open Toolkit (DITA-OT) is an open-source implementation of the OASIS specification for the Darwin Information Typing Architecture (DITA). The toolkit uses ANT, XSLT, and Java to implement transforming DITA content (maps and topics) into different deliverable formats.">Architecture of the DITA Open Toolkit</a></div>
75</div>
76</div>
77
78</body>
79</html>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette