aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/meta')
-rw-r--r--src/sdp/meta/doc_debugs.d36
-rw-r--r--src/sdp/meta/metadoc_from_src.d1337
-rw-r--r--src/sdp/meta/metadoc_summary.d14
-rw-r--r--src/sdp/meta/object_setter.d150
4 files changed, 772 insertions, 765 deletions
diff --git a/src/sdp/meta/doc_debugs.d b/src/sdp/meta/doc_debugs.d
index 652fb00..c8b9dc1 100644
--- a/src/sdp/meta/doc_debugs.d
+++ b/src/sdp/meta/doc_debugs.d
@@ -39,8 +39,8 @@ template SiSUdebugs() {
);
foreach (key; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[key]) {
- if (obj.typeinfo.is_of_part != "empty") {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_of_part != "empty") {
+ if (obj.metainfo.is_a == "heading") {
writefln(
"%s node: %s heading: %s %s",
obj.object_number,
@@ -61,11 +61,11 @@ template SiSUdebugs() {
);
if (key.length > 0) {
foreach (obj; contents[key]) {
- if (obj.typeinfo.is_of_part != "empty") {
+ if (obj.metainfo.is_of_part != "empty") {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -79,7 +79,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -108,7 +108,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -118,7 +118,7 @@ template SiSUdebugs() {
enum DomTags { none, open, close, close_and_open, open_still, }
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[sect]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
foreach_reverse (k; 0 .. 7) {
switch (obj.dom_markedup[k]) {
case DomTags.close :
@@ -145,7 +145,7 @@ template SiSUdebugs() {
writeln("--------------------");
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[sect]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
foreach_reverse (k; 0 .. 7) {
switch (obj.dom_collapsed[k]) {
case DomTags.close :
@@ -185,7 +185,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -198,7 +198,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -223,7 +223,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -236,11 +236,11 @@ template SiSUdebugs() {
__LINE__,
);
foreach (obj; contents[key]) {
- if (obj.typeinfo.is_of_part != "empty") {
+ if (obj.metainfo.is_of_part != "empty") {
writefln(
"* [%s][%s] %s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -402,7 +402,7 @@ template SiSUdebugs() {
);
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[k]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
writefln(
"%s~ [%s] %s %s",
obj.marked_up_level,
@@ -418,7 +418,7 @@ template SiSUdebugs() {
debug(heading) { // heading
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (o; contents[k]) {
- if (o.typeinfo.is_a == "heading") {
+ if (o.metainfo.is_a == "heading") {
writefln(
"%s* %s\n (markup level: %s; collapsed level: %s)",
replicate(" ", o.heading_lev_markup),
@@ -438,7 +438,7 @@ template SiSUdebugs() {
);
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[k]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
writefln(
"%s~ [%s] %s",
obj.marked_up_level,
@@ -627,7 +627,7 @@ template SiSUdebugs() {
foreach (obj; contents[key]) {
writefln(
"[%s]\n%s",
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
@@ -644,7 +644,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.object_number,
- obj.typeinfo.is_a,
+ obj.metainfo.is_a,
obj.text
);
}
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d
index e9f930c..9c01a47 100644
--- a/src/sdp/meta/metadoc_from_src.d
+++ b/src/sdp/meta/metadoc_from_src.d
@@ -88,7 +88,7 @@ template SiSUdocAbstraction() {
O obj,
string[] lv_ancestors_txt,
) {
- switch (obj.node.heading_lev_markup) {
+ switch (obj.metainfo.heading_lev_markup) {
case 0:
lv_ancestors_txt[0] = obj.text.to!string;
foreach(k; 1..8) {
@@ -178,7 +178,7 @@ template SiSUdocAbstraction() {
debug(dom_magic_numbers) {
writeln("marked up: ", lev, ": ", dom);
}
- obj.node.dom_markedup = dom.dup;
+ obj.metainfo.dom_markedup = dom.dup;
return obj;
}
pure auto obj_dom_set_collapsed_tags(O)(
@@ -222,7 +222,7 @@ template SiSUdocAbstraction() {
debug(dom_magic_numbers) {
writeln("collapsed: ", lev, ": ", dom);
}
- obj.node.dom_collapsed = dom.dup;
+ obj.metainfo.dom_collapsed = dom.dup;
return obj;
}
static auto ocn_emit(int ocn_status_flag) {
@@ -323,28 +323,27 @@ template SiSUdocAbstraction() {
];
string _anchor_tag;
string toc_txt_;
- an_object["glossary_nugget"] = "";
- an_object["blurb_nugget"] = "";
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "frontmatter";
- comp_obj_heading_.typeinfo.is_of_section = "toc";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Table of Contents";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "toc";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.ptr.html_segnames = html_segnames_ptr;
- comp_obj_heading_.tags.anchor_tags = ["toc"];
- comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- auto toc_head = comp_obj_heading_;
+ an_object["glossary_nugget"] = "";
+ an_object["blurb_nugget"] = "";
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "frontmatter";
+ comp_obj_heading_.metainfo.is_of_section = "toc";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Table of Contents";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "toc";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.ptr.html_segnames = html_segnames_ptr;
+ comp_obj_heading_.tags.anchor_tags = ["toc"];
+ comp_obj_heading_.metainfo.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+ comp_obj_heading_.metainfo.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+ auto toc_head = comp_obj_heading_;
html_segnames_ptr_cntr++;
the_table_of_contents_section = [
"seg": [toc_head],
@@ -465,58 +464,56 @@ template SiSUdocAbstraction() {
line_occur["para"] = State.off;
an_object_key="glossary_nugget"; //
if (line.matchFirst(rgx.heading_glossary)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "glossary";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "_part_glossary";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
- the_glossary_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "glossary";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "glossary";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 2;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- comp_obj_heading_.tags.anchor_tags = ["glossary"];
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "glossary";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_glossary";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.metainfo.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ comp_obj_heading_.metainfo.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "glossary";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "glossary";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.metainfo.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+ comp_obj_heading_.metainfo.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+ comp_obj_heading_.tags.anchor_tags = ["glossary"];
+ the_glossary_section ~= comp_obj_heading_;
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.typeinfo.is_of_part = "backmatter";
- comp_obj_para.typeinfo.is_of_section = "glossary";
- comp_obj_para.typeinfo.is_of_type = "para";
- comp_obj_para.typeinfo.is_a = "glossary";
- comp_obj_para.text = line.to!string.strip;
- comp_obj_para.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_para.attrib.indent_hang = indent["hang_position"];
- comp_obj_para.attrib.indent_base = indent["base_position"];
- comp_obj_para.attrib.bullet = bullet;
- the_glossary_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "glossary";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "glossary";
+ comp_obj_para.text = line.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.attrib.indent_hang = indent["hang_position"];
+ comp_obj_para.attrib.indent_base = indent["base_position"];
+ comp_obj_para.attrib.bullet = bullet;
+ the_glossary_section ~= comp_obj_para;
}
obj_type_status["ocn_status"] = OCNstatus.on;
}
@@ -573,77 +570,74 @@ template SiSUdocAbstraction() {
line_occur["para"] = State.off;
an_object_key="blurb_nugget";
if (line.matchFirst(rgx.heading_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "blurb";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "_part_blurb";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
- the_blurb_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "blurb";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "blurb";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 2;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.tags.anchor_tags = ["blurb"];
- comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "blurb";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_blurb";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.metainfo.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ comp_obj_heading_.metainfo.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "blurb";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "blurb";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["blurb"];
+ comp_obj_heading_.metainfo.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+ comp_obj_heading_.metainfo.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+ the_blurb_section ~= comp_obj_heading_;
} else if (line.matchFirst(rgx.heading)
&& (opt_action.backmatter && opt_action.section_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "blurb";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = line.to!string;
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "blurb";
- comp_obj_heading_.node.marked_up_level = an_object["lev"].to!string;
- comp_obj_heading_.node.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.node.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "blurb";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = line.to!string;
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "blurb";
+ comp_obj_heading_.metainfo.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
+ comp_obj_heading_.metainfo.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_blurb_section ~= comp_obj_heading_;
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.typeinfo.is_of_part = "backmatter";
- comp_obj_para.typeinfo.is_of_section = "blurb";
- comp_obj_para.typeinfo.is_of_type = "para";
- comp_obj_para.typeinfo.is_a = "blurb";
- comp_obj_para.text = munge.url_links(line.to!string.strip).replaceFirst(rgx.para_attribs, "");
- comp_obj_para.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_para.attrib.indent_hang = indent["hang_position"];
- comp_obj_para.attrib.indent_base = indent["base_position"];
- comp_obj_para.has.inline_links = true;
- comp_obj_para.attrib.bullet = bullet;
- the_blurb_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "blurb";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "blurb";
+ comp_obj_para.text = munge.url_links(line.to!string.strip).replaceFirst(rgx.para_attribs, "");
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.attrib.indent_hang = indent["hang_position"];
+ comp_obj_para.attrib.indent_base = indent["base_position"];
+ comp_obj_para.has.inline_links = true;
+ comp_obj_para.attrib.bullet = bullet;
+ the_blurb_section ~= comp_obj_para;
}
obj_type_status["ocn_status"] = OCNstatus.on;
}
@@ -742,10 +736,10 @@ template SiSUdocAbstraction() {
}
an_object[an_object_key] ~= line ~= "\n";
comp_obj_comment = comp_obj_comment.init;
- comp_obj_comment.typeinfo.is_of_part = "comment"; // breaks flow
- comp_obj_comment.typeinfo.is_of_section = "comment"; // breaks flow
- comp_obj_comment.typeinfo.is_of_type = "comment";
- comp_obj_comment.typeinfo.is_a = "comment";
+ comp_obj_comment.metainfo.is_of_part = "comment"; // breaks flow
+ comp_obj_comment.metainfo.is_of_section = "comment"; // breaks flow
+ comp_obj_comment.metainfo.is_of_type = "comment";
+ comp_obj_comment.metainfo.is_a = "comment";
comp_obj_comment.text = an_object[an_object_key].strip;
the_document_body_section ~= comp_obj_comment;
_common_reset_(line_occur, an_object, obj_type_status);
@@ -895,7 +889,6 @@ template SiSUdocAbstraction() {
auto comp_obj_heading
= node_construct.node_emitter_heading(
an_object["substantive"], // string
- an_object["lev"], // string
an_object["lev_markup_number"], // string
an_object["lev_collapsed_number"], // string
segment_anchor_tag_that_object_belongs_to, // string
@@ -946,15 +939,15 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_para = comp_obj_para.init;
- comp_obj_para.typeinfo.is_of_part = "body";
- comp_obj_para.typeinfo.is_of_section = "body";
- comp_obj_para.typeinfo.is_of_type = "para";
- comp_obj_para.typeinfo.is_a = "para";
+ comp_obj_para.metainfo.is_of_part = "body";
+ comp_obj_para.metainfo.is_of_section = "body";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "para";
comp_obj_para.text = an_object["substantive"].to!string.strip;
- comp_obj_para.node.ocn = obj_cite_digits.digit;
- comp_obj_para.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_para.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_para.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_para.metainfo.ocn = obj_cite_digits.digit;
+ comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_para.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_para.attrib.indent_hang = indent["hang_position"];
comp_obj_para.attrib.indent_base = indent["base_position"];
comp_obj_para.attrib.bullet = bullet;
@@ -980,23 +973,23 @@ template SiSUdocAbstraction() {
} // close after non code, other blocks or regular text
/+ unless (the_document_body_section.length == 0) ? +/
if (the_document_body_section.length > 0) {
- if (((the_document_body_section[$-1].typeinfo.is_a == "para")
- || (the_document_body_section[$-1].typeinfo.is_a == "heading")
- || (the_document_body_section[$-1].typeinfo.is_a == "quote")
- || (the_document_body_section[$-1].typeinfo.is_a == "group")
- || (the_document_body_section[$-1].typeinfo.is_a == "block")
- || (the_document_body_section[$-1].typeinfo.is_a == "verse"))
+ if (((the_document_body_section[$-1].metainfo.is_a == "para")
+ || (the_document_body_section[$-1].metainfo.is_a == "heading")
+ || (the_document_body_section[$-1].metainfo.is_a == "quote")
+ || (the_document_body_section[$-1].metainfo.is_a == "group")
+ || (the_document_body_section[$-1].metainfo.is_a == "block")
+ || (the_document_body_section[$-1].metainfo.is_a == "verse"))
&& (the_document_body_section.length > previous_length)) {
- if ((the_document_body_section[$-1].typeinfo.is_a == "heading")
- && (the_document_body_section[$-1].node.heading_lev_markup < 5)) {
+ if ((the_document_body_section[$-1].metainfo.is_a == "heading")
+ && (the_document_body_section[$-1].metainfo.heading_lev_markup < 5)) {
obj_type_status["biblio_section"] = State.off;
obj_type_status["glossary_section"] = State.off;
obj_type_status["blurb_section"] = State.off;
}
- if (the_document_body_section[$-1].typeinfo.is_a == "verse") {
+ if (the_document_body_section[$-1].metainfo.is_a == "verse") {
/+ scan for endnotes for whole poem (each verse in poem) +/
foreach (i; previous_length .. the_document_body_section.length) {
- if (the_document_body_section[i].typeinfo.is_a == "verse") {
+ if (the_document_body_section[i].metainfo.is_a == "verse") {
if ((the_document_body_section[i].text).match(
rgx.inline_notes_delimiter_al_regular_number_note
)) {
@@ -1043,21 +1036,20 @@ template SiSUdocAbstraction() {
}
}
if (an_object["glossary_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "empty";
- comp_obj_heading_.typeinfo.is_of_section = "empty";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Glossary section";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Glossary section";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_glossary_section ~= comp_obj_heading_;
} else {
writeln("gloss");
}
@@ -1071,55 +1063,52 @@ template SiSUdocAbstraction() {
auto biblio_ordered
= biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json);
if (biblio_ordered.length > 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "bibliography";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "_part_bibliography";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "bibliography";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "bibliography";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 2;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.tags.anchor_tags = ["bibliography"];
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bibliography";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_bibliography";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bibliography";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "bibliography";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["bibliography"];
+ the_bibliography_section ~= comp_obj_heading_;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "empty";
- comp_obj_heading_.typeinfo.is_of_section = "empty";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Bibliography";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Bibliography";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_bibliography_section ~= comp_obj_heading_;
}
string out_;
foreach (entry; biblio_ordered) {
@@ -1137,20 +1126,20 @@ template SiSUdocAbstraction() {
((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str),
((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"),
);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.typeinfo.is_of_part = "backmatter";
- comp_obj_para.typeinfo.is_of_section = "bibliography";
- comp_obj_para.typeinfo.is_of_type = "para";
- comp_obj_para.typeinfo.is_a = "bibliography";
- comp_obj_para.text = out_.to!string.strip;
- comp_obj_para.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_para.attrib.indent_hang = 0;
- comp_obj_para.attrib.indent_base = 1;
- comp_obj_para.attrib.bullet = bullet;
- comp_obj_para.tags.anchor_tags = anchor_tags;
- the_bibliography_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "bibliography";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "bibliography";
+ comp_obj_para.text = out_.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = bullet;
+ comp_obj_para.tags.anchor_tags = anchor_tags;
+ the_bibliography_section ~= comp_obj_para;
}
debug(bibliosection) {
foreach (o; the_bibliography_section) {
@@ -1174,22 +1163,21 @@ template SiSUdocAbstraction() {
}
}
if (an_object["blurb_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "empty";
- comp_obj_heading_.typeinfo.is_of_section = "empty";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Blurb section";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Blurb section";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_blurb_section ~= comp_obj_heading_;
}
debug(blurb) {
foreach (blurb; the_blurb_section) {
@@ -1200,17 +1188,17 @@ template SiSUdocAbstraction() {
"hang_position" : 1,
"base_position" : 1,
];
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.typeinfo.is_of_part = "frontmatter";
- comp_obj_toc.typeinfo.is_of_section = "toc";
- comp_obj_toc.typeinfo.is_of_type = "para";
- comp_obj_toc.typeinfo.is_a = "toc";
- comp_obj_toc.node.ocn = 0;
- comp_obj_toc.misc.object_number_off = "";
- comp_obj_toc.misc.object_number_type = 0;
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ comp_obj_toc.metainfo.object_number_off = "";
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
if (the_endnotes_section.length > 1) {
toc_txt_ = format(
"{ %s }%s%s%s",
@@ -1341,7 +1329,7 @@ template SiSUdocAbstraction() {
html_segnames ~= "endnotes";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_endnotes_section) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
@@ -1352,7 +1340,7 @@ template SiSUdocAbstraction() {
html_segnames ~= "glossary";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_glossary_section) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
@@ -1363,7 +1351,7 @@ template SiSUdocAbstraction() {
html_segnames ~= "bibliography";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bibliography_section) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
@@ -1374,13 +1362,13 @@ template SiSUdocAbstraction() {
html_segnames ~= "bookindex";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bookindex_section["scroll"]) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
foreach (ref section; the_bookindex_section["seg"]) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
@@ -1391,7 +1379,7 @@ template SiSUdocAbstraction() {
html_segnames ~= "blurb";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_blurb_section) {
- if (section.node.heading_lev_markup == 4) {
+ if (section.metainfo.heading_lev_markup == 4) {
section.ptr.html_segnames = html_segnames_ptr;
break;
}
@@ -1442,20 +1430,20 @@ template SiSUdocAbstraction() {
return obj;
}
foreach (ref obj; the_document_head_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.node.heading_lev_markup <= 4) {
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
}
- if (obj.node.heading_lev_markup == 0) {
+ if (obj.metainfo.heading_lev_markup == 0) {
/+ TODO second hit (of two) with same assertion failure, check, fix and reinstate
- assert( obj.node.ocn == 1,
- "Title OCN should be 1 not: " ~ obj.node.ocn.to!string); // bug introduced 0.18.1
+ assert( obj.metainfo.ocn == 1,
+ "Title OCN should be 1 not: " ~ obj.metainfo.ocn.to!string); // bug introduced 0.18.1
+/
- obj.node.ocn = 1;
- obj.misc.object_number_type = OCNtype.ocn;
+ obj.metainfo.ocn = 1;
+ obj.metainfo.object_number_type = OCNtype.ocn;
}
/+ dom structure (marked up & collapsed) +/
if ((opt_action.html)
@@ -1465,8 +1453,8 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1476,10 +1464,10 @@ template SiSUdocAbstraction() {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_table_of_contents_section["scroll"]) {
- if (obj.typeinfo.is_a == "heading") {
- if (obj.node.heading_lev_markup <= 4) {
+ if (obj.metainfo.is_a == "heading") {
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
@@ -1493,8 +1481,8 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1503,13 +1491,13 @@ template SiSUdocAbstraction() {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_table_of_contents_section["seg"]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.node.heading_lev_markup <= 4) {
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
@@ -1519,8 +1507,8 @@ template SiSUdocAbstraction() {
|| (opt_action.html_scroll)
|| (opt_action.html_seg)
|| (opt_action.epub)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1529,13 +1517,13 @@ template SiSUdocAbstraction() {
/+ multiple 1~ levels, loop through document body +/
if (the_document_body_section.length > 1) {
foreach (ref obj; the_document_body_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.node.heading_lev_markup <= 4) {
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.lev4_subtoc = lev4_subtoc[obj.tags.segment_anchor_tag];
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
@@ -1553,11 +1541,11 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "para") {
+ } else if (obj.metainfo.is_a == "para") {
_images ~= extract_images(obj.text);
obj = _image_dimensions(manifest_matter, obj);
}
@@ -1571,15 +1559,15 @@ template SiSUdocAbstraction() {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_endnotes_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.digit;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = obj_cite_digits.digit;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1596,8 +1584,8 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1606,15 +1594,15 @@ template SiSUdocAbstraction() {
/+ optional only one 1~ level +/
if (the_glossary_section.length > 1) {
foreach (ref obj; the_glossary_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.digit;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = obj_cite_digits.digit;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1631,28 +1619,28 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "glossary") {
+ } else if (obj.metainfo.is_a == "glossary") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.digit;
+ obj.metainfo.ocn = obj_cite_digits.digit;
}
}
}
/+ optional only one 1~ level +/
if (the_bibliography_section.length > 1) {
foreach (ref obj; the_bibliography_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.digit;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = obj_cite_digits.digit;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1669,13 +1657,13 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "bibliography") {
+ } else if (obj.metainfo.is_a == "bibliography") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.on;
+ obj.metainfo.ocn = obj_cite_digits.on;
}
}
}
@@ -1688,14 +1676,14 @@ template SiSUdocAbstraction() {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_bookindex_section["scroll"]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.on;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = obj_cite_digits.on;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1712,29 +1700,29 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "bookindex") {
+ } else if (obj.metainfo.is_a == "bookindex") {
obj_cite_digits = ocn_emit(OCNstatus.bkidx);
- obj.node.ocn = obj_cite_digits.digit;
- obj.misc.o_n_book_index = obj_cite_digits.bkidx;
- obj.misc.object_number_type = OCNtype.bkidx;
+ obj.metainfo.ocn = obj_cite_digits.digit;
+ obj.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ obj.metainfo.object_number_type = OCNtype.bkidx;
}
}
/+ seg +/
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_bookindex_section["seg"]) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- obj.node.ocn = ++ocn_;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = ++ocn_;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1751,14 +1739,14 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "bookindex") {
+ } else if (obj.metainfo.is_a == "bookindex") {
ocn_bidx_ = ++ocn_bkidx_;
- obj.misc.o_n_book_index = ocn_bidx_; // FIX need to distinguish from regular ocn
- obj.misc.object_number_type = OCNtype.bkidx;
+ obj.metainfo.o_n_book_index = ocn_bidx_; // FIX need to distinguish from regular ocn
+ obj.metainfo.object_number_type = OCNtype.bkidx;
}
}
/+ TODO assert failure, reinstate
@@ -1769,15 +1757,15 @@ template SiSUdocAbstraction() {
/+ optional only one 1~ level +/
if (the_blurb_section.length > 1) {
foreach (ref obj; the_blurb_section) {
- if (obj.typeinfo.is_a == "heading") {
+ if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.node.ocn = obj_cite_digits.on;
- if (obj.node.heading_lev_markup <= 4) {
+ obj.metainfo.ocn = obj_cite_digits.on;
+ if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_4 ~= obj.tags.segment_anchor_tag;
- if (obj.node.heading_lev_markup == 4) {
+ if (obj.metainfo.heading_lev_markup == 4) {
obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
if (html_segnames.length > obj.ptr.html_segnames + 1) {
obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
@@ -1794,39 +1782,38 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.metainfo.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.metainfo.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.typeinfo.is_a == "blurb") {
+ } else if (obj.metainfo.is_a == "blurb") {
obj_cite_digits = ocn_emit(OCNstatus.off);
- obj.misc.object_number_off = obj_cite_digits.off.to!string;
- obj.misc.object_number_type = OCNtype.non;
+ obj.metainfo.object_number_off = obj_cite_digits.off.to!string;
+ obj.metainfo.object_number_type = OCNtype.non;
}
}
}
/+ TODO
- note create/insert heading object sole purpose eof close all open tags
sort out:
- - obj.node.dom_markedup = dom_markedup;
- - obj.node.dom_collapsed = dom_collapsed;
+ - obj.metainfo.dom_markedup = dom_markedup;
+ - obj.metainfo.dom_collapsed = dom_collapsed;
+/
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "empty";
- comp_obj_heading_.typeinfo.is_of_section = "empty";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "";
- comp_obj_heading_.node.marked_up_level = "";
- comp_obj_heading_.node.heading_lev_markup = 9;
- comp_obj_heading_.node.heading_lev_collapsed = 9;
- comp_obj_heading_.node.parent_ocn = 0;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.node.dom_markedup = dom_markedup.dup;
- comp_obj_heading_.node.dom_collapsed = dom_collapsed.dup;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "";
+ comp_obj_heading_.metainfo.heading_lev_markup = 9;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 9;
+ comp_obj_heading_.metainfo.parent_ocn = 0;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.metainfo.dom_markedup = dom_markedup.dup;
+ comp_obj_heading_.metainfo.dom_collapsed = dom_collapsed.dup;
comp_obj_heading_ = obj_dom_structure_set_markup_tags(comp_obj_heading_, dom_markedup, 0);
comp_obj_heading_ = obj_dom_set_collapsed_tags(comp_obj_heading_, dom_collapsed, 0);
comp_obj_heading_ = obj_heading_ancestors(comp_obj_heading_, lv_ancestors_txt);
@@ -2388,14 +2375,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "verse";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2445,14 +2432,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "verse";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2487,14 +2474,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "verse";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2544,14 +2531,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "verse";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2843,10 +2830,10 @@ template SiSUdocAbstraction() {
auto substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]);
comp_obj_block = table_substantive_munge_special(comp_obj_block, an_object["substantive"]);
the_document_body_section ~= comp_obj_block;
@@ -2902,14 +2889,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "quote";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "quote";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2945,14 +2932,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "group";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "group";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -2987,14 +2974,14 @@ template SiSUdocAbstraction() {
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.typeinfo.is_of_part = "body";
- comp_obj_block.typeinfo.is_of_section = "body";
- comp_obj_block.typeinfo.is_of_type = "block";
- comp_obj_block.typeinfo.is_a = "block";
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "block";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3025,14 +3012,14 @@ template SiSUdocAbstraction() {
an_object["is"]
);
comp_obj_poem_ocn = comp_obj_poem_ocn.init;
- comp_obj_poem_ocn.typeinfo.is_of_part = "body";
- comp_obj_poem_ocn.typeinfo.is_of_section = "body";
- comp_obj_poem_ocn.typeinfo.is_of_type = "block";
- comp_obj_poem_ocn.typeinfo.is_a = "poem";
- comp_obj_poem_ocn.node.ocn = obj_cite_digits.on;
- comp_obj_poem_ocn.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
- comp_obj_poem_ocn.misc.o_n_book_index = obj_cite_digits.bkidx; //
- comp_obj_poem_ocn.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_poem_ocn.metainfo.is_of_part = "body";
+ comp_obj_poem_ocn.metainfo.is_of_section = "body";
+ comp_obj_poem_ocn.metainfo.is_of_type = "block";
+ comp_obj_poem_ocn.metainfo.is_a = "poem";
+ comp_obj_poem_ocn.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_poem_ocn.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
+ comp_obj_poem_ocn.metainfo.o_n_book_index = obj_cite_digits.bkidx; //
+ comp_obj_poem_ocn.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_poem_ocn.text = "";
the_document_body_section ~= comp_obj_poem_ocn;
obj_type_status["blocks"] = TriState.off;
@@ -3064,14 +3051,14 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_code = comp_obj_code.init;
- comp_obj_code.typeinfo.is_of_part = "body";
- comp_obj_code.typeinfo.is_of_section = "body";
- comp_obj_code.typeinfo.is_of_type = "block";
- comp_obj_code.typeinfo.is_a = "code";
- comp_obj_code.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_code.metainfo.is_of_part = "body";
+ comp_obj_code.metainfo.is_of_section = "body";
+ comp_obj_code.metainfo.is_of_type = "block";
+ comp_obj_code.metainfo.is_a = "code";
+ comp_obj_code.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_code.text = an_object["substantive"];
comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
@@ -3107,10 +3094,10 @@ template SiSUdocAbstraction() {
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.node.ocn = obj_cite_digits.on;
- comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.misc.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]);
comp_obj_block = table_substantive_munge(comp_obj_block, an_object["substantive"]);
the_document_body_section ~= comp_obj_block;
@@ -3563,10 +3550,10 @@ template SiSUdocAbstraction() {
return ref H table_head,
) {
static auto rgx = Rgx();
- table_object.typeinfo.is_of_part = "body";
- table_object.typeinfo.is_of_section = "body";
- table_object.typeinfo.is_of_type = "block";
- table_object.typeinfo.is_a = "table";
+ table_object.metainfo.is_of_part = "body";
+ table_object.metainfo.is_of_section = "body";
+ table_object.metainfo.is_of_type = "block";
+ table_object.metainfo.is_a = "table";
table_object.has.inline_notes_reg = false;
table_object.has.inline_notes_star = false;
table_object.has.inline_links = false;
@@ -4302,48 +4289,48 @@ template SiSUdocAbstraction() {
_anchor_tag,
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.typeinfo.is_of_part = "frontmatter";
- comp_obj_toc.typeinfo.is_of_section = "toc";
- comp_obj_toc.typeinfo.is_of_type = "para";
- comp_obj_toc.typeinfo.is_a = "toc";
- comp_obj_toc.node.ocn = 0;
- comp_obj_toc.misc.object_number_off = "";
- comp_obj_toc.misc.object_number_type = 0;
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.attrib.bullet = false;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["scroll"] ~= comp_obj_toc;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ comp_obj_toc.metainfo.object_number_off = "";
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["scroll"] ~= comp_obj_toc;
} else {
indent=[
"hang_position" : 0,
"base_position" : 0,
];
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.typeinfo.is_of_part = "frontmatter";
- comp_obj_toc.typeinfo.is_of_section = "toc";
- comp_obj_toc.typeinfo.is_of_type = "para";
- comp_obj_toc.typeinfo.is_a = "toc";
- comp_obj_toc.node.ocn = 0;
- comp_obj_toc.misc.object_number_off = "";
- comp_obj_toc.misc.object_number_type = 0;
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.attrib.bullet = false;
- comp_obj_toc.text = "Table of Contents";
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["scroll"] ~= comp_obj_toc;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ comp_obj_toc.metainfo.object_number_off = "";
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.text = "Table of Contents";
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.typeinfo.is_of_part = "frontmatter";
- comp_obj_toc.typeinfo.is_of_section = "toc";
- comp_obj_toc.typeinfo.is_of_type = "para";
- comp_obj_toc.typeinfo.is_a = "toc";
- comp_obj_toc.node.ocn = 0;
- comp_obj_toc.misc.object_number_off = "";
- comp_obj_toc.misc.object_number_type = 0;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ comp_obj_toc.metainfo.object_number_off = "";
+ comp_obj_toc.metainfo.object_number_type = 0;
comp_obj_toc.attrib.bullet = false;
comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
@@ -4853,16 +4840,16 @@ template SiSUdocAbstraction() {
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["object_number"] = _comp_obj_heading.node.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.node.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.node.heading_lev_collapsed;
+ oa_j.object["object_number"] = _comp_obj_heading.metainfo.ocn;
+ oa_j.object["lev_markup_number"] = _comp_obj_heading.metainfo.heading_lev_markup;
+ oa_j.object["lev_collapsed_number"] = _comp_obj_heading.metainfo.heading_lev_collapsed;
oa_j.object["heading_ptr"]
= _comp_obj_heading.ptr.heading;
oa_j.object["doc_object_ptr"]
= _comp_obj_heading.ptr.doc_object;
}
- oa_j.object["parent_object_number"] = _comp_obj_heading.node.parent_ocn;
- oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.node.parent_lev_markup;
+ oa_j.object["parent_object_number"] = _comp_obj_heading.metainfo.parent_ocn;
+ oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
_obj_attrib = oa_j.toString();
return _obj_attrib;
}
@@ -5038,44 +5025,42 @@ template SiSUdocAbstraction() {
&& opt_action.section_bookindex)) {
string bi_tmp_seg, bi_tmp_scroll;
string[] bi_tmp_tags;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "bookindex";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Book Index";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "_part_book_index";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = true;
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Book Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_book_index";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = true;
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "bookindex";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Index";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "bookindex";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 2;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = false;
- comp_obj_heading_.tags.anchor_tags = ["bookindex"];
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "bookindex";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = false;
+ comp_obj_heading_.tags.anchor_tags = ["bookindex"];
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
++mkn;
import std.array : appender;
auto buffer = appender!(char[])();
@@ -5132,40 +5117,39 @@ template SiSUdocAbstraction() {
bi_tmp_seg ~= " \\\\\n ";
++skn;
}
- bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
- bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.typeinfo.is_of_part = "backmatter";
- comp_obj_para.typeinfo.is_of_section = "bookindex";
- comp_obj_para.typeinfo.is_of_type = "para";
- comp_obj_para.typeinfo.is_a = "bookindex";
- comp_obj_para.text = bi_tmp_scroll.to!string.strip;
- comp_obj_para.node.ocn = 0;
- comp_obj_para.misc.object_number_off = "";
- comp_obj_para.misc.object_number_type = 0;
- comp_obj_para.tags.anchor_tags = bi_tmp_tags;
- comp_obj_para.attrib.indent_hang = 0;
- comp_obj_para.attrib.indent_base = 1;
- comp_obj_para.attrib.bullet = false;
- comp_obj_para.has.inline_links = true;
- bookindex_section["scroll"] ~= comp_obj_para;
- comp_obj_para.text = bi_tmp_seg.to!string.strip;
- bookindex_section["seg"] ~= comp_obj_para;
+ bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
+ bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "bookindex";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "bookindex";
+ comp_obj_para.text = bi_tmp_scroll.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.tags.anchor_tags = bi_tmp_tags;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = false;
+ comp_obj_para.has.inline_links = true;
+ bookindex_section["scroll"] ~= comp_obj_para;
+ comp_obj_para.text = bi_tmp_seg.to!string.strip;
+ bookindex_section["seg"] ~= comp_obj_para;
++mkn;
}
} else { // no book index, (figure out what to do here)
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.text = "(skip) there is no Book Index";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.text = "(skip) there is no Book Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
}
auto t = tuple(bookindex_section, obj_cite_digits);
return t;
@@ -5183,12 +5167,12 @@ template SiSUdocAbstraction() {
int cntr,
)
in {
- assert((contents_am[cntr].typeinfo.is_a == "para")
- || (contents_am[cntr].typeinfo.is_a == "heading")
- || (contents_am[cntr].typeinfo.is_a == "quote")
- || (contents_am[cntr].typeinfo.is_a == "group")
- || (contents_am[cntr].typeinfo.is_a == "block")
- || (contents_am[cntr].typeinfo.is_a == "verse"));
+ assert((contents_am[cntr].metainfo.is_a == "para")
+ || (contents_am[cntr].metainfo.is_a == "heading")
+ || (contents_am[cntr].metainfo.is_a == "quote")
+ || (contents_am[cntr].metainfo.is_a == "group")
+ || (contents_am[cntr].metainfo.is_a == "block")
+ || (contents_am[cntr].metainfo.is_a == "verse"));
assert(cntr >= previous_count);
previous_count=cntr;
assert(
@@ -5264,79 +5248,76 @@ template SiSUdocAbstraction() {
ObjGenericComposite comp_obj_heading_;
if ((endnotes_["notes"].length > 0)
&& (opt_action.backmatter && opt_action.section_endnotes)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "endnotes";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "_part_endnotes";
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_endnotes";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "backmatter";
- comp_obj_heading_.typeinfo.is_of_section = "endnotes";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag = "endnotes";
- comp_obj_heading_.node.marked_up_level = "1";
- comp_obj_heading_.node.heading_lev_markup = 4;
- comp_obj_heading_.node.heading_lev_collapsed = 2;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- comp_obj_heading_.tags.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "endnotes";
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["endnotes"];
+ the_endnotes_section ~= comp_obj_heading_;
++mkn;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.typeinfo.is_of_part = "empty";
- comp_obj_heading_.typeinfo.is_of_section = "empty";
- comp_obj_heading_.typeinfo.is_of_type = "para";
- comp_obj_heading_.typeinfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there are no Endnotes";
- comp_obj_heading_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_heading_.node.marked_up_level = "B";
- comp_obj_heading_.node.heading_lev_markup = 1;
- comp_obj_heading_.node.heading_lev_collapsed = 1;
- comp_obj_heading_.node.parent_ocn = 1;
- comp_obj_heading_.node.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there are no Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
}
if (opt_action.backmatter && opt_action.section_endnotes) {
ObjGenericComposite comp_obj_endnote_;
- comp_obj_endnote_ = comp_obj_endnote_.init;
- comp_obj_endnote_.typeinfo.is_of_part = "backmatter";
- comp_obj_endnote_.typeinfo.is_of_section = "endnote";
- comp_obj_endnote_.typeinfo.is_of_type = "para";
- comp_obj_endnote_.typeinfo.is_a = "endnote";
- comp_obj_endnote_.node.ocn = 0;
- comp_obj_heading_.misc.object_number_off = "";
- comp_obj_heading_.misc.object_number_type = 0;
- comp_obj_endnote_.attrib.indent_hang = 0;
- comp_obj_endnote_.attrib.indent_base = 0;
- comp_obj_endnote_.attrib.bullet = false;
+ comp_obj_endnote_ = comp_obj_endnote_.init;
+ comp_obj_endnote_.metainfo.is_of_part = "backmatter";
+ comp_obj_endnote_.metainfo.is_of_section = "endnote";
+ comp_obj_endnote_.metainfo.is_of_type = "para";
+ comp_obj_endnote_.metainfo.is_a = "endnote";
+ comp_obj_endnote_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.object_number_off = "";
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_endnote_.attrib.indent_hang = 0;
+ comp_obj_endnote_.attrib.indent_base = 0;
+ comp_obj_endnote_.attrib.bullet = false;
foreach (i, endnote; endnotes_["notes"]) {
- auto m = endnote.matchFirst(rgx.note_ref);
- string notenumber = m.captures[1].to!string;
- string anchor_tag = "note_" ~ notenumber;
- comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.has.inline_links = true;
- comp_obj_endnote_.text = endnote.strip;
- the_endnotes_section ~= comp_obj_endnote_;
+ auto m = endnote.matchFirst(rgx.note_ref);
+ string notenumber = m.captures[1].to!string;
+ string anchor_tag = "note_" ~ notenumber;
+ comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
+ comp_obj_endnote_.has.inline_links = true;
+ comp_obj_endnote_.text = endnote.strip;
+ the_endnotes_section ~= comp_obj_endnote_;
}
}
auto t = tuple(the_endnotes_section, obj_cite_digits);
@@ -5486,12 +5467,12 @@ template SiSUdocAbstraction() {
p_["object_number"] = lv4;
}
ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.typeinfo.is_a = is_;
- comp_obj_location.node.ocn = obj_cite_digits.on;
- comp_obj_location.tags.segment_anchor_tag = segment_anchor_tag.to!string;
- comp_obj_location.node.parent_ocn = p_["object_number"];
- comp_obj_location.node.parent_lev_markup = p_["lev_markup_number"];
+ comp_obj_location = comp_obj_location.init;
+ comp_obj_location.metainfo.is_a = is_;
+ comp_obj_location.metainfo.ocn = obj_cite_digits.on;
+ comp_obj_location.tags.segment_anchor_tag = segment_anchor_tag.to!string;
+ comp_obj_location.metainfo.parent_ocn = p_["object_number"];
+ comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("x ", _node.to!string);
@@ -5499,16 +5480,15 @@ template SiSUdocAbstraction() {
writeln("- ", _node.to!string);
}
}
- assert(comp_obj_location.node.parent_lev_markup >= 4);
- assert(comp_obj_location.node.parent_lev_markup <= 7);
- assert(comp_obj_location.node.parent_ocn >= 0);
+ assert(comp_obj_location.metainfo.parent_lev_markup >= 4);
+ assert(comp_obj_location.metainfo.parent_lev_markup <= 7);
+ assert(comp_obj_location.metainfo.parent_ocn >= 0);
return comp_obj_location;
}
invariant() {
}
- ObjGenericComposite node_emitter_heading(T,L,Lm,Lc,Ta,N,C,P,LA,I,PSn,fNr,fNs,fL)(
+ ObjGenericComposite node_emitter_heading(T,Lm,Lc,Ta,N,C,P,LA,I,PSn,fNr,fNs,fL)(
T _text,
- L lev,
Lm lev_markup_number,
Lc lev_collapsed_number,
Ta segment_anchor_tag,
@@ -5638,20 +5618,19 @@ template SiSUdocAbstraction() {
}
ObjGenericComposite _comp_obj_heading_;
_comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.typeinfo.is_of_part = "body";
- _comp_obj_heading_.typeinfo.is_of_section = "body";
- _comp_obj_heading_.typeinfo.is_of_type = "para";
- _comp_obj_heading_.typeinfo.is_a = "heading";
+ _comp_obj_heading_.metainfo.is_of_part = "body";
+ _comp_obj_heading_.metainfo.is_of_section = "body";
+ _comp_obj_heading_.metainfo.is_of_type = "para";
+ _comp_obj_heading_.metainfo.is_a = "heading";
_comp_obj_heading_.text = _text.to!string.strip;
- _comp_obj_heading_.node.ocn = obj_cite_digits.on;
- _comp_obj_heading_.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- _comp_obj_heading_.misc.object_number_type = obj_cite_digits.type;
+ _comp_obj_heading_.metainfo.ocn = obj_cite_digits.on;
+ _comp_obj_heading_.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ _comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
_comp_obj_heading_.tags.segment_anchor_tag = segment_anchor_tag.to!string;
- _comp_obj_heading_.node.marked_up_level = lev;
- _comp_obj_heading_.node.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.node.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.node.parent_ocn = p_["object_number"];
- _comp_obj_heading_.node.parent_lev_markup = p_["lev_markup_number"];
+ _comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
+ _comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
+ _comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
+ _comp_obj_heading_.metainfo.parent_lev_markup = p_["lev_markup_number"];
_comp_obj_heading_.tags.heading_ancestors_text = lv_ancestors_txt;
_comp_obj_heading_.ptr.doc_object = cntr_;
_comp_obj_heading_.ptr.html_segnames = ((lev_markup_number == "4") ? html_segnames_ptr : 0);
@@ -5669,34 +5648,34 @@ template SiSUdocAbstraction() {
writeln("* ", _node.to!string);
}
}
- assert(_comp_obj_heading_.node.parent_lev_markup <= 7);
- assert(_comp_obj_heading_.node.parent_ocn >= 0);
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup <= 7);
+ assert(_comp_obj_heading_.metainfo.parent_ocn >= 0);
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- assert(_comp_obj_heading_.node.heading_lev_markup <= 7);
- assert(_comp_obj_heading_.node.ocn >= 0);
- if (_comp_obj_heading_.node.parent_lev_markup > 0) {
- assert(_comp_obj_heading_.node.parent_lev_markup < _comp_obj_heading_.node.heading_lev_markup);
- if (_comp_obj_heading_.node.ocn != 0) {
- assert(_comp_obj_heading_.node.parent_ocn < _comp_obj_heading_.node.ocn);
+ assert(_comp_obj_heading_.metainfo.heading_lev_markup <= 7);
+ assert(_comp_obj_heading_.metainfo.ocn >= 0);
+ if (_comp_obj_heading_.metainfo.parent_lev_markup > 0) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup < _comp_obj_heading_.metainfo.heading_lev_markup);
+ if (_comp_obj_heading_.metainfo.ocn != 0) {
+ assert(_comp_obj_heading_.metainfo.parent_ocn < _comp_obj_heading_.metainfo.ocn);
}
}
- if (_comp_obj_heading_.node.heading_lev_markup == 0) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
- assert(_comp_obj_heading_.node.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_1);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_2);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
- assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_3);
- } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
+ if (_comp_obj_heading_.metainfo.heading_lev_markup == 0) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_1);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_2);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_3);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
}
}
return _comp_obj_heading_;
diff --git a/src/sdp/meta/metadoc_summary.d b/src/sdp/meta/metadoc_summary.d
index 0c5e73d..f278f90 100644
--- a/src/sdp/meta/metadoc_summary.d
+++ b/src/sdp/meta/metadoc_summary.d
@@ -28,18 +28,18 @@ template SiSUabstractionSummary() {
];
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[k]) {
- if (obj.typeinfo.is_of_part != "empty") {
- if (!empty(obj.node.object_number)) {
+ if (obj.metainfo.is_of_part != "empty") {
+ if (!empty(obj.metainfo.object_number)) {
if (k == "body") {
- check["last_object_number_body"] = obj.node.object_number;
+ check["last_object_number_body"] = obj.metainfo.object_number;
}
- if (!(obj.node.object_number.empty)) {
- check["last_object_number"] = obj.node.object_number;
+ if (!(obj.metainfo.object_number.empty)) {
+ check["last_object_number"] = obj.metainfo.object_number;
}
}
if (k == "bookindex_seg") {
- if (obj.misc.object_number_type == 2) {
- check["last_object_number_book_index"] = obj.misc.object_number_book_index;
+ if (obj.metainfo.object_number_type == 2) {
+ check["last_object_number_book_index"] = obj.metainfo.object_number_book_index;
}
}
}
diff --git a/src/sdp/meta/object_setter.d b/src/sdp/meta/object_setter.d
index 77e44e0..a928ec8 100644
--- a/src/sdp/meta/object_setter.d
+++ b/src/sdp/meta/object_setter.d
@@ -6,7 +6,7 @@
module sdp.meta.object_setter;
template ObjectSetter() {
/+ structs +/
- struct DocObj_TypeInfo_ { // typeinfo
+ struct DocObj_MetaInfo_ { // metainfo
string is_of_part = ""; // frontmatter, body, backmatter
string is_of_section = ""; // toc, body, glossary, biography, book index, blurb
string is_of_type = ""; // para, block ?
@@ -14,63 +14,7 @@ template ObjectSetter() {
alias of_part = is_of_part;
alias of_section = is_of_section;
alias is_of = is_of_type;
- }
- struct DocObj_TxtAttrib_ { // attrib
- int indent_base = 0;
- int indent_hang = 0;
- bool bullet = false;
- string language = ""; // not implemented, consider
- }
- struct DocObj_Has_ { // has
- bool inline_links = false;
- bool inline_notes_reg = false;
- bool inline_notes_star = false;
- bool contains_image_without_dimensions = false;
- }
- struct DocObj_Node_ { // node
- enum ONtype { none, substantive, non_substantive, glossary, bibliography, book_index, blurb, comment }
- string[string][string] node;
- int ocn = 0;
- string object_number() const @property {
- return (ocn==0)
- ? ""
- : ocn.to!string;
- }
- int o_n_type = 0;
- string marked_up_level = "9";
- int heading_lev_markup = 9;
- int heading_lev_collapsed = 9;
- int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] heading_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int parent_lev_markup = 0;
- int parent_ocn = 0;
- int[] ancestors = [];
- }
- struct DocObj_Table_ { // table
- int number_of_columns = 0;
- double[] column_widths = [];
- string[] column_aligns = [];
- bool heading = false;
- bool walls = false; // not implemented
- }
- struct DocObj_CodeBlock_ { // code_block
- string syntax = "";
- }
- struct DocObj_Pointer_ { // ptr
- int doc_object = 0;
- int html_segnames = 0;
- int heading = 0;
- }
- struct DocObj_Tags_ { // tags
- string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
- string segment_anchor_tag = "";
- string segname_prev = "";
- string segname_next = "";
- string[] lev4_subtoc = [];
- string[] anchor_tags = [];
- }
- struct DocObj_Misc_ { // misc
+ /+ o_n +/
int o_n_substantive = 0;
int o_n_non_substantive = 0;
int o_n_glossary = 0;
@@ -109,19 +53,103 @@ template ObjectSetter() {
}
string object_number_off = "";
bool visible_object_number = false;
+ // enum ONtype { none, substantive, non_substantive, glossary, bibliography, book_index, blurb, comment }
int object_number_type = 0; // { ocn, non, bkidx }
+ /+ node +/
+ string[string][string] node;
+ int ocn = 0;
+ string object_number() const @property {
+ return (ocn==0)
+ ? ""
+ : ocn.to!string;
+ }
+ int o_n_type = 0;
+ int heading_lev_markup = 9;
+ int heading_lev_collapsed = 9;
+ string marked_up_level() const @property {
+ string _out;
+ switch (heading_lev_markup) {
+ case 0:
+ _out = "A";
+ break;
+ case 1:
+ _out = "B";
+ break;
+ case 2:
+ _out = "C";
+ break;
+ case 3:
+ _out = "D";
+ break;
+ case 4:
+ _out = "1";
+ break;
+ case 5:
+ _out = "2";
+ break;
+ case 6:
+ _out = "3";
+ break;
+ case 7:
+ _out = "4";
+ break;
+ default:
+ _out = "";
+ break;
+ }
+ return _out;
+ }
+ int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[] heading_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int parent_lev_markup = 0;
+ int parent_ocn = 0;
+ int[] ancestors = [];
+ }
+ struct DocObj_TxtAttrib_ { // attrib
+ int indent_base = 0;
+ int indent_hang = 0;
+ bool bullet = false;
+ string language = ""; // not implemented, consider
+ }
+ struct DocObj_Has_ { // has
+ bool inline_links = false;
+ bool inline_notes_reg = false;
+ bool inline_notes_star = false;
+ bool contains_image_without_dimensions = false;
+ }
+ struct DocObj_Table_ { // table
+ int number_of_columns = 0;
+ double[] column_widths = [];
+ string[] column_aligns = [];
+ bool heading = false;
+ bool walls = false; // not implemented
+ }
+ struct DocObj_CodeBlock_ { // code_block
+ string syntax = "";
+ }
+ struct DocObj_Pointer_ { // ptr
+ int doc_object = 0;
+ int html_segnames = 0;
+ int heading = 0;
+ }
+ struct DocObj_Tags_ { // tags
+ string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string segment_anchor_tag = "";
+ string segname_prev = "";
+ string segname_next = "";
+ string[] lev4_subtoc = [];
+ string[] anchor_tags = [];
}
struct ObjGenericComposite {
string text = "";
- DocObj_TypeInfo_ typeinfo;
+ DocObj_MetaInfo_ metainfo;
DocObj_TxtAttrib_ attrib;
DocObj_Tags_ tags;
DocObj_Has_ has;
DocObj_Table_ table;
DocObj_CodeBlock_ code_block;
- DocObj_Misc_ misc;
DocObj_Pointer_ ptr;
- DocObj_Node_ node;
}
struct TheObjects {
ObjGenericComposite[] oca;