OLD | NEW |
| (Empty) |
1 <refentry xmlns="http://docbook.org/ns/docbook" | |
2 xmlns:xlink="http://www.w3.org/1999/xlink" | |
3 xmlns:xi="http://www.w3.org/2001/XInclude" | |
4 xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" | |
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
6 version="5.0" xml:id="generate.id.attributes"> | |
7 <refmeta> | |
8 <refentrytitle>generate.id.attributes</refentrytitle> | |
9 <refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> | |
10 </refmeta> | |
11 <refnamediv> | |
12 <refname>generate.id.attributes</refname> | |
13 <refpurpose>Generate ID attributes on container elements?</refpurpose> | |
14 </refnamediv> | |
15 | |
16 <refsynopsisdiv> | |
17 <src:fragment xml:id="generate.id.attributes.frag"> | |
18 <xsl:param name="generate.id.attributes" select="0"/> | |
19 </src:fragment> | |
20 </refsynopsisdiv> | |
21 | |
22 <refsection><info><title>Description</title></info> | |
23 | |
24 <para>If non-zero, the HTML stylesheet will generate ID attributes on | |
25 containers. For example, the markup:</para> | |
26 | |
27 <screen><section id="foo"><title>Some Title</title> | |
28 <para>Some para.</para> | |
29 </section></screen> | |
30 | |
31 <para>might produce:</para> | |
32 | |
33 <screen><div class="section" id="foo"> | |
34 <h2>Some Title</h2> | |
35 <p>Some para.</p> | |
36 </div></screen> | |
37 | |
38 <para>The alternative is to generate anchors:</para> | |
39 | |
40 <screen><div class="section"> | |
41 <h2><a name="foo"></a>Some Title</h2> | |
42 <p>Some para.</p> | |
43 </div></screen> | |
44 | |
45 <para>Because the <tag class="attribute">name</tag> attribute of | |
46 the <tag>a</tag> element and the <tag class="attribute">id</tag> | |
47 attribute of other tags are both of type <quote>ID</quote>, producing both | |
48 generates invalid documents.</para> | |
49 | |
50 <para>As of version 1.50, you can use this switch to control which type of | |
51 identifier is generated. For backwards-compatibility, generating | |
52 <tag>a</tag> anchors is preferred.</para> | |
53 | |
54 <para>Note: at present, this switch is incompletely implemented. | |
55 Disabling ID attributes will suppress them, but enabling ID attributes | |
56 will not suppress the anchors.</para> | |
57 | |
58 </refsection> | |
59 </refentry> | |
OLD | NEW |