1
<refentry id="generate.id.attributes">
3
<refentrytitle>generate.id.attributes</refentrytitle>
4
<refmiscinfo role="type"></refmiscinfo>
7
<refname>generate.id.attributes</refname>
8
<refpurpose></refpurpose>
12
<src:fragment id='generate.id.attributes.frag'>
13
<xsl:param name="generate.id.attributes" select="0"/>
17
<refsect1><title>Description</title>
19
<para>If non-zero, the HTML stylesheet will generate ID attributes on
20
containers. For example, the markup:</para>
22
<screen><![CDATA[<section id="foo"><title>Some Title</title>
23
<para>Some para.</para>
24
</section>]]></screen>
26
<para>might produce:</para>
28
<screen><![CDATA[<div class="section" id="foo">
33
<para>The alternative is to generate anchors:</para>
35
<screen><![CDATA[<div class="section">
36
<h2><a name="foo"></a>Some Title</h2>
40
<para>Because the <sgmltag class="attribute">name</sgmltag> attribute of
41
the <sgmltag>a</sgmltag> element and the <sgmltag class="attribute">id</sgmltag>
42
attribute of other tags are both of type <quote>ID</quote>, producing both
43
generates invalid documents.</para>
45
<para>As of version 1.50, you can use this switch to control which type of
46
identifier is generated. For backwards-compatibility, generating
47
<sgmltag>a</sgmltag> anchors is preferred.</para>
49
<para>Note: at present, this switch is incompletely implemented.
50
Disabling ID attributes will suppress them, but enabling ID attributes
51
will not suppress the anchors.</para>