VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/preprocess-conref.dita@ 99040

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

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.7 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
3 "concept.dtd">
4<concept id="preprocess-conref" xml:lang="en-us">
5<title>Conref (conref)</title>
6<shortdesc>The <codeph>conref</codeph> step resolves conref attributes, processing only the DITA
7 maps or topics that use the @conref attribute. This step is implemented in XSLT.</shortdesc>
8<conbody>
9<section><p>The values of the @id attribute on referenced content are changed as the elements are pulled into
10 the new locations. This ensures that the values of the @id attribute within the referencing
11 topic remain unique.</p><p>If an element is pulled into a new context along with a cross reference that references the
12 target, both the values of the @id and @xref attributes are updated so that they remain
13 valid in the new location. For example, a referenced topic might include a section as in the
14 following example: <fig>
15 <title>Referenced topic that contains a section and cross reference</title>
16 <codeblock>&lt;topic id="referenced_topic">
17 &lt;title>...&lt;/title>
18 &lt;body>
19 &lt;section id="sect">&lt;title>Sample section&lt;/title>
20 &lt;p>Figure &lt;xref href="#referenced_topic/fig"/> contains an code sample that demonstrates ... .&lt;/p>
21 &lt;fig id="fig">&lt;title>Code sample&lt;/title>
22 &lt;codeblock>....&lt;/codeblock>
23 &lt;/fig>
24 &lt;/section>
25 &lt;/body>
26&lt;/topic></codeblock>
27 </fig></p><p>When the section is referenced using a @conref attribute, the value of the @id attribute on the
28 &lt;fig> element is modified to ensure that it remains unique in the new context. At the
29 same time, the &lt;xref> element is also modified so that it remains valid as a local
30 reference. For example, if the referencing topic has an @id set to "new_topic", then the
31 conrefed &lt;section> element may look like this in the intermediate document.<fig>
32 <title>Resolved conrefed &lt;section> element after the conref step</title>
33 <codeblock>&lt;section id="sect">&lt;title>Sample section&lt;/title>
34 &lt;p>Figure &lt;xref href="#new_topic/d1e25"/> contains an code sample that demonstrates ... .&lt;/p>
35 &lt;fig id="d1e25">&lt;title>Code sample&lt;/title>
36 &lt;codeblock>....&lt;/codeblock>
37 &lt;/fig>
38&lt;/section></codeblock>
39 </fig></p><p>In this case, the value of the @id attribute on the &lt;fig> element has been changed to a
40 generated value of "d1e25". At the same time, the &lt;xref> element has been updated to use
41 that new generated ID, so that the cross reference remains valid.</p></section>
42</conbody>
43</concept>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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