VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/processing-order.dita@ 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
檔案大小: 2.8 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
3 "concept.dtd">
4<concept id="processing-order" xml:lang="en-us">
5<title>DITA-OT processing order</title>
6<shortdesc>The order of processing is often significant when evaluating DITA content. Although the
7DITA specification does not mandate a specific order for processing, the DITA-OT has determined that
8performing filtering before conref resolution best meets user expectations. Switching the order of
9processing, while legal, may give different results. </shortdesc>
10<conbody>
11<section>
12<p>The DITA-OT project has found that filtering first provides several benefits. Consider the
13following sample that contains a &lt;note> element that both uses conref and contains a @product
14attribute:<codeblock>&lt;note conref="documentA.dita#doc/note" product="MyProd"/></codeblock></p><p>If the @conref attribute is evaluated first, then documentA must be parsed in order to retrieve
15the note content. That content is then stored in the current document (or in a representation of
16that document in memory). However, if all content with product="MyProd" is filtered out, then that
17work is all discarded later in the build.</p><p>If the filtering is done first (as in the DITA-OT), this element is discarded immediately, and
18documentA is never examined. This provides several important benefits:<ul>
19<li>Time is saved by discarding unused content as early as possible; all future steps can load the
20document without this extra content.</li>
21<li>Additional time is saved case by not evaluating the @conref attribute; in fact, documentA does
22not even need to be parsed.</li>
23<li>Any user reproducing this build does not need documentA. If the content is sent to a translation
24team, that team can reproduce an error-free build without documentA; this means documentA can be
25kept back from translation, preventing accidental translation and increased costs.</li>
26</ul></p>
27<p>If the order of these two steps is reversed, so that conref is evaluated first, it is possible
28that results will differ. For example, in the code sample above, the @product attribute will
29override the product setting on the referencing note. Assume that the &lt;note> elements in
30documentA is defined as
31follows:<codeblock>&lt;note id="note" product="SomeOtherProduct">This is an important note!&lt;/note></codeblock></p>
32<p>A process that filters out product="SomeOtherProduct" will remove the target of the original
33conref before that conref is ever evaluated, which will result in a broken reference. Evaluating
34conref first would resolve the reference, and only later filter out the target of the conref. While
35some use cases can be found where this is the desired behavior, benefits such as those described
36above resulted in the current processing order used by the DITA-OT..</p></section>
37</conbody>
38</concept>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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