summaryrefslogtreecommitdiffhomepage
path: root/ocda-model.md
diff options
context:
space:
mode:
Diffstat (limited to 'ocda-model.md')
-rw-r--r--ocda-model.md65
1 files changed, 39 insertions, 26 deletions
diff --git a/ocda-model.md b/ocda-model.md
index 065677a..1c173b1 100644
--- a/ocda-model.md
+++ b/ocda-model.md
@@ -55,24 +55,24 @@ An object is classified twice, and the two answer different questions.
**Kind** (`is_a`) says *what the object is*, one of sixteen. Each kind
belongs to one section, except `heading`, which appears in all nine:
-| kind | section | what it is | count |
-|----------------|--------------|----------------------------------------------|--------|
-| `para` | body | a paragraph, the ordinary unit of a document | 41,885 |
-| `heading` | *all nine* | a heading at one of the eight levels | 3,503 |
-| `toc` | toc | an entry in the generated table of contents | 3,215 |
-| `bookindex` | bookindex | an entry in the generated book index | 3,034 |
-| `endnote` | endnotes | a note, gathered from where it was called | 2,158 |
-| `code` | body | a code block | 1,623 |
-| `bibliography` | bibliography | a bibliography entry | 585 |
-| `comment` | body | markup comment, carried and not rendered | 450 |
-| `verse` | body | one verse of a poem | 151 |
-| `glossary` | glossary | a glossary entry | 56 |
-| `quote` | body | a block quotation | 53 |
-| `poem` | body | a poem, holding verses | 48 |
-| `block` | body | a block of grouped text | 45 |
-| `table` | body | a table, with its columns described | 32 |
-| `blurb` | blurb | a blurb entry | 28 |
-| `group` | body | a group block | 16 |
+| kind | section | what it is | count |
+|----------------|--------------|--------------------------------------------------------------------------------|--------|
+| `para` | body | a paragraph, the ordinary unit of a document | 41,885 |
+| `heading` | *all nine* | a heading at one of the eight levels | 3,503 |
+| `toc` | toc | an entry in the generated table of contents | 3,215 |
+| `bookindex` | bookindex | an entry in the generated book index | 3,034 |
+| `endnote` | endnotes | a note, gathered from where it was called | 2,294 |
+| `code` | body | a code block | 1,623 |
+| `bibliography` | bibliography | a bibliography entry | 585 |
+| `comment` | body | markup comment, carried and not rendered | 450 |
+| `verse` | body | one verse of a poem | 151 |
+| `glossary` | glossary | a glossary entry | 56 |
+| `quote` | body | a block quotation | 53 |
+| `poem` | body | a poem: the container of its verses, OCN `0`, cited as their range (section 5) | 48 |
+| `block` | body | a block of grouped text | 45 |
+| `table` | body | a table, with its columns described | 32 |
+| `blurb` | blurb | a blurb entry | 28 |
+| `group` | body | a group block | 16 |
**Type** (`is_of_type`) says *how the object's text behaves*, and takes
only three values:
@@ -107,9 +107,12 @@ otherwise:
document reference collection.
- **`0` is therefore not an identity.** Objects sharing `0` are not the
same object, and `0` must never be used as a key.
-- **An OCN is not unique within a document even when non-zero.** A poem and
- its verses share one; `through_the_looking_glass` has 21 such cases. Key
- on position within a section when one row is wanted.
+- **A non-zero OCN is unique within a document**, from format 2.1: checked
+ over the reference collection, no non-zero OCN occurs twice in any of the
+ 36 document-languages. **Before 2.1 it was not**: a poem carried the OCN of
+ its last verse, so the same number named two objects (48 such pairs in the
+ collection, 21 in `through_the_looking_glass`). A reader of an older
+ artefact keys on position within a section when one row is wanted.
### 3.1 The identifier
@@ -181,6 +184,16 @@ be flat and the model be walked in either direction.
- **`last_descendant`** - the last OCN under a heading, which makes a
subtree a **range** rather than a traversal: everything from the
heading's OCN to its last descendant is inside it.
+- **`ocn_range`** - for a **container**, the first and last OCN of what it
+ holds (2.1). A poem is the one container: its verses are the citable
+ units, one object each, and the poem is not; it carries OCN `0` and no
+ identifier, **comes immediately before its first verse**, and is cited as
+ the range of them (`173-180`). So a writer that meets a poem knows what
+ follows and where it ends, and can wrap the verses in one pass. The poem
+ has no text of its own. `0 0`, or absent, where the object is not a
+ container.
+ **Before 2.1** the poem came *after* its last verse, carried that verse's
+ OCN and identifier, and stated no range.
## 6. Sections
@@ -263,11 +276,11 @@ document.
So, on loading:
-| field | when absent | take |
-|-------|-------------|------|
-| identifier | OCN is non-zero | the OCN as text |
-| identifier | OCN is `0` | whatever the serialisation gave; there is nothing to derive from |
-| anchor | the object has a segment | the segment name |
+| field | when absent | take |
+|------------|--------------------------|------------------------------------------------------------------|
+| identifier | OCN is non-zero | the OCN as text |
+| identifier | OCN is `0` | whatever the serialisation gave; there is nothing to derive from |
+| anchor | the object has a segment | the segment name |
**This is a property of the model, not of either format**, which is why it
is stated here and not only in the two format specifications. It is stated