docbook 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/CLAUDE.md +19 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/README.adoc +335 -0
- data/Rakefile +12 -0
- data/docs/.lycheeignore +33 -0
- data/docs/Gemfile +10 -0
- data/docs/INDEX.adoc +67 -0
- data/docs/_config.yml +186 -0
- data/docs/advanced/element-classes.adoc +185 -0
- data/docs/advanced/frontend-customization.adoc +193 -0
- data/docs/advanced/index.adoc +14 -0
- data/docs/advanced/templates.adoc +123 -0
- data/docs/features/element-coverage.adoc +373 -0
- data/docs/features/html-output/data-model.adoc +285 -0
- data/docs/features/html-output/directory-mode.adoc +180 -0
- data/docs/features/html-output/index.adoc +90 -0
- data/docs/features/html-output/single-file-mode.adoc +125 -0
- data/docs/features/index-generation.adoc +197 -0
- data/docs/features/index.adoc +63 -0
- data/docs/features/numbering.adoc +183 -0
- data/docs/features/toc-generation.adoc +150 -0
- data/docs/features/xinclude/fragid-schemes.adoc +287 -0
- data/docs/features/xinclude/index.adoc +119 -0
- data/docs/features/xinclude/text-includes.adoc +123 -0
- data/docs/features/xinclude/xml-includes.adoc +167 -0
- data/docs/getting-started/index.adoc +50 -0
- data/docs/getting-started/installation.adoc +113 -0
- data/docs/getting-started/quick-start.adoc +161 -0
- data/docs/guides/converting-article.adoc +188 -0
- data/docs/guides/converting-book.adoc +192 -0
- data/docs/guides/index.adoc +12 -0
- data/docs/guides/roundtrip-testing.adoc +129 -0
- data/docs/interfaces/cli/format-command.adoc +109 -0
- data/docs/interfaces/cli/index.adoc +73 -0
- data/docs/interfaces/cli/roundtrip-command.adoc +125 -0
- data/docs/interfaces/cli/to-html-command.adoc +178 -0
- data/docs/interfaces/cli/validate-command.adoc +104 -0
- data/docs/interfaces/index.adoc +101 -0
- data/docs/interfaces/ruby-api/html-output.adoc +186 -0
- data/docs/interfaces/ruby-api/index.adoc +111 -0
- data/docs/interfaces/ruby-api/parsing.adoc +202 -0
- data/docs/interfaces/ruby-api/xinclude.adoc +162 -0
- data/docs/interfaces/ruby-api/xref-resolution.adoc +156 -0
- data/docs/lychee.toml +42 -0
- data/docs/reference/cli-options.adoc +155 -0
- data/docs/reference/content-block-types.adoc +243 -0
- data/docs/reference/glossary.adoc +119 -0
- data/docs/reference/index.adoc +12 -0
- data/docs/reference/supported-elements.adoc +749 -0
- data/docs/understanding/architecture.adoc +145 -0
- data/docs/understanding/content-pipeline.adoc +102 -0
- data/docs/understanding/data-models.adoc +156 -0
- data/docs/understanding/index.adoc +34 -0
- data/exe/docbook +7 -0
- data/frontend/dist/app.css +1 -0
- data/frontend/dist/app.iife.js +24 -0
- data/frontend/package-lock.json +1445 -0
- data/frontend/package.json +22 -0
- data/frontend/src/App.vue +230 -0
- data/frontend/src/app.ts +8 -0
- data/frontend/src/components/AppSidebar.vue +116 -0
- data/frontend/src/components/AppendixSection.vue +39 -0
- data/frontend/src/components/BlockRenderer.vue +358 -0
- data/frontend/src/components/ChapterSection.vue +32 -0
- data/frontend/src/components/ContentRenderer.vue +13 -0
- data/frontend/src/components/EbookContainer.vue +147 -0
- data/frontend/src/components/EbookTopBar.vue +116 -0
- data/frontend/src/components/PartSection.vue +44 -0
- data/frontend/src/components/ReferenceEntry.vue +80 -0
- data/frontend/src/components/SearchModal.vue +286 -0
- data/frontend/src/components/SectionContent.vue +31 -0
- data/frontend/src/components/SettingsPanel.vue +236 -0
- data/frontend/src/components/TocTreeItem.vue +135 -0
- data/frontend/src/composables/useEbookStore.ts +191 -0
- data/frontend/src/composables/useSearch.ts +249 -0
- data/frontend/src/env.d.ts +7 -0
- data/frontend/src/stores/documentStore.ts +221 -0
- data/frontend/src/stores/uiStore.ts +98 -0
- data/frontend/src/styles.css +253 -0
- data/frontend/tsconfig.json +24 -0
- data/frontend/tsconfig.node.json +11 -0
- data/frontend/vite.config.ts +30 -0
- data/lib/docbook/cli.rb +123 -0
- data/lib/docbook/document.rb +67 -0
- data/lib/docbook/elements/abbrev.rb +16 -0
- data/lib/docbook/elements/acknowledgements.rb +22 -0
- data/lib/docbook/elements/address.rb +18 -0
- data/lib/docbook/elements/alt.rb +16 -0
- data/lib/docbook/elements/annotation.rb +18 -0
- data/lib/docbook/elements/appendix.rb +34 -0
- data/lib/docbook/elements/article.rb +31 -0
- data/lib/docbook/elements/att.rb +15 -0
- data/lib/docbook/elements/attribution.rb +20 -0
- data/lib/docbook/elements/audioobject.rb +18 -0
- data/lib/docbook/elements/author.rb +18 -0
- data/lib/docbook/elements/bibliography.rb +24 -0
- data/lib/docbook/elements/bibliomixed.rb +40 -0
- data/lib/docbook/elements/biblioref.rb +20 -0
- data/lib/docbook/elements/blockquote.rb +26 -0
- data/lib/docbook/elements/book.rb +36 -0
- data/lib/docbook/elements/buildtarget.rb +16 -0
- data/lib/docbook/elements/callout.rb +22 -0
- data/lib/docbook/elements/calloutlist.rb +22 -0
- data/lib/docbook/elements/caution.rb +30 -0
- data/lib/docbook/elements/chapter.rb +62 -0
- data/lib/docbook/elements/citation.rb +16 -0
- data/lib/docbook/elements/citerefentry.rb +26 -0
- data/lib/docbook/elements/citetitle.rb +20 -0
- data/lib/docbook/elements/classname.rb +16 -0
- data/lib/docbook/elements/code.rb +16 -0
- data/lib/docbook/elements/colophon.rb +22 -0
- data/lib/docbook/elements/computeroutput.rb +18 -0
- data/lib/docbook/elements/copyright.rb +17 -0
- data/lib/docbook/elements/danger.rb +28 -0
- data/lib/docbook/elements/date.rb +16 -0
- data/lib/docbook/elements/dedication.rb +22 -0
- data/lib/docbook/elements/dir.rb +16 -0
- data/lib/docbook/elements/emphasis.rb +18 -0
- data/lib/docbook/elements/entry.rb +30 -0
- data/lib/docbook/elements/entrytbl.rb +22 -0
- data/lib/docbook/elements/equation.rb +26 -0
- data/lib/docbook/elements/example.rb +30 -0
- data/lib/docbook/elements/fieldsynopsis.rb +21 -0
- data/lib/docbook/elements/figure.rb +28 -0
- data/lib/docbook/elements/filename.rb +16 -0
- data/lib/docbook/elements/firstname.rb +16 -0
- data/lib/docbook/elements/firstterm.rb +18 -0
- data/lib/docbook/elements/footnote.rb +22 -0
- data/lib/docbook/elements/footnoteref.rb +21 -0
- data/lib/docbook/elements/foreignphrase.rb +18 -0
- data/lib/docbook/elements/formalpara.rb +20 -0
- data/lib/docbook/elements/function.rb +16 -0
- data/lib/docbook/elements/glossary.rb +24 -0
- data/lib/docbook/elements/glossdef.rb +18 -0
- data/lib/docbook/elements/glossentry.rb +26 -0
- data/lib/docbook/elements/glosssee.rb +18 -0
- data/lib/docbook/elements/glossseealso.rb +18 -0
- data/lib/docbook/elements/glossterm.rb +18 -0
- data/lib/docbook/elements/holder.rb +16 -0
- data/lib/docbook/elements/honorific.rb +16 -0
- data/lib/docbook/elements/imagedata.rb +29 -0
- data/lib/docbook/elements/imageobject.rb +22 -0
- data/lib/docbook/elements/important.rb +30 -0
- data/lib/docbook/elements/index.rb +26 -0
- data/lib/docbook/elements/indexdiv.rb +22 -0
- data/lib/docbook/elements/indexentry.rb +22 -0
- data/lib/docbook/elements/indexterm.rb +34 -0
- data/lib/docbook/elements/info.rb +25 -0
- data/lib/docbook/elements/informalexample.rb +24 -0
- data/lib/docbook/elements/informalfigure.rb +20 -0
- data/lib/docbook/elements/inlinemediaobject.rb +22 -0
- data/lib/docbook/elements/itemizedlist.rb +21 -0
- data/lib/docbook/elements/legalnotice.rb +22 -0
- data/lib/docbook/elements/link.rb +26 -0
- data/lib/docbook/elements/listitem.rb +32 -0
- data/lib/docbook/elements/literal.rb +16 -0
- data/lib/docbook/elements/literallayout.rb +22 -0
- data/lib/docbook/elements/mediaobject.rb +26 -0
- data/lib/docbook/elements/msg.rb +20 -0
- data/lib/docbook/elements/msgexplan.rb +22 -0
- data/lib/docbook/elements/msgset.rb +22 -0
- data/lib/docbook/elements/note.rb +30 -0
- data/lib/docbook/elements/orderedlist.rb +23 -0
- data/lib/docbook/elements/orgname.rb +16 -0
- data/lib/docbook/elements/para.rb +61 -0
- data/lib/docbook/elements/paragraph_like.rb +18 -0
- data/lib/docbook/elements/parameter.rb +16 -0
- data/lib/docbook/elements/part.rb +38 -0
- data/lib/docbook/elements/personname.rb +22 -0
- data/lib/docbook/elements/phrase.rb +20 -0
- data/lib/docbook/elements/preface.rb +58 -0
- data/lib/docbook/elements/primary.rb +16 -0
- data/lib/docbook/elements/procedure.rb +24 -0
- data/lib/docbook/elements/productname.rb +18 -0
- data/lib/docbook/elements/productnumber.rb +16 -0
- data/lib/docbook/elements/programlisting.rb +28 -0
- data/lib/docbook/elements/property.rb +16 -0
- data/lib/docbook/elements/pubdate.rb +16 -0
- data/lib/docbook/elements/publishername.rb +16 -0
- data/lib/docbook/elements/quotation.rb +24 -0
- data/lib/docbook/elements/quote.rb +18 -0
- data/lib/docbook/elements/refentry.rb +32 -0
- data/lib/docbook/elements/refentrytitle.rb +16 -0
- data/lib/docbook/elements/reference.rb +26 -0
- data/lib/docbook/elements/refmeta.rb +29 -0
- data/lib/docbook/elements/refmiscinfo.rb +16 -0
- data/lib/docbook/elements/refname.rb +16 -0
- data/lib/docbook/elements/refnamediv.rb +22 -0
- data/lib/docbook/elements/refpurpose.rb +16 -0
- data/lib/docbook/elements/refsect1.rb +22 -0
- data/lib/docbook/elements/refsect2.rb +22 -0
- data/lib/docbook/elements/refsect3.rb +22 -0
- data/lib/docbook/elements/refsection.rb +32 -0
- data/lib/docbook/elements/releaseinfo.rb +16 -0
- data/lib/docbook/elements/remark.rb +20 -0
- data/lib/docbook/elements/replaceable.rb +16 -0
- data/lib/docbook/elements/row.rb +15 -0
- data/lib/docbook/elements/screen.rb +28 -0
- data/lib/docbook/elements/secondary.rb +16 -0
- data/lib/docbook/elements/sect1.rb +26 -0
- data/lib/docbook/elements/sect2.rb +24 -0
- data/lib/docbook/elements/sect3.rb +24 -0
- data/lib/docbook/elements/sect4.rb +24 -0
- data/lib/docbook/elements/sect5.rb +22 -0
- data/lib/docbook/elements/section.rb +66 -0
- data/lib/docbook/elements/see.rb +16 -0
- data/lib/docbook/elements/seealso.rb +18 -0
- data/lib/docbook/elements/set.rb +26 -0
- data/lib/docbook/elements/setindex.rb +24 -0
- data/lib/docbook/elements/sidebar.rb +22 -0
- data/lib/docbook/elements/simplesect.rb +32 -0
- data/lib/docbook/elements/step.rb +26 -0
- data/lib/docbook/elements/substeps.rb +18 -0
- data/lib/docbook/elements/subtitle.rb +16 -0
- data/lib/docbook/elements/surname.rb +16 -0
- data/lib/docbook/elements/table.rb +24 -0
- data/lib/docbook/elements/tag.rb +20 -0
- data/lib/docbook/elements/tbody.rb +15 -0
- data/lib/docbook/elements/term.rb +37 -0
- data/lib/docbook/elements/tertiary.rb +16 -0
- data/lib/docbook/elements/textobject.rb +18 -0
- data/lib/docbook/elements/tfoot.rb +15 -0
- data/lib/docbook/elements/tgroup.rb +21 -0
- data/lib/docbook/elements/thead.rb +15 -0
- data/lib/docbook/elements/tip.rb +30 -0
- data/lib/docbook/elements/title.rb +16 -0
- data/lib/docbook/elements/toc.rb +24 -0
- data/lib/docbook/elements/tocdiv.rb +22 -0
- data/lib/docbook/elements/tocentry.rb +20 -0
- data/lib/docbook/elements/topic.rb +26 -0
- data/lib/docbook/elements/type.rb +16 -0
- data/lib/docbook/elements/uri.rb +16 -0
- data/lib/docbook/elements/userinput.rb +18 -0
- data/lib/docbook/elements/variable.rb +16 -0
- data/lib/docbook/elements/variablelist.rb +19 -0
- data/lib/docbook/elements/varlistentry.rb +17 -0
- data/lib/docbook/elements/version.rb +16 -0
- data/lib/docbook/elements/videoobject.rb +18 -0
- data/lib/docbook/elements/warning.rb +30 -0
- data/lib/docbook/elements/xref.rb +18 -0
- data/lib/docbook/elements/year.rb +16 -0
- data/lib/docbook/elements.rb +204 -0
- data/lib/docbook/models/document_metadata.rb +30 -0
- data/lib/docbook/models/document_root.rb +33 -0
- data/lib/docbook/models/index_entry.rb +28 -0
- data/lib/docbook/models/reading_position.rb +22 -0
- data/lib/docbook/models/section_number.rb +18 -0
- data/lib/docbook/models/section_root.rb +29 -0
- data/lib/docbook/models/toc_node.rb +24 -0
- data/lib/docbook/models.rb +16 -0
- data/lib/docbook/output/data.rb +196 -0
- data/lib/docbook/output/html.rb +1450 -0
- data/lib/docbook/output/index_generator.rb +281 -0
- data/lib/docbook/output.rb +8 -0
- data/lib/docbook/services/document_builder.rb +258 -0
- data/lib/docbook/services/element_to_hash.rb +287 -0
- data/lib/docbook/services/index_generator.rb +134 -0
- data/lib/docbook/services/numbering_service.rb +186 -0
- data/lib/docbook/services/toc_generator.rb +138 -0
- data/lib/docbook/services.rb +14 -0
- data/lib/docbook/templates/document.html.liquid +20 -0
- data/lib/docbook/templates/partials/_head.liquid +39 -0
- data/lib/docbook/templates/partials/_scripts.liquid +10 -0
- data/lib/docbook/version.rb +5 -0
- data/lib/docbook/xinclude_resolver.rb +217 -0
- data/lib/docbook/xref_resolver.rb +78 -0
- data/lib/docbook.rb +17 -0
- data/sig/docbook.rbs +4 -0
- metadata +385 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
title: Element Coverage
|
|
4
|
+
parent: Features
|
|
5
|
+
nav_order: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Element Coverage
|
|
9
|
+
|
|
10
|
+
The Metanorma DocBook gem provides comprehensive support for DocBook XML elements through 157 typed element classes. All element classes are implemented as `Lutaml::Model::Serializable` subclasses, providing type-safe parsing, serialization, and traversal.
|
|
11
|
+
|
|
12
|
+
## Element Classes by Category
|
|
13
|
+
|
|
14
|
+
### Structural (30)
|
|
15
|
+
|
|
16
|
+
Core document structure elements that define the document hierarchy.
|
|
17
|
+
|
|
18
|
+
[cols="1,3"]
|
|
19
|
+
|===
|
|
20
|
+
| Element | Description
|
|
21
|
+
|
|
22
|
+
| `Article` | Top-level article document
|
|
23
|
+
| `Book` | Top-level book document
|
|
24
|
+
| `Set` | Collection of books
|
|
25
|
+
| `Part` | Major division within a book
|
|
26
|
+
| `Chapter` | Chapter within a part or book
|
|
27
|
+
| `Section` | Generic nested section
|
|
28
|
+
| `Sect1`--`Sect5` | Numbered section levels 1--5
|
|
29
|
+
| `SimpleSect` | Untitled/minor section
|
|
30
|
+
| `Appendix` | Appendix division
|
|
31
|
+
| `Preface` | Front matter preface
|
|
32
|
+
| `Dedication` | Dedication page
|
|
33
|
+
| `Acknowledgements` | Acknowledgements page
|
|
34
|
+
| `Colophon` | Publication data (publisher, typeface, etc.)
|
|
35
|
+
| `Topic` | Standalone topic fragment
|
|
36
|
+
| `Reference` | Reference page collection
|
|
37
|
+
| `RefEntry` | Individual reference page
|
|
38
|
+
| `RefSection` | Section within a reference entry
|
|
39
|
+
| `RefSect1`--`RefSect3` | Numbered reference section levels
|
|
40
|
+
| `Index` | Generated index
|
|
41
|
+
| `SetIndex` | Index for a set of books
|
|
42
|
+
| `Toc` | Table of contents
|
|
43
|
+
|===
|
|
44
|
+
|
|
45
|
+
### Metadata (18)
|
|
46
|
+
|
|
47
|
+
Elements that carry document and element metadata.
|
|
48
|
+
|
|
49
|
+
[cols="1,3"]
|
|
50
|
+
|===
|
|
51
|
+
| Element | Description
|
|
52
|
+
|
|
53
|
+
| `Info` | Container for bibliographic metadata
|
|
54
|
+
| `Title` | Element title
|
|
55
|
+
| `Subtitle` | Element subtitle
|
|
56
|
+
| `Author` | Author information
|
|
57
|
+
| `PersonName` | Structured personal name
|
|
58
|
+
| `FirstName` | Given name
|
|
59
|
+
| `Surname` | Family name
|
|
60
|
+
| `Honorific` | Title prefix (Dr., Prof., etc.)
|
|
61
|
+
| `Copyright` | Copyright statement
|
|
62
|
+
| `Year` | Copyright year
|
|
63
|
+
| `Holder` | Copyright holder
|
|
64
|
+
| `LegalNotice` | Legal notice
|
|
65
|
+
| `ReleaseInfo` | Release information
|
|
66
|
+
| `PubDate` | Publication date
|
|
67
|
+
| `Date` | Generic date
|
|
68
|
+
| `ProductName` | Product name
|
|
69
|
+
| `ProductNumber` | Product number/identifier
|
|
70
|
+
| `Version` | Version number
|
|
71
|
+
|===
|
|
72
|
+
|
|
73
|
+
### Block (3)
|
|
74
|
+
|
|
75
|
+
Paragraph-level block elements.
|
|
76
|
+
|
|
77
|
+
[cols="1,3"]
|
|
78
|
+
|===
|
|
79
|
+
| Element | Description
|
|
80
|
+
|
|
81
|
+
| `Para` | Standard paragraph with mixed inline content
|
|
82
|
+
| `FormalPara` | Paragraph with a title
|
|
83
|
+
| `SimPara` | Simple paragraph (no inline markup)
|
|
84
|
+
|===
|
|
85
|
+
|
|
86
|
+
All three produce HTML output blocks. `Para` generates `paragraph` blocks with inline children. `FormalPara` generates `paragraph` blocks with a `strong` child for the title.
|
|
87
|
+
|
|
88
|
+
### Lists (6)
|
|
89
|
+
|
|
90
|
+
List structures for ordered, unordered, and definition lists.
|
|
91
|
+
|
|
92
|
+
[cols="1,3"]
|
|
93
|
+
|===
|
|
94
|
+
| Element | HTML Block Type | Description
|
|
95
|
+
|
|
96
|
+
| `OrderedList` | `ordered_list` | Numbered list
|
|
97
|
+
| `ItemizedList` | `itemized_list` | Bulleted list
|
|
98
|
+
| `VariableList` | `definition_list` | Term/description pairs
|
|
99
|
+
| `ListItem` | `list_item` | Single list item
|
|
100
|
+
| `VarListEntry` | (internal) | Variable list entry container
|
|
101
|
+
| `Term` | (inline) | Term being defined
|
|
102
|
+
|===
|
|
103
|
+
|
|
104
|
+
All list types produce HTML output. `OrderedList` and `ItemizedList` contain `list_item` children. `VariableList` produces alternating `definition_term` and `definition_description` children.
|
|
105
|
+
|
|
106
|
+
### Links (3)
|
|
107
|
+
|
|
108
|
+
Cross-reference and hyperlink elements.
|
|
109
|
+
|
|
110
|
+
[cols="1,3"]
|
|
111
|
+
|===
|
|
112
|
+
| Element | HTML Block Type | Description
|
|
113
|
+
|
|
114
|
+
| `Link` | `link` | External or internal hyperlink
|
|
115
|
+
| `Xref` | `xref` | Cross-reference resolved to target title
|
|
116
|
+
| `Uri` | `link` | Uniform Resource Identifier
|
|
117
|
+
|===
|
|
118
|
+
|
|
119
|
+
`Xref` elements are resolved using `XrefResolver` to display the target section's title as the link text.
|
|
120
|
+
|
|
121
|
+
### Inline (24)
|
|
122
|
+
|
|
123
|
+
Inline elements used within paragraphs and other mixed-content contexts.
|
|
124
|
+
|
|
125
|
+
[cols="1,3"]
|
|
126
|
+
|===
|
|
127
|
+
| Element | HTML Block Type | Description
|
|
128
|
+
|
|
129
|
+
| `Emphasis` | `emphasis`, `strong`, `italic` | Emphasized text (role-based)
|
|
130
|
+
| `Code` | `codetext` | Inline code
|
|
131
|
+
| `Literal` | `codetext` | Literal text
|
|
132
|
+
| `Filename` | `codetext` | File name
|
|
133
|
+
| `ClassName` | `codetext` | Class name
|
|
134
|
+
| `Function` | `codetext` | Function name
|
|
135
|
+
| `Parameter` | `codetext` | Parameter name
|
|
136
|
+
| `Variable` | `codetext` | Variable name
|
|
137
|
+
| `Type` | `codetext` | Type name
|
|
138
|
+
| `Tag` | `codetext` | Markup tag (rendered as `<tag>`)
|
|
139
|
+
| `Att` | `codetext` | Attribute name
|
|
140
|
+
| `BuildTarget` | `codetext` | Build target
|
|
141
|
+
| `Dir` | `codetext` | Directory name
|
|
142
|
+
| `Replaceable` | `codetext` | Replaceable content
|
|
143
|
+
| `Quote` | `text` | Quoted text
|
|
144
|
+
| `Citation` | `citation` | Citation reference
|
|
145
|
+
| `Citetitle` | `citation` or `citation_link` | Title of cited work
|
|
146
|
+
| `CiteRefEntry` | (inline) | Citation to reference entry
|
|
147
|
+
| `FirstTerm` | `emphasis` | First occurrence of a term
|
|
148
|
+
| `Glossterm` | `emphasis` | Glossary term reference
|
|
149
|
+
| `ForeignPhrase` | (text) | Foreign language phrase
|
|
150
|
+
| `Phrase` | (text) | Generic phrase
|
|
151
|
+
| `Property` | `codetext` | Property name
|
|
152
|
+
| `UserInput` | `codetext` | User-typed input
|
|
153
|
+
|===
|
|
154
|
+
|
|
155
|
+
### Media (11)
|
|
156
|
+
|
|
157
|
+
Image, video, audio, and figure elements.
|
|
158
|
+
|
|
159
|
+
[cols="1,3"]
|
|
160
|
+
|===
|
|
161
|
+
| Element | HTML Block Type | Description
|
|
162
|
+
|
|
163
|
+
| `MediaObject` | `image` | Container for media objects
|
|
164
|
+
| `ImageObject` | (internal) | Image container with `ImageData`
|
|
165
|
+
| `ImageData` | (internal) | Image reference with `fileref`
|
|
166
|
+
| `Figure` | `image` | Formal figure with title
|
|
167
|
+
| `InformalFigure` | `image` | Untitled figure
|
|
168
|
+
| `InlineMediaObject` | `inline_image` | Inline image within text
|
|
169
|
+
| `ProgramListing` | `code` | Source code listing with language
|
|
170
|
+
| `Screen` | `code` | Screen output listing
|
|
171
|
+
| `TextObject` | `paragraph` | Text description fallback
|
|
172
|
+
| `AudioObject` | (parsed) | Audio media reference
|
|
173
|
+
| `VideoObject` | (parsed) | Video media reference
|
|
174
|
+
|===
|
|
175
|
+
|
|
176
|
+
Images produce HTML output with base64-embedded (single file) or file-path (directory) `src` values. `ProgramListing` and `Screen` produce `code` blocks with optional `language` for Prism.js syntax highlighting.
|
|
177
|
+
|
|
178
|
+
### Tables (8)
|
|
179
|
+
|
|
180
|
+
CALS/OASIS table model elements.
|
|
181
|
+
|
|
182
|
+
[cols="1,3"]
|
|
183
|
+
|===
|
|
184
|
+
| Element | Description
|
|
185
|
+
|
|
186
|
+
| `Table` | Formal table with title
|
|
187
|
+
| `TGroup` | Column group within a table
|
|
188
|
+
| `THead` | Table header rows
|
|
189
|
+
| `TBody` | Table body rows
|
|
190
|
+
| `TFoot` | Table footer rows
|
|
191
|
+
| `Row` | Table row
|
|
192
|
+
| `Entry` | Table cell
|
|
193
|
+
| `EntryTbl` | Nested sub-table within a cell
|
|
194
|
+
|===
|
|
195
|
+
|
|
196
|
+
### Admonitions (6)
|
|
197
|
+
|
|
198
|
+
Warning and note elements. All six produce HTML output blocks.
|
|
199
|
+
|
|
200
|
+
[cols="1,3"]
|
|
201
|
+
|===
|
|
202
|
+
| Element | HTML Block Type | Description
|
|
203
|
+
|
|
204
|
+
| `Note` | `note` | Informational note
|
|
205
|
+
| `Warning` | `warning` | Warning message
|
|
206
|
+
| `Caution` | `caution` | Caution message
|
|
207
|
+
| `Important` | `important` | Important information
|
|
208
|
+
| `Tip` | `tip` | Helpful tip
|
|
209
|
+
| `Danger` | `danger` | Danger warning
|
|
210
|
+
|===
|
|
211
|
+
|
|
212
|
+
Admonitions can contain paragraphs, code listings, screens, and literal layouts as children.
|
|
213
|
+
|
|
214
|
+
### Bibliography (5)
|
|
215
|
+
|
|
216
|
+
Bibliographic reference elements.
|
|
217
|
+
|
|
218
|
+
[cols="1,3"]
|
|
219
|
+
|===
|
|
220
|
+
| Element | HTML Block Type | Description
|
|
221
|
+
|
|
222
|
+
| `Bibliography` | (structural) | Bibliography section
|
|
223
|
+
| `Bibliomixed` | `bibliography_entry` | Formatted bibliography entry
|
|
224
|
+
| `Biblioref` | `biblioref` | Inline bibliography reference
|
|
225
|
+
| `OrgName` | `biblio_orgname` | Organization name
|
|
226
|
+
| `PublisherName` | `biblio_publishername` | Publisher name
|
|
227
|
+
|===
|
|
228
|
+
|
|
229
|
+
`Bibliomixed` entries produce rich output with abbreviations, author names, citation titles, dates, and links.
|
|
230
|
+
|
|
231
|
+
### Glossary (5)
|
|
232
|
+
|
|
233
|
+
Glossary definition elements.
|
|
234
|
+
|
|
235
|
+
[cols="1,3"]
|
|
236
|
+
|===
|
|
237
|
+
| Element | HTML Block Type | Description
|
|
238
|
+
|
|
239
|
+
| `Glossary` | (structural) | Glossary section
|
|
240
|
+
| `GlossEntry` | `definition_list` | Glossary entry with term and definition
|
|
241
|
+
| `GlossDef` | (internal) | Definition content
|
|
242
|
+
| `GlossSee` | (parsed) | "See" cross-reference
|
|
243
|
+
| `GlossSeeAlso` | (parsed) | "See also" cross-reference
|
|
244
|
+
|===
|
|
245
|
+
|
|
246
|
+
### Index (9)
|
|
247
|
+
|
|
248
|
+
Index-related elements.
|
|
249
|
+
|
|
250
|
+
[cols="1,3"]
|
|
251
|
+
|===
|
|
252
|
+
| Element | Description
|
|
253
|
+
|
|
254
|
+
| `Index` | Index section (structural)
|
|
255
|
+
| `IndexDiv` | Division within the index
|
|
256
|
+
| `IndexEntry` | Raw index entry
|
|
257
|
+
| `IndexTerm` | Index term with primary/secondary/tertiary
|
|
258
|
+
| `Primary` | Primary term text
|
|
259
|
+
| `Secondary` | Secondary term text
|
|
260
|
+
| `Tertiary` | Tertiary term text
|
|
261
|
+
| `See` | "See" cross-reference
|
|
262
|
+
| `SeeAlso` | "See also" cross-reference
|
|
263
|
+
|===
|
|
264
|
+
|
|
265
|
+
Index terms are collected by `IndexCollector` and processed by `IndexGenerator` to produce the generated index.
|
|
266
|
+
|
|
267
|
+
### TOC (3)
|
|
268
|
+
|
|
269
|
+
Table of contents elements.
|
|
270
|
+
|
|
271
|
+
[cols="1,3"]
|
|
272
|
+
|===
|
|
273
|
+
| Element | Description
|
|
274
|
+
|
|
275
|
+
| `Toc` | Table of contents container
|
|
276
|
+
| `TocDiv` | Division within the TOC
|
|
277
|
+
| `TocEntry` | Single TOC entry
|
|
278
|
+
|===
|
|
279
|
+
|
|
280
|
+
### Footnotes (2)
|
|
281
|
+
|
|
282
|
+
[cols="1,3"]
|
|
283
|
+
|===
|
|
284
|
+
| Element | Description
|
|
285
|
+
|
|
286
|
+
| `Footnote` | Inline footnote content
|
|
287
|
+
| `FootnoteRef` | Reference to a footnote
|
|
288
|
+
|===
|
|
289
|
+
|
|
290
|
+
### Callouts (2)
|
|
291
|
+
|
|
292
|
+
[cols="1,3"]
|
|
293
|
+
|===
|
|
294
|
+
| Element | Description
|
|
295
|
+
|
|
296
|
+
| `Callout` | Callout description
|
|
297
|
+
| `CalloutList` | List of callout descriptions
|
|
298
|
+
|===
|
|
299
|
+
|
|
300
|
+
### Examples (3)
|
|
301
|
+
|
|
302
|
+
[cols="1,3"]
|
|
303
|
+
|===
|
|
304
|
+
| Element | HTML Block Type | Description
|
|
305
|
+
|
|
306
|
+
| `Example` | `example` | Titled example with content
|
|
307
|
+
| `InformalExample` | `example_output` | Untitled example
|
|
308
|
+
| `Equation` | (parsed) | Mathematical equation
|
|
309
|
+
|===
|
|
310
|
+
|
|
311
|
+
### Procedures (3)
|
|
312
|
+
|
|
313
|
+
[cols="1,3"]
|
|
314
|
+
|===
|
|
315
|
+
| Element | Description
|
|
316
|
+
|
|
317
|
+
| `Procedure` | Ordered sequence of steps
|
|
318
|
+
| `Step` | Single step in a procedure
|
|
319
|
+
| `SubSteps` | Nested sub-steps
|
|
320
|
+
|===
|
|
321
|
+
|
|
322
|
+
### RefEntry (7)
|
|
323
|
+
|
|
324
|
+
Reference page elements within `Reference` documents.
|
|
325
|
+
|
|
326
|
+
[cols="1,3"]
|
|
327
|
+
|===
|
|
328
|
+
| Element | HTML Block Type | Description
|
|
329
|
+
|
|
330
|
+
| `RefMeta` | `reference_meta` | Reference metadata (title, miscinfo)
|
|
331
|
+
| `RefNamediv` | (internal) | Name and purpose container
|
|
332
|
+
| `RefName` | `reference_name` | Entry name (headword)
|
|
333
|
+
| `RefPurpose` | `reference_definition` | Short description/purpose
|
|
334
|
+
| `RefEntryTitle` | (internal) | Reference entry title
|
|
335
|
+
| `RefMiscInfo` | `reference_meta` | Miscellaneous metadata
|
|
336
|
+
| `FieldSynopsis` | (parsed) | Field/method signature
|
|
337
|
+
|===
|
|
338
|
+
|
|
339
|
+
### Other (6)
|
|
340
|
+
|
|
341
|
+
Miscellaneous block elements.
|
|
342
|
+
|
|
343
|
+
[cols="1,3"]
|
|
344
|
+
|===
|
|
345
|
+
| Element | HTML Block Type | Description
|
|
346
|
+
|
|
347
|
+
| `BlockQuote` | `blockquote` | Extended quotation with attribution
|
|
348
|
+
| `Quotation` | (parsed) | Inline quotation
|
|
349
|
+
| `Attribution` | (text) | Quote attribution
|
|
350
|
+
| `MsgSet` | (parsed) | Message set
|
|
351
|
+
| `Msg` | (parsed) | Individual message
|
|
352
|
+
| `Msgexplan` | (parsed) | Message explanation
|
|
353
|
+
| `LiteralLayout` | `code` | Preformatted text
|
|
354
|
+
| `Address` | (parsed) | Postal address
|
|
355
|
+
| `Annotation` | (parsed) | Annotation
|
|
356
|
+
| `SideBar` | (parsed) | Sidebar content
|
|
357
|
+
| `Remark` | (parsed) | Editorial remark
|
|
358
|
+
|===
|
|
359
|
+
|
|
360
|
+
## Elements Producing HTML Output
|
|
361
|
+
|
|
362
|
+
The following elements are directly rendered as HTML `ContentBlock` types during the output build:
|
|
363
|
+
|
|
364
|
+
- **Blocks**: `Para`, `FormalPara`, `ProgramListing`, `Screen`, `LiteralLayout`, `BlockQuote`, `SimpleSect`
|
|
365
|
+
- **Lists**: `OrderedList`, `ItemizedList`, `VariableList`
|
|
366
|
+
- **Media**: `MediaObject`, `Figure`, `InformalFigure`, `InlineMediaObject`, `TextObject`
|
|
367
|
+
- **Admonitions**: `Note`, `Warning`, `Caution`, `Important`, `Tip`, `Danger`
|
|
368
|
+
- **Examples**: `Example`, `InformalExample`
|
|
369
|
+
- **Glossary**: `GlossEntry`
|
|
370
|
+
- **Bibliography**: `Bibliomixed`
|
|
371
|
+
- **Index**: `IndexDiv`
|
|
372
|
+
- **Reference**: `RefEntry` (with all sub-elements)
|
|
373
|
+
- **Inline**: `Emphasis`, `Link`, `Xref`, `Code`, `Literal`, `Filename`, `ClassName`, `Function`, `Parameter`, `Variable`, `Type`, `Tag`, `Att`, `BuildTarget`, `Dir`, `Replaceable`, `Quote`, `Citetitle`, `Biblioref`, `FirstTerm`, `Glossterm`, `UserInput`, `InlineMediaObject`
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
title: Output Data Model
|
|
4
|
+
parent: HTML Output
|
|
5
|
+
grand_parent: Features
|
|
6
|
+
nav_order: 3
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Output Data Model
|
|
10
|
+
|
|
11
|
+
The output data model defines the JSON structure produced by the Ruby backend and consumed by the Vue 3 SPA frontend. All models are implemented as `Lutaml::Model::Serializable` classes, providing type-safe serialization to JSON.
|
|
12
|
+
|
|
13
|
+
## Top-Level Model: DocbookOutput
|
|
14
|
+
|
|
15
|
+
The `DocbookOutput` class is the root container for all output data:
|
|
16
|
+
|
|
17
|
+
[cols="1,1,3"]
|
|
18
|
+
|===
|
|
19
|
+
| Field | Type | Description
|
|
20
|
+
|
|
21
|
+
| `title` | `String` | Document title (from `Book.info.title` or `Article.info.title`)
|
|
22
|
+
| `toc` | `Toc` | Table of contents tree and numbering map
|
|
23
|
+
| `content` | `ContentData` | All section content as block trees
|
|
24
|
+
| `index` | `Index` | Generated index data (may be empty)
|
|
25
|
+
|===
|
|
26
|
+
|
|
27
|
+
[source,ruby]
|
|
28
|
+
----
|
|
29
|
+
class DocbookOutput < Lutaml::Model::Serializable
|
|
30
|
+
attribute :title, :string
|
|
31
|
+
attribute :toc, Toc
|
|
32
|
+
attribute :content, ContentData
|
|
33
|
+
attribute :index, Index
|
|
34
|
+
end
|
|
35
|
+
----
|
|
36
|
+
|
|
37
|
+
## TOC Model
|
|
38
|
+
|
|
39
|
+
The `Toc` model contains the document structure tree and section numbering:
|
|
40
|
+
|
|
41
|
+
[cols="1,1,3"]
|
|
42
|
+
|===
|
|
43
|
+
| Field | Type | Description
|
|
44
|
+
|
|
45
|
+
| `sections` | `SectionData[]` | Recursive tree of document sections
|
|
46
|
+
| `numbering` | `NumberingEntry[]` | Flat map of section ID to formatted number
|
|
47
|
+
|===
|
|
48
|
+
|
|
49
|
+
### SectionData
|
|
50
|
+
|
|
51
|
+
Each node in the TOC tree is a `SectionData`:
|
|
52
|
+
|
|
53
|
+
[cols="1,1,3"]
|
|
54
|
+
|===
|
|
55
|
+
| Field | Type | Description
|
|
56
|
+
|
|
57
|
+
| `id` | `String` | Section's `xml:id` or generated slug
|
|
58
|
+
| `title` | `String` | Section title text
|
|
59
|
+
| `type` | `String` | Section type: `part`, `chapter`, `section`, `appendix`, `preface`, `glossary`, `bibliography`, `index`, `reference`
|
|
60
|
+
| `number` | `String` | Formatted section number (e.g., "I", "1", "1.2.3", "A")
|
|
61
|
+
| `children` | `SectionData[]` | Nested child sections
|
|
62
|
+
|===
|
|
63
|
+
|
|
64
|
+
### NumberingEntry
|
|
65
|
+
|
|
66
|
+
A key-value pair mapping a section ID to its formatted number:
|
|
67
|
+
|
|
68
|
+
[cols="1,1,3"]
|
|
69
|
+
|===
|
|
70
|
+
| Field | Type | Description
|
|
71
|
+
|
|
72
|
+
| `id` | `String` | Section `xml:id`
|
|
73
|
+
| `value` | `String` | Formatted number (e.g., `"I"`, `"1"`, `"1.2.3"`, `"Appendix A"`)
|
|
74
|
+
|===
|
|
75
|
+
|
|
76
|
+
## ContentData Model
|
|
77
|
+
|
|
78
|
+
The `ContentData` model holds all section content as a collection of entries:
|
|
79
|
+
|
|
80
|
+
[cols="1,1,3"]
|
|
81
|
+
|===
|
|
82
|
+
| Field | Type | Description
|
|
83
|
+
|
|
84
|
+
| `entries` | `ContentEntry[]` | Array of section ID to `SectionContent` mappings
|
|
85
|
+
|===
|
|
86
|
+
|
|
87
|
+
### ContentEntry
|
|
88
|
+
|
|
89
|
+
A key-value pair mapping a section ID to its content:
|
|
90
|
+
|
|
91
|
+
[cols="1,1,3"]
|
|
92
|
+
|===
|
|
93
|
+
| Field | Type | Description
|
|
94
|
+
|
|
95
|
+
| `key` | `String` | Section `xml:id`
|
|
96
|
+
| `value` | `SectionContent` | The section's content blocks
|
|
97
|
+
|===
|
|
98
|
+
|
|
99
|
+
### SectionContent
|
|
100
|
+
|
|
101
|
+
The content for a single section:
|
|
102
|
+
|
|
103
|
+
[cols="1,1,3"]
|
|
104
|
+
|===
|
|
105
|
+
| Field | Type | Description
|
|
106
|
+
|
|
107
|
+
| `section_id` | `String` | Section's `xml:id`
|
|
108
|
+
| `blocks` | `ContentBlock[]` | Tree of content blocks
|
|
109
|
+
|===
|
|
110
|
+
|
|
111
|
+
## ContentBlock Model
|
|
112
|
+
|
|
113
|
+
The `ContentBlock` is the core building block for all rendered content. It is a recursive structure that can represent paragraphs, images, code listings, lists, admonitions, and more:
|
|
114
|
+
|
|
115
|
+
[cols="1,1,3"]
|
|
116
|
+
|===
|
|
117
|
+
| Field | Type | Description
|
|
118
|
+
|
|
119
|
+
| `type` | `String` | Block type (40+ types, see below)
|
|
120
|
+
| `text` | `String` | Primary text content (paragraph text, code content, title, etc.)
|
|
121
|
+
| `src` | `String` | URL or path (images, links, xrefs)
|
|
122
|
+
| `alt` | `String` | Alt text (images)
|
|
123
|
+
| `title` | `String` | Block title (figures, examples)
|
|
124
|
+
| `language` | `String` | Programming language for syntax highlighting (code blocks)
|
|
125
|
+
| `className` | `String` | CSS class name (bibliography elements)
|
|
126
|
+
| `children` | `ContentBlock[]` | Nested child blocks (recursive)
|
|
127
|
+
|===
|
|
128
|
+
|
|
129
|
+
### Block Types
|
|
130
|
+
|
|
131
|
+
The `type` field determines how the block is rendered. There are over 40 block types:
|
|
132
|
+
|
|
133
|
+
**Block-Level Types:**
|
|
134
|
+
|
|
135
|
+
[cols="1,3"]
|
|
136
|
+
|===
|
|
137
|
+
| Type | Description
|
|
138
|
+
|
|
139
|
+
| `paragraph` | Standard paragraph with inline content in children
|
|
140
|
+
| `code` | Code listing (from `programlisting`, `screen`, or `literallayout`)
|
|
141
|
+
| `image` | Image block with `src` (base64 or path) and `alt` text
|
|
142
|
+
| `inline_image` | Inline image within a paragraph
|
|
143
|
+
| `blockquote` | Quoted text with optional attribution in `text`
|
|
144
|
+
| `ordered_list` | Numbered list with `list_item` children
|
|
145
|
+
| `itemized_list` | Bulleted list with `list_item` children
|
|
146
|
+
| `list_item` | Single list item containing block content
|
|
147
|
+
| `definition_list` | Definition list with alternating term/description children
|
|
148
|
+
| `definition_term` | Term being defined
|
|
149
|
+
| `definition_description` | Definition content
|
|
150
|
+
| `example` | Titled example block (from `example` element)
|
|
151
|
+
| `example_output` | Untitled example block (from `informalexample`)
|
|
152
|
+
| `section` | Nested section with heading and child blocks
|
|
153
|
+
| `heading` | Section heading text
|
|
154
|
+
|===
|
|
155
|
+
|
|
156
|
+
**Admonition Types:**
|
|
157
|
+
|
|
158
|
+
[cols="1,3"]
|
|
159
|
+
|===
|
|
160
|
+
| Type | Description
|
|
161
|
+
|
|
162
|
+
| `note` | Note admonition
|
|
163
|
+
| `warning` | Warning admonition
|
|
164
|
+
| `caution` | Caution admonition
|
|
165
|
+
| `important` | Important admonition
|
|
166
|
+
| `tip` | Tip admonition
|
|
167
|
+
| `danger` | Danger admonition
|
|
168
|
+
|===
|
|
169
|
+
|
|
170
|
+
**Reference Entry Types:**
|
|
171
|
+
|
|
172
|
+
[cols="1,3"]
|
|
173
|
+
|===
|
|
174
|
+
| Type | Description
|
|
175
|
+
|
|
176
|
+
| `reference_entry` | Top-level reference page entry
|
|
177
|
+
| `reference_badge` | Category badge (e.g., "pi", "param")
|
|
178
|
+
| `reference_name` | Entry headword/name
|
|
179
|
+
| `reference_definition` | Short definition/purpose
|
|
180
|
+
| `reference_meta` | Metadata (miscinfo, manvolnum)
|
|
181
|
+
| `description_section` | Content section within a reference entry
|
|
182
|
+
|===
|
|
183
|
+
|
|
184
|
+
**Inline Types (used in `paragraph` children):**
|
|
185
|
+
|
|
186
|
+
[cols="1,3"]
|
|
187
|
+
|===
|
|
188
|
+
| Type | Description
|
|
189
|
+
|
|
190
|
+
| `text` | Plain text content
|
|
191
|
+
| `strong` | Bold/strong text (from `emphasis role="bold"`)
|
|
192
|
+
| `italic` | Italic text (from `emphasis role="italic"`)
|
|
193
|
+
| `emphasis` | Emphasized text (default emphasis)
|
|
194
|
+
| `codetext` | Inline code (from `code`, `literal`, `filename`, `classname`, etc.)
|
|
195
|
+
| `link` | Hyperlink with `src` as URL
|
|
196
|
+
| `xref` | Internal cross-reference with resolved title
|
|
197
|
+
| `citation` | Citation text (from `citetitle` without href)
|
|
198
|
+
| `citation_link` | Cititation with external link
|
|
199
|
+
| `biblioref` | Bibliography reference with linkend
|
|
200
|
+
|===
|
|
201
|
+
|
|
202
|
+
**Bibliography Types:**
|
|
203
|
+
|
|
204
|
+
[cols="1,3"]
|
|
205
|
+
|===
|
|
206
|
+
| Type | Description
|
|
207
|
+
|
|
208
|
+
| `bibliography_entry` | Top-level bibliography entry
|
|
209
|
+
| `biblio_abbrev` | Bibliography abbreviation
|
|
210
|
+
| `biblio_citetitle` | Citation title
|
|
211
|
+
| `biblio_personname` | Author name
|
|
212
|
+
| `biblio_firstname` | First name
|
|
213
|
+
| `biblio_surname` | Surname
|
|
214
|
+
| `biblio_publishername` | Publisher name
|
|
215
|
+
| `biblio_pubdate` | Publication date
|
|
216
|
+
| `biblio_orgname` | Organization name
|
|
217
|
+
|===
|
|
218
|
+
|
|
219
|
+
**Index Types:**
|
|
220
|
+
|
|
221
|
+
[cols="1,3"]
|
|
222
|
+
|===
|
|
223
|
+
| Type | Description
|
|
224
|
+
|
|
225
|
+
| `index_section` | Index section container
|
|
226
|
+
| `index_letter` | Letter group within the index
|
|
227
|
+
| `index_entry` | Individual index term entry
|
|
228
|
+
| `index_reference` | Link to the section containing the term
|
|
229
|
+
| `index_see` | "see" cross-reference
|
|
230
|
+
| `index_see_also` | "see also" cross-reference
|
|
231
|
+
|===
|
|
232
|
+
|
|
233
|
+
## Index Model
|
|
234
|
+
|
|
235
|
+
The `Index` model holds the generated back-of-book index:
|
|
236
|
+
|
|
237
|
+
[cols="1,1,3"]
|
|
238
|
+
|===
|
|
239
|
+
| Field | Type | Description
|
|
240
|
+
|
|
241
|
+
| `title` | `String` | Index title (typically "Index")
|
|
242
|
+
| `type` | `String` | Index type filter (for typed indexes)
|
|
243
|
+
| `groups` | `IndexGroup[]` | Terms grouped by first letter
|
|
244
|
+
|===
|
|
245
|
+
|
|
246
|
+
### IndexGroup
|
|
247
|
+
|
|
248
|
+
Terms grouped under a single letter:
|
|
249
|
+
|
|
250
|
+
[cols="1,1,3"]
|
|
251
|
+
|===
|
|
252
|
+
| Field | Type | Description
|
|
253
|
+
|
|
254
|
+
| `letter` | `String` | Group letter ("A", "B", ..., "SYMBOLS")
|
|
255
|
+
| `entries` | `IndexTerm[]` | Terms in this group
|
|
256
|
+
|===
|
|
257
|
+
|
|
258
|
+
### IndexTerm
|
|
259
|
+
|
|
260
|
+
A single index term entry:
|
|
261
|
+
|
|
262
|
+
[cols="1,1,3"]
|
|
263
|
+
|===
|
|
264
|
+
| Field | Type | Description
|
|
265
|
+
|
|
266
|
+
| `primary` | `String` | Primary term text
|
|
267
|
+
| `secondary` | `String` | Secondary term (optional)
|
|
268
|
+
| `tertiary` | `String` | Tertiary term (optional)
|
|
269
|
+
| `section_id` | `String` | `xml:id` of the section where the term appears
|
|
270
|
+
| `section_title` | `String` | Title of the section for display
|
|
271
|
+
| `sort_as` | `String` | Sort key (lowercased, or "SYMBOLS" for non-alpha)
|
|
272
|
+
| `sees` | `String[]` | "see" cross-references
|
|
273
|
+
| `see_alsos` | `String[]` | "see also" cross-references
|
|
274
|
+
|===
|
|
275
|
+
|
|
276
|
+
## NumberingBuilder
|
|
277
|
+
|
|
278
|
+
The `NumberingBuilder` class computes section numbering during the output build. It maintains independent counters for each numbering scope:
|
|
279
|
+
|
|
280
|
+
- **Parts** -- Roman numerals (I, II, III, ...) via `next_part`
|
|
281
|
+
- **Chapters** -- Arabic numerals scoped per part (resets at each new part) via `next_chapter(part_index)`
|
|
282
|
+
- **Sections** -- Flat sequential numbering per parent scope (1, 2, 3, ...) via `next_section(scope_id)`, combined into hierarchical dot notation (1.1, 1.2.3)
|
|
283
|
+
- **Appendices** -- Alpha letters (A, B, C, ...) via `next_appendix`
|
|
284
|
+
|
|
285
|
+
Preface, glossary, bibliography, and index sections are explicitly unnumbered.
|