summaryrefslogtreecommitdiff
path: root/chunked/ch14.html
blob: 74ba9a73fc53acb6ca943b855493373287d938f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 14. AttributeList Element</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ch13.html" title="Chapter 13. BlockId Element" /><link rel="next" href="ch15.html" title="Chapter 15. Paragraphs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="ch13.html"><img src="images/icons/prev.png" alt="Prev" /></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch15.html"><img src="images/icons/next.png" alt="Next" /></a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="X79"></a>Chapter 14. AttributeList Element</h1></div></div></div><p>An <span class="emphasis"><em>AttributeList</em></span> block element is an <a class="link" href="ch29.html" title="Chapter 29. Attribute Lists">attribute list</a> on a
line by itself:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
<span class="emphasis"><em>AttributeList</em></span> attributes are only applied to the immediately
  following block element — the attributes are made available to the
  block’s markup template.
</li><li class="listitem">
Multiple contiguous <span class="emphasis"><em>AttributeList</em></span> elements are additively combined
  in the order they appear.
</li><li class="listitem">
The first positional attribute in the list is often used to specify
  the ensuing element’s <a class="link" href="ch32.html#X23" title="32.1. Styles">style</a>.
</li></ul></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_attribute_value_substitution"></a>14.1. Attribute value substitution</h2></div></div></div><p>By default, only substitutions that take place inside attribute list
values are attribute references, this is because not all attributes
are destined to be marked up and rendered as text (for example the
table <span class="emphasis"><em>cols</em></span> attribute). To perform normal inline text substitutions
(special characters, quotes, macros, replacements) on an attribute
value you need to enclose it in single quotes. In the following quote
block the second attribute value in the AttributeList is quoted to
ensure the <span class="emphasis"><em>http</em></span> macro is expanded to a hyperlink.</p><pre class="screen">[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
_____________________________________________________________________
Sir, a woman's preaching is like a dog's walking on his hind legs. It
is not done well; but you are surprised to find it done at all.
_____________________________________________________________________</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_common_attributes"></a>14.2. Common attributes</h2></div></div></div><p>Most block elements support the following attributes:</p><div class="informaltable"><table class="informaltable" cellpadding="4px" style="border-collapse: collapse;border-top: 3px solid #527bbd; border-bottom: 3px solid #527bbd; "><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top">Name </th><th style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top">Backends </th><th style="border-bottom: 1px solid #527bbd; " align="left" valign="top">Description</th></tr></thead><tbody><tr><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p><span class="emphasis"><em>id</em></span></p></td><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p>html4, html5, xhtml11, docbook</p></td><td style="border-bottom: 1px solid #527bbd; " align="left" valign="top"><p>Unique identifier typically serve as link targets.
Can also be set by the <span class="emphasis"><em>BlockId</em></span> element.</p></td></tr><tr><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p><span class="emphasis"><em>role</em></span></p></td><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p>html4, html5, xhtml11, docbook</p></td><td style="border-bottom: 1px solid #527bbd; " align="left" valign="top"><p>Role contains a string used to classify or subclassify an element and
can be applied to AsciiDoc block elements.  The AsciiDoc <span class="emphasis"><em>role</em></span>
attribute is translated to the <span class="emphasis"><em>role</em></span> attribute in DocBook outputs and
is included in the <span class="emphasis"><em>class</em></span> attribute in HTML outputs, in this respect
it behaves like the <a class="link" href="ch10.html#X96" title="10.1.1. Quoted text attributes">quoted text role attribute</a>.</p>
<p>DocBook XSL Stylesheets translate DocBook <span class="emphasis"><em>role</em></span> attributes to HTML
<span class="emphasis"><em>class</em></span> attributes; CSS can then be used
<a class="ulink" href="http://www.sagehill.net/docbookxsl/UsingCSS.html" target="_top">to style the
generated HTML</a>.</p></td></tr><tr><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p><span class="emphasis"><em>reftext</em></span></p></td><td style="border-right: 1px solid #527bbd; border-bottom: 1px solid #527bbd; " align="left" valign="top"><p>docbook</p></td><td style="border-bottom: 1px solid #527bbd; " align="left" valign="top"><p><span class="emphasis"><em>reftext</em></span> is used to set the DocBook <span class="emphasis"><em>xreflabel</em></span> attribute.
The <span class="emphasis"><em>reftext</em></span> attribute can an also be set by the <span class="emphasis"><em>BlockId</em></span> element.</p></td></tr><tr><td style="border-right: 1px solid #527bbd; " align="left" valign="top"><p><span class="emphasis"><em>floatstyle</em></span></p></td><td style="border-right: 1px solid #527bbd; " align="left" valign="top"><p>docbook</p></td><td style="" align="left" valign="top"><p><span class="emphasis"><em>floatstyle</em></span> is used to specify the floatstyle attribute for the
titled table, example, image and equation blocks. This is useful when
used in conjuction with the dblatex toolchain. A typical example
would be to specify the value as <span class="emphasis"><em>floatstyle="[htbp]"</em></span>.</p></td></tr></tbody></table></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch13.html"><img src="images/icons/prev.png" alt="Prev" /></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch15.html"><img src="images/icons/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/icons/home.png" alt="Home" /></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>