Debian Codegraph @

en/refpages/elements/synopfragmentref/refentry.xml

raw symbols SCIP
1 <refentry id="synopfragmentref.element">
2 <?dbhtml filename="synopfragmentref.html"?>
3 <refentryinfo>
4 <pubdate>$Date$</pubdate>
5 <releaseinfo>$Revision$</releaseinfo>
6 </refentryinfo>
7
8 <refmeta>
9 <indexterm><primary>elements</primary>
10 <secondary>synopfragmentref</secondary></indexterm>
11 <refentrytitle>synopfragmentref</refentrytitle>
12 <refmiscinfo>Element</refmiscinfo>
13 </refmeta>
14 <refnamediv>
15 <refname>synopfragmentref</refname>
16 <refpurpose>&synopfragmentref.purpose;</refpurpose>
17 </refnamediv>
18
19 &synopfragmentref.synopsis.gen;
20 <refsect1 condition='ref.description'><title>Description</title>
21
22 <para>
23 A complex <sgmltag>CmdSynopsis</sgmltag> can be made more manageable
24 with <sgmltag>SynopFragment</sgmltag>s. Rather than attempting to
25 present the entire synopsis in one large
26 piece, parts of the synopsis can be extracted out and presented
27 elsewhere.
28 </para>
29 <para>
30 At the point where each piece was extracted, insert a
31 <sgmltag>SynopFragmentRef</sgmltag> that points to the fragment. The
32 content of the <sgmltag>SynopFragmentRef</sgmltag> will be presented inline.
33 </para>
34 <para>
35 The extracted pieces are placed in <sgmltag>SynopFragment</sgmltag>s
36 at the end of the <sgmltag>CmdSynopsis</sgmltag>.
37 </para>
38 <note>
39 <para>
40 The content model of <sgmltag>SynopFragmentRef</sgmltag> is unique in
41 the &SGML; version of DocBook because it contains <literal>RCDATA</literal>
42 declared content. What this means is that all markup inside a
43 <sgmltag>SynopFragmentRef</sgmltag> is ignored, except for entity references.
44 </para>
45 <para>
46 How, you might ask, is this different from a content model that
47 includes only <literal>#PCDATA</literal>? The difference is only
48 apparent when you consider inclusions. Recall that an inclusion
49 provides a list of elements that can occur <emphasis>anywhere</emphasis>
50 inside an element. So, for example, the fact that
51 <sgmltag>Chapter</sgmltag> lists <sgmltag>IndexTerm</sgmltag> as an inclusion
52 means that <sgmltag>IndexTerm</sgmltag> can legally occur inside of a
53 <sgmltag>SynopFragmentRef</sgmltag> that's nested inside a chapter,
54 even if the content model of <sgmltag>SynopFragmentRef</sgmltag> does
55 not explicitly allow <sgmltag>IndexTerm</sgmltag>s. Making the content
56 <literal>RCDATA</literal> ensures that the markup will not be recognized,
57 even if it's allowed by inclusion. A neat trick.
58 </para>
59 <para>
60 &XML; does not support <literal>RCDATA</literal>.
61 </para>
62 </note>
63
64 <refsect2><title>Processing expectations</title>
65 <para>
66 &format.block;
67 </para>
68 <para>
69 The presentation system is responsible for generating text that
70 makes the reader aware of the link. This can be done with
71 numbered bullets, or any other appropriate mechanism.
72 </para>
73 <para>
74 Online systems have additional flexibility. They may generate
75 hot links between the references and the fragments, for example,
76 or place the fragments in pop-up windows.
77 </para>
78 </refsect2>
79
80
81 &synopfragmentref.parents.gen;
82 </refsect1>
83 <refsect1 condition='ref.elem.attrdesc'><title>Attributes</title>
84 <variablelist>
85 <varlistentry><term>linkend</term>
86 <listitem>
87 <para>
88 <sgmltag class="attribute">Linkend</sgmltag> points to the <sgmltag>SynopFragment</sgmltag> referenced.
89 </para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </refsect1>
94 <refsect1 condition='ref.elem.seealso'><title>See Also</title>
95 &synopfragmentref.seealso.gen;
96 </refsect1>
97 <refsect1><title>Examples</title>
98
99 &synopfragmentref.example.seealso.gen;
100 </refsect1>
101 </refentry>
102