Korin API

Rule

Table of Contents

Namespaces

V40ToV55
V551ToV55
V551ToV555
V551ToV70
V555ToV551
V55ToV551
V70ToV551

Classes

Extensions
An extension named after a structure of the target version, where the target has that structure and the source could not write it so, is that structure: it is how the conversion the other way writes it (7.0 → 5.5.1: _NO, _SDATE, _CREA, _CROP, _SCHMA under HEAD, _PHRASE under DATE, _FAMC @VOID@; 5.5.1 → 7.0 → 5.5.1: _NOTE and _SOUR under TRAN; 5.5.1 → 5.5: _EMAIL, _FONE, a second REPO of a source as _REPO, SEX U as _SEX U), and it gets its tag back. Its substructures are already in the target's form, unless a step before of the chain made it (Context::restored()). The source could not write it so when it has no such structure there, the value does not fit the source's (an enumeration value it does not list) but fits the target's, the source allows no more of them there, it is empty (5.5.5 and 7.0 have no empty structure), or (to 7.0) it points to @VOID@ or names its family so (_SLGC with FAMC @VOID@); and its value fits the target's (a 5.5 _SOUR with a text under NOTE stays: 7.0 NOTE.SOUR is a pointer). Any other extension (_DATE under BIRT) stays: a program wrote it so on purpose. The last rule of the walk but Structures: it sees the tags the other rules wrote.
Nodes
Walks a record once, in document order, and gives every structure to each of its rules for that tag in turn; CONC/CONT lines are part of their structure's value and are not visited. A structure a rule removes is not given to the rules after it, nor are its substructures. An extension a rule makes a structure again is given to the rules of its new tag, that rule but, from the first: those that saw it as an extension passed it by, so a rule for every tag sees it twice.
Payloads
Whether a structure of a version can have a payload, as far as the conversion between versions needs to know: a value or none, a pointer or not, and enumeration values; with $grammars, in 5.x the grammars too (dates, ages, times, 5.5.5 place names), as the validator checks them. Without, any text fits a grammar: the value rules convert dates and ages.
SourceLines
The first rule of every conversion, for what the reader could not read cleanly:
Structures
The structures the target version does not have where they stand:
Values
Values between 5.x versions: an enumeration value the target does not list is spelled as the target spells it where it has one (5.5 FORM jpeg ↔ 5.5.1 jpg), and otherwise, like a missing pointer the target requires (5.5.1 REPO without one → 5.5), makes the structure an extension with its tag and value (5.5.1 SEX U → 5.5 _SEX U), or drops it under LossPolicy::DropWithReport (KL3001); converting back gives the structure back (Extensions).
On this page

Search results