1997 2021 Ericsson AB. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Block Tags

block_tags.xml

Block tags typically define a separate block of information, such as a paragraph or a list.

The following subset of block tags are common for all DTDs in the OTP DTD suite: <p>, <pre>, <code>, <list>, <taglist>, <codeinclude> and

## <br> - Line Break

Forces a newline. Example:

    Eat yourself<br/>senseless!

results in:

Eat yourself
senseless!

The <br> tag is both a block- and an inline tag.

## <code> - Code Example

Highlight code examples. Example:

    <code>
    sum([H|T]) ->
        H + sum(T);
    sum([]) ->
        0.
    </code>

results in:

`sum([H|T]) -> H + sum(T); sum([]) -> 0.`

There is an attribute type = "erl" | "c" | "none", but currently this attribute is ignored. Default value is "none"

No tags are allowed within the tag and no character entities are expanded.

## <codeinclude> - Code Inclusion

Include external code snippets. The attribute file gives the file name and tag defines a string which delimits the code snippet. Example:

    <codeinclude file="example.txt" tag="%% Erlang example"/>

results in:

provided there is a file named examples.txt looking like this:

`... %% Erlang example -module(example). start() -> {error,"Pid required!"}. start(Pid) -> spawn(fun() -> init(Pid) end). %% Erlang example ...`

If the tag attribute is omitted, the whole file is included.

There is also an attribute type = "erl" | "c" | "none", but currently this attribute is ignored. Default value is "none"

## <list> - List

The attribute type = "ordered"|"bulleted" decides if the list is numbered or bulleted. Default is "bulleted".

Lists contains list items, tag <item>, which can contain plain text, the common subset of block tags and inline tags. Example:

    <list type="ordered">
      <item>Askosal:
        <list>
          <item>Nullalisis</item>
          <item>Facilisis</item>
        </list>
      </item>
      <item>Ankara</item>
    </list>

results in:

Askosal:

Nullalisis Facilisis Ankara

## <marker> - Marker

Used as an anchor for hypertext references. The <marker> tag is both a block- and an inline tag and is described in the Inline Tags section.

## <p> - Paragraph

Paragraphs contain plain text and inline tags. Example:

    <p>I call specific attention to
      the authority given by the <em>21st Amendment</em>
      to the Constitution to prohibit transportation
      or importation of intoxicating liquors into
      any State in violation of the laws of such
      State.</p>

results in:

I call specific attention to the authority given by the 21st Amendment to the Constitution to prohibit transportation or importation of intoxicating liquors into any State in violation of the laws of such State.

## <note> - Note

Highlights a note. Can contain block tags except <note>, <warning>, <image> and <table>. Example:

    <note>
      <p>This function is mainly intended for debugging.</p>
    </note>

results in:

This function is mainly intended for debugging.

## <pre> - Pre-formatted Text

Used for documentation of system interaction. Can contain text, <see*> tags, <url> and <input> tags.

The <input> tag is used to highlight user input. Example:

    <pre>
    $ <input>erl</input>
    Erlang (BEAM) emulator version 5.5.3 [async-threads:0] [hipe] [kernel-poll:false]

    Eshell V5.5.3  (abort with ^G)
    1> <input>pwd().</input>
    /home/user
    2> <input>halt().</input>
    </pre>

results in:

    $ erl
    Erlang (BEAM) emulator version 5.5.3 [async-threads:0] [hipe] [kernel-poll:false]

    Eshell V5.5.3  (abort with ^G)
    1> pwd().
    /home/user
    2> halt().

All character entities are expanded.

## <quote> - Quotation

Highlight quotations from other works, or dialog spoken by characters in a narrative. Contains one or more <p> tags. Example:

    <p>Whereas Section 217(a) of the Act of Congress entitled
    "An Act ..." approved June 16, 1933, provides as follows:</p>
    <quote>
      <p>Section 217(a) The President shall proclaim the law.</p>
    </quote>

results in:

Whereas Section 217(a) of the Act of Congress entitled "An Act ..." approved June 16, 1933, provides as follows:

Section 217(a) The President shall proclaim the law.

## <taglist> - Definition List

Definition lists contains pairs of tags, <tag>, and list items, <item>.

<tag> can contain plain text, <c>, <em>, <see*> tags and <url> tags.

<item> can contain plain text, the common subset of block tags and inline tags. Example:

    <taglist>
      <tag><c>eacces</c></tag>
      <item>Permission denied.</item>
      <tag><c>enoent</c></tag>
      <item>No such file or directory.</item>
    </taglist>

results in:

eacces Permission denied. enoent No such file or directory.

## <warning> - Warning

Highlights a warning. Can contain block tags except <note>, <warning>, <image> and <table>. Example:

    <warning>
      <p>This function might be removed in a future version without
        prior warning.</p>
    </warning>

results in:

This function might be removed in a future version without prior warning.

## <image> - Image

Graphics is imported using the <image> tag. An image caption <icaption>, containing plain text, must be supplied. Example:

    <image file="man">
      <icaption>A Silly Man</icaption>
    </image>

results in:

A Silly Man

This assumes that man.gif exists in the current directory.

## <table> - Table

The table format is similar to how tables are described in HTML 3.2. A table contains one or more rows, <row>, and a table caption <tcaption>, containing plain text.

Each row contains one or more cells, <cell>. The attributes align = "left"|"center"|"right" and valign = "top"|"middle"|"bottom" decides how text is aligned in the cell horizontally and vertically. Default is "left" and "middle".

Each cell contains plain text and inline tags. Example:

        <table>
          <row>
            <cell align="left" valign="top"><em>Boys</em></cell>
            <cell align="center" valign="middle"><em>Girls</em></cell>
          </row>
          <row>
            <cell align="left" valign="middle">Juda</cell>
            <cell align="right" valign="bottom">Susy</cell>
          </row>
          <row>
            <cell align="left" valign="middle">Anders</cell>
            <cell align="left" valign="middle">Victoria</cell>
          </row>
          <tcaption>A table caption</tcaption>
        </table>

results in:

Boys Girls
Juda Susy
Anders Victoria
A table caption