V5.2unionsynopsis
unionsynopsis — The syntax summary for a union-of-types definition.
Synopsis
- Sequence of:
unionname
?union
?- Zero or more of:
- Optionally one of:
- Sequence of:
- One or more of:
annotation
bridgehead
formalgroup
remark
revhistory
- Indexing inlines
- Admonition elements
- Formal elements
- Graphic elements
- Informal elements
informalequation
informalexample
informalfigure
informaltable
(db.cals.informaltable)informaltable
(db.html.informaltable)
- List elements
- Paragraph elements
- Publishing elements
- Synopsis elements
- Technical elements
- Verbatim elements
- Optionally one of:
- Sequence of:
- One or more of:
- Zero or more of:
- One or more of:
- One or more of:
- Sequence of:
- One or more of:
- Sequence of:
- One or more of:
- Zero or more of:
- One or more of:
- One or more of:
- Sequence of:
Attributes
Common attributes and common linking attributes.
Additional attributes:
- language
- ordered (enumeration)
- “0”
- “1”
Additional Constraints
- If this element is the root element, it must have a version attribute.
Description
A unionsynopsis
contains the syntax summary of a
union (generally speaking, unions programming language sense).
This is one of the few places where DocBook attempts to model as
well as describe. The content model of unionsynopsis
was designed
to capture a wide range of semantics.
Processing expectations
Formatted inline.
Attributes
Common attributes and common linking attributes.
- language
Identifies the language (i.e. programming language) of the content.
- ordered
Indicates how the value of a union is specified.
Enumerated values: “0” Value of enum is specified explicitly using enumvalue
“1” Value of enum is inferred from its position
Parents
These elements contain unionsynopsis
: abstract
, acknowledgements
, annotation
, answer
, appendix
, article
, bibliodiv
, bibliography
, bibliolist
, blockquote
, callout
, calloutlist
, caption
(db.caption), caution
, chapter
, classsynopsis
, colophon
, constraintdef
, cover
, danger
, dedication
, entry
, enumsynopsis
, example
, figure
, footnote
, glossary
, glossdef
, glossdiv
, glosslist
, important
, index
, indexdiv
, informalexample
, informalfigure
, itemizedlist
, legalnotice
, legalsection
, listitem
, macrosynopsis
, methodparam
, methodsynopsis
, msgexplan
, msgtext
, namespacesynopsis
, note
, orderedlist
, para
, partintro
, preface
, procedure
, qandadiv
, qandaset
, question
, refsect1
, refsect2
, refsect3
, refsection
, refsynopsisdiv
, result
, revdescription
, sect1
, sect2
, sect3
, sect4
, sect5
, section
, setindex
, sidebar
, simplesect
, step
, synopsisinfo
, taskprerequisites
, taskrelated
, tasksummary
, td
, textobject
, th
, tip
, toc
, tocdiv
, topic
, typedefsynopsis
, unionsynopsis
, variablelist
, warning
.
Children
The following elements occur in unionsynopsis: address
, anchor
, annotation
, bibliolist
, blockquote
, bridgehead
, calloutlist
, caution
, classsynopsis
, cmdsynopsis
, constraintdef
, constructorsynopsis
, danger
, destructorsynopsis
, enumsynopsis
, epigraph
, equation
, example
, fieldsynopsis
, figure
, formalgroup
, formalpara
, funcsynopsis
, glosslist
, important
, indexterm
(db.indexterm.endofrange), indexterm
(db.indexterm.singular), indexterm
(db.indexterm.startofrange), informalequation
, informalexample
, informalfigure
, informaltable
(db.cals.informaltable), informaltable
(db.html.informaltable), itemizedlist
, legalsection
, literallayout
, macrosynopsis
, mediaobject
, methodsynopsis
, msgset
, namespacesynopsis
, note
, orderedlist
, para
, procedure
, productionset
, programlisting
, programlistingco
, qandaset
, refentry
, remark
, revhistory
, screen
, screenco
, screenshot
, section
, segmentedlist
, sidebar
, simpara
, simplelist
, simplesect
, synopsis
, synopsisinfo
, table
(db.cals.table), table
(db.html.table), task
, tip
, typedefsynopsis
, union
, unionname
, unionsynopsis
, variablelist
, warning
.
Examples
<article xmlns:db="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.2">
<info>
<title>Julia unions</title>
<abstract>
<para>Model the following construct: <code>IntOrString = Union{Int,AbstractString}</code></para>
</abstract>
</info>
<unionsynopsis>
<union>
<unionname>IntOrString</unionname>
<type>Int</type>
<type>AbstractString</type>
</union>
</unionsynopsis>
</article>