Section Header |
This topic details the AMDL syntax and semantics of section headers.
Section headers serve the following purposes:
Specify the section's title.
Terminate the topic's introduction, if present.
Start a new section.
Optionally, assign values to the section's attributes.
Two header syntaxes are defined:
a line consisting of
zero to three space characters, followed by
text, followed by,
optionally, an attribute enclosure;
a line consisting of
zero to three space characters, followed by,
one or more - (hyphen) characters, followed by,
optionally, any number of space characters.
a line consisting of
optionally, up to three space characters, followed by
two to six # (hash) characters, followed by
one or more space characters, followed by
text, followed by,
optionally, any number of space characters followed by any number of # characters, followed by,
optionally, an attribute enclosure.
In both syntaxes the text must be XML-escaped, i.e.
all occurrences of < must be replaced with <,
all occurrences of > must be replaced with >, and
all occurrences of & must be replaced with &.
Examples --------
## Syntax
If a top-level section is titled See Also (case-sensitive), its contents shall be interpreted differently, i.e.
all elements other than links and sub-sections shall be ignored, and
all formatting shall be ignored.
The following sub-section titles are recognized (case-sensitive):
Concepts
Other Resources
Tasks
Reference
Links contained directly in the See Also section, or in an unrecognized sub-section thereof, shall be placed in the Other Resources sub-section.
External links shall be placed in the Other Resources sub-section.
Section attributes may be specified using the following syntax:
{#identifier .class1 .class2 name1="value1" name2="value2" ...}
The following attributes are defined:
a string value to be used for resolving local links to the section. If no value is specified, a unique identifier will be assigned based on the header text; detailed algorithm TBD.
any of the following:
autoOutline - equivalent to specifying autoOutline="true".
a Boolean value indicating whether an automatic section outline should be generated. If no attribute value is specified, a section outline shall be generated for a section with a setex-style header, and shall not be generated for a section with an ATX-style header.
an integer value indicating the maximum depth of the automatic section outline, if one is generated. If no attribute value is specified, a zero-depth outline shall be generated.
a string value to be used as the lead-in text rendered before the automatic outline, if one is generated. If an empty string is specified, the lead-in text shall be omitted. If no attribute value is specified, a default lead-in text shall be rendered.
N/A.
Partial, pending parser modification.
Attributes are unsupported.
Use different header syntaxes to affect automatic outline rendering.