aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-06-12 15:38:38 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:15 -0400
commit6f8fddb2dfa5faad56af2a0bfd0bf3b694695136 (patch)
tree6b8af78c4cbb2a7a601de5430f41ab4a93503d67
parent0.26.2 image(s) without dimensions (diff)
0.26.3 object info changes
-rw-r--r--org/meta_abstraction.org1938
-rw-r--r--org/meta_debugs.org36
-rw-r--r--org/output_sqlite.org98
-rw-r--r--org/output_xmls.org398
-rw-r--r--org/sdp.org17
-rw-r--r--src/sdp/meta/doc_debugs.d36
-rw-r--r--src/sdp/meta/metadoc.d1
-rw-r--r--src/sdp/meta/metadoc_from_src.d1834
-rw-r--r--src/sdp/meta/metadoc_summary.d14
-rw-r--r--src/sdp/meta/object_setter.d96
-rw-r--r--src/sdp/output/epub3.d134
-rw-r--r--src/sdp/output/html.d80
-rw-r--r--src/sdp/output/sqlite.d90
-rw-r--r--src/sdp/output/xmls.d178
-rwxr-xr-xsrc/sdp/sdp.d1
-rw-r--r--views/version.txt2
16 files changed, 2486 insertions, 2467 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index f74c8d6..b1c08ad 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -247,7 +247,7 @@ pure auto obj_heading_ancestors(O)(
O obj,
string[] lv_ancestors_txt,
) {
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
lv_ancestors_txt[0] = obj.text.to!string;
foreach(k; 1..8) {
@@ -292,7 +292,7 @@ pure auto obj_heading_ancestors(O)(
lv_ancestors_txt[7] = obj.text.to!string;
goto default;
default:
- obj.heading_ancestors_text = lv_ancestors_txt.dup;
+ obj.tags.heading_ancestors_text = lv_ancestors_txt.dup;
}
return obj;
}
@@ -343,7 +343,7 @@ pure auto obj_dom_structure_set_markup_tags(O)(
debug(dom_magic_numbers) {
writeln("marked up: ", lev, ": ", dom);
}
- obj.dom_markedup = dom.dup;
+ obj.node.dom_markedup = dom.dup;
return obj;
}
#+END_SRC
@@ -393,7 +393,7 @@ pure auto obj_dom_set_collapsed_tags(O)(
debug(dom_magic_numbers) {
writeln("collapsed: ", lev, ": ", dom);
}
- obj.dom_collapsed = dom.dup;
+ obj.node.dom_collapsed = dom.dup;
return obj;
}
#+END_SRC
@@ -500,29 +500,29 @@ auto heading_match_rgx = [
];
string _anchor_tag;
string toc_txt_;
-an_object["glossary_nugget"] = "";
-an_object["blurb_nugget"] = "";
-comp_obj_heading_ = comp_obj_heading_.init;
-comp_obj_heading_.of_part = "frontmatter";
-comp_obj_heading_.of_section = "toc";
-comp_obj_heading_.is_of = "para";
-comp_obj_heading_.is_a = "heading";
-comp_obj_heading_.text = "Table of Contents";
-comp_obj_heading_.ocn = 0;
-comp_obj_heading_.obj_cite_number = "";
-comp_obj_heading_.obj_cite_number_off = "";
-comp_obj_heading_.obj_cite_number_type = 0;
-comp_obj_heading_.segment_anchor_tag = "toc";
-comp_obj_heading_.marked_up_level = "1";
-comp_obj_heading_.heading_lev_markup = 4;
-comp_obj_heading_.heading_lev_collapsed = 1;
-comp_obj_heading_.parent_ocn = 1;
-comp_obj_heading_.parent_lev_markup = 0;
-comp_obj_heading_.ptr_html_segnames = html_segnames_ptr;
-comp_obj_heading_.anchor_tags = ["toc"];
-comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
-comp_obj_heading_.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_.typeinfo.of_part = "frontmatter";
+comp_obj_heading_.typeinfo.of_section = "toc";
+comp_obj_heading_.typeinfo.is_of = "para";
+comp_obj_heading_.typeinfo.is_a = "heading";
+comp_obj_heading_.text = "Table of Contents";
+comp_obj_heading_.node.ocn = 0;
+comp_obj_heading_.node.obj_cite_number = "";
+comp_obj_heading_.misc.obj_cite_number_off = "";
+comp_obj_heading_.misc.obj_cite_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_;
html_segnames_ptr_cntr++;
the_table_of_contents_section = [
"seg": [toc_head],
@@ -679,60 +679,60 @@ if there is a glossary section you need to:
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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_glossary";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "glossary";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- comp_obj_heading_.anchor_tags = ["glossary"];
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} 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.of_part = "backmatter";
- comp_obj_para.of_section = "glossary";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "glossary";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "glossary";
+ comp_obj_para.typeinfo.is_of = "para";
+ comp_obj_para.typeinfo.is_a = "glossary";
comp_obj_para.text = line.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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;
@@ -803,80 +803,80 @@ if there is a blurb section you need to:
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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_blurb";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["blurb"];
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else if (line.matchFirst(rgx.heading)
&& (opt_action.backmatter && opt_action.section_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = line.to!string;
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = an_object["lev"].to!string;
- comp_obj_heading_.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = line.to!string;
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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;
+ 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.of_part = "backmatter";
- comp_obj_para.of_section = "blurb";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "blurb";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "blurb";
+ comp_obj_para.typeinfo.is_of = "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.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.inline_links = true;
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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;
@@ -1037,14 +1037,14 @@ if (line.matchFirst(rgx.book_index)
debug(comment) {
writeln(line);
}
- an_object[an_object_key] ~= line ~= "\n";
- comp_obj_comment = comp_obj_comment.init;
- comp_obj_comment.of_part = "comment"; // breaks flow
- comp_obj_comment.of_section = "comment"; // breaks flow
- comp_obj_comment.is_of = "comment";
- comp_obj_comment.is_a = "comment";
- comp_obj_comment.text = an_object[an_object_key].strip;
- the_document_body_section ~= comp_obj_comment;
+ an_object[an_object_key] ~= line ~= "\n";
+ comp_obj_comment = comp_obj_comment.init;
+ comp_obj_comment.typeinfo.of_part = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.of_section = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.is_of = "comment";
+ comp_obj_comment.typeinfo.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);
processing.remove("verse");
++cntr;
@@ -1281,26 +1281,26 @@ if ((obj_type_status["heading"] == State.on)
= 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];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "body";
- comp_obj_para.of_section = "body";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "para";
- comp_obj_para.text = an_object["substantive"].to!string.strip;
- comp_obj_para.ocn = obj_cite_digits.digit;
- comp_obj_para.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_para.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_para.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_para.obj_cite_number_type = obj_cite_digits.type;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- comp_obj_para.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_para.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_para.inline_links = substantive_obj_misc_tuple[sObj.links];
- comp_obj_para.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
- the_document_body_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "body";
+ comp_obj_para.typeinfo.of_section = "body";
+ comp_obj_para.typeinfo.is_of = "para";
+ comp_obj_para.typeinfo.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.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_para.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_para.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_para.misc.obj_cite_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;
+ comp_obj_para.tags.anchor_tags = anchor_tags;
+ comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ comp_obj_para.has.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
+ the_document_body_section ~= comp_obj_para;
_common_reset_(line_occur, an_object, obj_type_status);
indent=[
"hang_position" : 0,
@@ -1320,23 +1320,23 @@ if ((obj_type_status["heading"] == State.on)
#+BEGIN_SRC d
/+ unless (the_document_body_section.length == 0) ? +/
if (the_document_body_section.length > 0) {
- if (((the_document_body_section[$-1].is_a == "para")
- || (the_document_body_section[$-1].is_a == "heading")
- || (the_document_body_section[$-1].is_a == "quote")
- || (the_document_body_section[$-1].is_a == "group")
- || (the_document_body_section[$-1].is_a == "block")
- || (the_document_body_section[$-1].is_a == "verse"))
+ 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"))
&& (the_document_body_section.length > previous_length)) {
- if ((the_document_body_section[$-1].is_a == "heading")
- && (the_document_body_section[$-1].heading_lev_markup < 5)) {
+ if ((the_document_body_section[$-1].typeinfo.is_a == "heading")
+ && (the_document_body_section[$-1].node.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].is_a == "verse") {
+ if (the_document_body_section[$-1].typeinfo.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].is_a == "verse") {
+ if (the_document_body_section[i].typeinfo.is_a == "verse") {
if ((the_document_body_section[i].text).match(
rgx.inline_notes_delimiter_al_regular_number_note
)) {
@@ -1406,22 +1406,22 @@ debug(endnotes) {
#+name: abs_post
#+BEGIN_SRC d
if (an_object["glossary_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Glossary section";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else {
writeln("gloss");
}
@@ -1445,58 +1445,58 @@ auto biblio_ordered
#+name: abs_post
#+BEGIN_SRC d
if (biblio_ordered.length > 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_bibliography";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bibliography";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["bibliography"];
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
#+END_SRC
@@ -1520,21 +1520,21 @@ foreach (entry; biblio_ordered) {
((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str),
((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"),
);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "backmatter";
- comp_obj_para.of_section = "bibliography";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bibliography";
- comp_obj_para.text = out_.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- the_bibliography_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bibliography";
+ comp_obj_para.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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;
}
#+END_SRC
@@ -1606,23 +1606,23 @@ debug(bookindex) {
#+name: abs_post
#+BEGIN_SRC d
if (an_object["blurb_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Blurb section";
- comp_obj_heading_.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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_;
}
debug(blurb) {
foreach (blurb; the_blurb_section) {
@@ -1639,18 +1639,18 @@ indent=[
"hang_position" : 1,
"base_position" : 1,
];
-comp_obj_toc = comp_obj_toc.init;
-comp_obj_toc.of_part = "frontmatter";
-comp_obj_toc.of_section = "toc";
-comp_obj_toc.is_of = "para";
-comp_obj_toc.is_a = "toc";
-comp_obj_toc.ocn = 0;
-comp_obj_toc.obj_cite_number = "";
-comp_obj_toc.obj_cite_number_off = "";
-comp_obj_toc.obj_cite_number_type = 0;
-comp_obj_toc.indent_hang = indent["hang_position"];
-comp_obj_toc.indent_base = indent["base_position"];
-comp_obj_toc.bullet = false;
+comp_obj_toc = comp_obj_toc.init;
+comp_obj_toc.typeinfo.of_part = "frontmatter";
+comp_obj_toc.typeinfo.of_section = "toc";
+comp_obj_toc.typeinfo.is_of = "para";
+comp_obj_toc.typeinfo.is_a = "toc";
+comp_obj_toc.node.ocn = 0;
+comp_obj_toc.node.obj_cite_number = "";
+comp_obj_toc.misc.obj_cite_number_off = "";
+comp_obj_toc.misc.obj_cite_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",
@@ -1661,7 +1661,7 @@ if (the_endnotes_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_glossary_section.length > 1) {
@@ -1674,7 +1674,7 @@ if (the_glossary_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1683,7 +1683,7 @@ if (the_glossary_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bibliography_section.length > 1){
@@ -1696,7 +1696,7 @@ if (the_bibliography_section.length > 1){
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
@@ -1706,7 +1706,7 @@ if (the_bibliography_section.length > 1){
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bookindex_section["seg"].length > 1) {
@@ -1719,7 +1719,7 @@ if (the_bookindex_section["seg"].length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_bookindex_section["scroll"].length > 1) {
@@ -1730,7 +1730,7 @@ if (the_bookindex_section["scroll"].length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_blurb_section.length > 1) {
@@ -1743,7 +1743,7 @@ if (the_blurb_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1751,7 +1751,7 @@ if (the_blurb_section.length > 1) {
"blurb", // _anchor_tag
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
comp_obj_toc.text = toc_txt_.to!string.strip;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
@@ -1762,7 +1762,7 @@ debug(toc) {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["seg"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
debug(tocscroll) {
@@ -1772,7 +1772,7 @@ debug(tocscroll) {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["scroll"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
#+END_SRC
@@ -1808,8 +1808,8 @@ if (the_endnotes_section.length > 1) {
html_segnames ~= "endnotes";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_endnotes_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1825,8 +1825,8 @@ if (the_glossary_section.length > 1) {
html_segnames ~= "glossary";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_glossary_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1842,8 +1842,8 @@ if (the_bibliography_section.length > 1) {
html_segnames ~= "bibliography";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bibliography_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1859,14 +1859,14 @@ if (the_bookindex_section["scroll"].length > 1) {
html_segnames ~= "bookindex";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bookindex_section["scroll"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
foreach (ref section; the_bookindex_section["seg"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1882,8 +1882,8 @@ if (the_blurb_section.length > 1) {
html_segnames ~= "blurb";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_blurb_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1949,7 +1949,7 @@ string[] segnames_0_4;
#+name: abs_post
#+BEGIN_SRC d
auto _image_dimensions(M,O)(M manifest_matter, O obj) {
- if (obj.contains_image_without_dimensions) {
+ if (obj.has.contains_image_without_dimensions) {
import std.math;
import imageformats;
int w, h, chans;
@@ -1989,21 +1989,21 @@ auto _image_dimensions(M,O)(M manifest_matter, O obj) {
#+name: abs_post
#+BEGIN_SRC d
foreach (ref obj; the_document_head_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
}
- if (obj.heading_lev_markup == 0) {
+ if (obj.node.heading_lev_markup == 0) {
/+ TODO second hit (of two) with same assertion failure, check, fix and reinstate
- assert( obj.ocn == 1,
- "Title OCN should be 1 not: " ~ obj.ocn.to!string); // bug introduced 0.18.1
+ assert( obj.node.ocn == 1,
+ "Title OCN should be 1 not: " ~ obj.node.ocn.to!string); // bug introduced 0.18.1
+/
- obj.ocn = 1;
- obj.obj_cite_number = "1";
- obj.obj_cite_number_type = OCNtype.ocn;
+ obj.node.ocn = 1;
+ obj.node.obj_cite_number = "1";
+ obj.misc.obj_cite_number_type = OCNtype.ocn;
}
/+ dom structure (marked up & collapsed) +/
if ((opt_action.html)
@@ -2013,8 +2013,8 @@ foreach (ref obj; the_document_head_section) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2030,13 +2030,13 @@ if (the_table_of_contents_section["scroll"].length > 1) {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_table_of_contents_section["scroll"]) {
- if (obj.is_a == "heading") {
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.typeinfo.is_a == "heading") {
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2047,8 +2047,8 @@ if (the_table_of_contents_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2057,24 +2057,24 @@ if (the_table_of_contents_section["scroll"].length > 1) {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_table_of_contents_section["seg"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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]);
}
}
if ((opt_action.html)
|| (opt_action.html_scroll)
|| (opt_action.html_seg)
|| (opt_action.epub)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2089,20 +2089,20 @@ if (the_table_of_contents_section["scroll"].length > 1) {
/+ multiple 1~ levels, loop through document body +/
if (the_document_body_section.length > 1) {
foreach (ref obj; the_document_body_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.lev4_subtoc = lev4_subtoc[obj.segment_anchor_tag];
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2113,11 +2113,11 @@ if (the_document_body_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "para") {
+ } else if (obj.typeinfo.is_a == "para") {
_images ~= extract_images(obj.text);
obj = _image_dimensions(manifest_matter, obj);
}
@@ -2139,22 +2139,22 @@ if (the_endnotes_section.length > 1) {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_endnotes_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2165,8 +2165,8 @@ if (the_endnotes_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2183,22 +2183,22 @@ if (the_endnotes_section.length > 1) {
/+ optional only one 1~ level +/
if (the_glossary_section.length > 1) {
foreach (ref obj; the_glossary_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2209,14 +2209,14 @@ if (the_glossary_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "glossary") {
+ } else if (obj.typeinfo.is_a == "glossary") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
@@ -2231,22 +2231,22 @@ if (the_glossary_section.length > 1) {
/+ optional only one 1~ level +/
if (the_bibliography_section.length > 1) {
foreach (ref obj; the_bibliography_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string; // check
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string; // check
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2257,14 +2257,14 @@ if (the_bibliography_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bibliography") {
+ } else if (obj.typeinfo.is_a == "bibliography") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
@@ -2285,21 +2285,21 @@ if (the_bookindex_section["scroll"].length > 1) {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_bookindex_section["scroll"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2310,36 +2310,36 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
obj_cite_digits = ocn_emit(OCNstatus.bkidx);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.misc.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
+ obj.misc.obj_cite_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.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- obj.ocn = ++ocn_;
- obj.obj_cite_number = obj.ocn.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = ++ocn_;
+ obj.node.obj_cite_number = obj.node.ocn.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2350,14 +2350,14 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
ocn_bidx_ = ++ocn_bkidx_;
- obj.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.misc.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
+ obj.misc.obj_cite_number_type = OCNtype.bkidx;
}
}
/+ TODO assert failure, reinstate
@@ -2374,22 +2374,22 @@ if (the_bookindex_section["scroll"].length > 1) {
/+ optional only one 1~ level +/
if (the_blurb_section.length > 1) {
foreach (ref obj; the_blurb_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2400,14 +2400,14 @@ if (the_blurb_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "blurb") {
+ } else if (obj.typeinfo.is_a == "blurb") {
obj_cite_digits = ocn_emit(OCNstatus.off);
- obj.obj_cite_number_off = obj_cite_digits.off.to!string;
- obj.obj_cite_number_type = OCNtype.non;
+ obj.misc.obj_cite_number_off = obj_cite_digits.off.to!string;
+ obj.misc.obj_cite_number_type = OCNtype.non;
}
}
}
@@ -2420,30 +2420,30 @@ if (the_blurb_section.length > 1) {
/+ TODO
- note create/insert heading object sole purpose eof close all open tags
sort out:
- - obj.dom_markedup = dom_markedup;
- - obj.dom_collapsed = dom_collapsed;
+ - obj.node.dom_markedup = dom_markedup;
+ - obj.node.dom_collapsed = dom_collapsed;
+/
-comp_obj_heading_ = comp_obj_heading_.init;
-comp_obj_heading_.of_part = "empty";
-comp_obj_heading_.of_section = "empty";
-comp_obj_heading_.is_of = "para";
-comp_obj_heading_.is_a = "heading";
-comp_obj_heading_.ocn = 0;
-comp_obj_para.obj_cite_number = "";
-comp_obj_para.obj_cite_number_off = "";
-comp_obj_para.obj_cite_number_type = 0;
-comp_obj_heading_.segment_anchor_tag = "";
-comp_obj_heading_.marked_up_level = "";
-comp_obj_heading_.heading_lev_markup = 9;
-comp_obj_heading_.heading_lev_collapsed = 9;
-comp_obj_heading_.parent_ocn = 0;
-comp_obj_heading_.parent_lev_markup = 0;
-comp_obj_heading_.dom_markedup = dom_markedup.dup;
-comp_obj_heading_.dom_collapsed = dom_collapsed.dup;
+comp_obj_heading_ = comp_obj_heading_.init;
+comp_obj_heading_.typeinfo.of_part = "empty";
+comp_obj_heading_.typeinfo.of_section = "empty";
+comp_obj_heading_.typeinfo.is_of = "para";
+comp_obj_heading_.typeinfo.is_a = "heading";
+comp_obj_heading_.node.ocn = 0;
+comp_obj_para.node.obj_cite_number = "";
+comp_obj_para.misc.obj_cite_number_off = "";
+comp_obj_para.misc.obj_cite_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_ = 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);
-// the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
+// the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
#+END_SRC
** 4. _return document tuple_ :post:
@@ -2536,16 +2536,16 @@ destroy(the_blurb_section);
destroy(html_segnames);
destroy(bookindex_unordered_hashes);
destroy(an_object);
-biblio_arr_json = [];
-obj_cite_digits=ocn_emit(OCNstatus.reset);
-obj_cite_digit_=0;
-html_segnames_ptr=0;
-html_segnames_ptr_cntr=0;
-content_non_header = "8";
-dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+obj_cite_digits = ocn_emit(OCNstatus.reset);
+biblio_arr_json = [];
+obj_cite_digit_ = 0;
+html_segnames_ptr = 0;
+html_segnames_ptr_cntr = 0;
+content_non_header = "8";
+dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
#+END_SRC
*** [#A] _return document tuple_ :return:tuple:
@@ -3395,19 +3395,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
}
object_reset(an_object);
@@ -3453,19 +3453,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3496,19 +3496,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_cite_number_poem["end"] = obj_cite_digits.on.to!string;
object_reset(an_object);
@@ -3554,19 +3554,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3696,15 +3696,15 @@ void _table_closed_make_special_notation_table_(N,CMM)(
an_object["is"] = "table";
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.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_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;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3771,19 +3771,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "quote";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "quote";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["quote"] = TriState.off;
@@ -3821,19 +3821,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "group";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "group";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["group"] = TriState.off;
@@ -3870,19 +3870,19 @@ void _block_flag_line_empty_(B,N,CMM)(
= 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "block";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "block";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["block"] = TriState.off;
@@ -3914,20 +3914,20 @@ void _block_flag_line_empty_(B,N,CMM)(
heading_ptr-1,
an_object["is"]
);
- comp_obj_poem_ocn = comp_obj_poem_ocn.init;
- comp_obj_poem_ocn.of_part = "body";
- comp_obj_poem_ocn.of_section = "body";
- comp_obj_poem_ocn.is_of = "block";
- comp_obj_poem_ocn.is_a = "poem";
- comp_obj_poem_ocn.ocn = obj_cite_digits.on;
- comp_obj_poem_ocn.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
- comp_obj_poem_ocn.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
- comp_obj_poem_ocn.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
- comp_obj_poem_ocn.obj_cite_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;
- obj_type_status["poem"] = TriState.off;
+ comp_obj_poem_ocn = comp_obj_poem_ocn.init;
+ comp_obj_poem_ocn.typeinfo.of_part = "body";
+ comp_obj_poem_ocn.typeinfo.of_section = "body";
+ comp_obj_poem_ocn.typeinfo.is_of = "block";
+ comp_obj_poem_ocn.typeinfo.is_a = "poem";
+ comp_obj_poem_ocn.node.ocn = obj_cite_digits.on;
+ comp_obj_poem_ocn.node.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
+ comp_obj_poem_ocn.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_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;
+ obj_type_status["poem"] = TriState.off;
object_reset(an_object);
processing.remove("verse");
#+END_SRC
@@ -3961,19 +3961,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_code.of_section = "body";
- comp_obj_code.is_of = "block";
- comp_obj_code.is_a = "code";
- comp_obj_code.ocn = obj_cite_digits.on;
- comp_obj_code.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_code.typeinfo.of_part = "body";
+ comp_obj_code.typeinfo.of_section = "body";
+ comp_obj_code.typeinfo.is_of = "block";
+ comp_obj_code.typeinfo.is_a = "code";
+ comp_obj_code.node.ocn = obj_cite_digits.on;
+ comp_obj_code.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_code.text = an_object["substantive"];
- comp_obj_code.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_code.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_code.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_code;
obj_type_status["blocks"] = TriState.off;
obj_type_status["code"] = TriState.off;
@@ -4011,11 +4011,11 @@ void _block_flag_line_empty_(B,N,CMM)(
= 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.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
@@ -4526,20 +4526,20 @@ auto table_instructions(O,H)(
return ref H table_head,
) {
static auto rgx = Rgx();
- table_object.of_part = "body";
- table_object.of_section = "body";
- table_object.is_of = "block";
- table_object.is_a = "table";
- table_object.inline_notes_reg = false;
- table_object.inline_notes_star = false;
- table_object.inline_links = false;
+ table_object.typeinfo.of_part = "body";
+ table_object.typeinfo.of_section = "body";
+ table_object.typeinfo.is_of = "block";
+ table_object.typeinfo.is_a = "table";
+ table_object.has.inline_notes_reg = false;
+ table_object.has.inline_notes_star = false;
+ table_object.has.inline_links = false;
if (auto m = table_head.matchFirst(rgx.table_head_instructions)) {
- table_object.table_heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
- table_object.table_number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
+ table_object.table.heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
+ table_object.table.number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
foreach (cw; m["c_widths"].matchAll(rgx.table_col_widths)) {
auto x = cw.hit.matchFirst(rgx.table_col_widths_and_alignment);
- table_object.table_column_widths ~= x["width"].to!int;
- table_object.table_column_aligns ~= (x["align"].empty) ? "" : x["align"];
+ table_object.table.column_widths ~= x["width"].to!int;
+ table_object.table.column_aligns ~= (x["align"].empty) ? "" : x["align"];
}
}
return table_object;
@@ -4587,26 +4587,26 @@ auto table_array_munge(O,T)(
}
col_num_ = idx_c;
_table_substantive ~= col ~ mng.tc_s;
- if (idx_r == 0 && comp_obj_block.table_heading) {
+ if (idx_r == 0 && comp_obj_block.table.heading) {
} else if (col.match(rgx.numeric_col) && idx_r == 1) { // conditions reversed to avoid: gdc compiled program run segfault
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "r";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "r";
} else {
- comp_obj_block.table_column_aligns ~= "r";
+ comp_obj_block.table.column_aligns ~= "r";
}
} else if (idx_r == 1) {
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "l";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "l";
} else {
- comp_obj_block.table_column_aligns ~= "l";
+ comp_obj_block.table.column_aligns ~= "l";
}
}
}
@@ -4620,55 +4620,55 @@ auto table_array_munge(O,T)(
}
_table_substantive = _table_substantive.replaceFirst(rgx.table_col_separator_nl, "\n");
}
- if (comp_obj_block.table_number_of_columns != col_num) {
- if (comp_obj_block.table_number_of_columns == 0) {
- comp_obj_block.table_number_of_columns = (col_num).to!int;
+ if (comp_obj_block.table.number_of_columns != col_num) {
+ if (comp_obj_block.table.number_of_columns == 0) {
+ comp_obj_block.table.number_of_columns = (col_num).to!int;
} else {
debug(table_dev) {
- writeln(comp_obj_block.table_number_of_columns, " != ", col_num);
+ writeln(comp_obj_block.table.number_of_columns, " != ", col_num);
}
}
}
- if (table_object.table_number_of_columns == 0
- && table_object.table_column_widths.length > 0) {
+ if (table_object.table.number_of_columns == 0
+ && table_object.table.column_widths.length > 0) {
writeln(__LINE__, " ERROR");
}
- if (table_object.table_number_of_columns > 0
- && table_object.table_column_widths.length == 0) {
- double col_w = (100.00 / table_object.table_number_of_columns);
- foreach (i; 0..table_object.table_number_of_columns) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > 0
+ && table_object.table.column_widths.length == 0) {
+ double col_w = (100.00 / table_object.table.number_of_columns);
+ foreach (i; 0..table_object.table.number_of_columns) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns
- != table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns
+ != table_object.table.column_widths.length) {
debug(table_dev) {
writeln(m.hit); // further logic required
}
- if (table_object.table_number_of_columns > table_object.table_column_widths.length) {
- double col_w = (100.00 - (table_object.table_column_widths).sum)
- / (table_object.table_number_of_columns - table_object.table_column_widths.length);
- foreach (i; 0..table_object.table_column_widths.length) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > table_object.table.column_widths.length) {
+ double col_w = (100.00 - (table_object.table.column_widths).sum)
+ / (table_object.table.number_of_columns - table_object.table.column_widths.length);
+ foreach (i; 0..table_object.table.column_widths.length) {
+ table_object.table.column_widths ~= col_w;
}
- foreach (i; 0..(table_object.table_number_of_columns - table_object.table_column_widths.length)) {
- table_object.table_column_widths ~= col_w;
+ foreach (i; 0..(table_object.table.number_of_columns - table_object.table.column_widths.length)) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns < table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns < table_object.table.column_widths.length) {
writeln(__LINE__, " warning, ERROR");
}
}
- if (table_object.table_column_widths.sum > 101
- || table_object.table_column_widths.sum < 95 ) {
- writeln("sum: ", table_object.table_column_widths.sum,
- ", array: ", table_object.table_column_widths,
- ", cols: ", table_object.table_number_of_columns);
+ if (table_object.table.column_widths.sum > 101
+ || table_object.table.column_widths.sum < 95 ) {
+ writeln("sum: ", table_object.table.column_widths.sum,
+ ", array: ", table_object.table.column_widths,
+ ", cols: ", table_object.table.number_of_columns);
writeln(_table_substantive);
}
debug(table_res) {
- writeln("aligns: ", comp_obj_block.table_column_aligns, "\n",
- "no. of columns: ", comp_obj_block.table_number_of_columns, "\n",
- "col widths: ", comp_obj_block.table_column_widths,
- " sum: ", comp_obj_block.table_column_widths.sum, "\n",
+ writeln("aligns: ", comp_obj_block.table.column_aligns, "\n",
+ "no. of columns: ", comp_obj_block.table.number_of_columns, "\n",
+ "col widths: ", comp_obj_block.table.column_widths,
+ " sum: ", comp_obj_block.table.column_widths.sum, "\n",
_table_substantive);
}
comp_obj_block.text = _table_substantive;
@@ -5441,19 +5441,19 @@ static struct ObjInlineMarkup {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_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.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
} else {
indent=[
@@ -5461,32 +5461,32 @@ static struct ObjInlineMarkup {
"base_position" : 0,
];
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_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.inline_links = true;
+ 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.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.bullet = false;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_number_type = 0;
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
case 0:
indent=[
@@ -5495,10 +5495,10 @@ static struct ObjInlineMarkup {
];
toc_txt_ = "{ Table of Contents }" ~ mkup.mark_internal_site_lnk ~ "toc.fnSuffix";
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 1: .. case 3:
@@ -5511,10 +5511,10 @@ static struct ObjInlineMarkup {
heading_toc_,
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 4:
@@ -5531,10 +5531,10 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 5: .. case 7:
@@ -5560,10 +5560,10 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
default:
@@ -6108,16 +6108,16 @@ struct ObjAttributes {
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["obj_cite_number"] = _comp_obj_heading.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.heading_lev_collapsed;
+ oa_j.object["obj_cite_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["heading_ptr"]
- = _comp_obj_heading.ptr_heading;
+ = _comp_obj_heading.ptr.heading;
oa_j.object["doc_object_ptr"]
- = _comp_obj_heading.ptr_doc_object;
+ = _comp_obj_heading.ptr.doc_object;
}
- oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.parent_ocn;
- oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.parent_lev_markup;
+ oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.node.parent_ocn;
+ oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.node.parent_lev_markup;
_obj_attrib = oa_j.toString();
return _obj_attrib;
}
@@ -6330,46 +6330,46 @@ struct BookIndexReportSection {
&& 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Book Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_book_index";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Book Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bookindex";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.inline_links = false;
- comp_obj_heading_.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
import std.array : appender;
auto buffer = appender!(char[])();
@@ -6426,42 +6426,42 @@ struct BookIndexReportSection {
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.of_part = "backmatter";
- comp_obj_para.of_section = "bookindex";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bookindex";
- comp_obj_para.text = bi_tmp_scroll.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.anchor_tags = bi_tmp_tags;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = false;
- comp_obj_para.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.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bookindex";
+ comp_obj_para.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.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_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
auto t = tuple(bookindex_section, obj_cite_digits);
return t;
@@ -6496,12 +6496,12 @@ struct NotesSection {
int cntr,
)
in {
- assert((contents_am[cntr].is_a == "para")
- || (contents_am[cntr].is_a == "heading")
- || (contents_am[cntr].is_a == "quote")
- || (contents_am[cntr].is_a == "group")
- || (contents_am[cntr].is_a == "block")
- || (contents_am[cntr].is_a == "verse"));
+ 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(cntr >= previous_count);
previous_count=cntr;
assert(
@@ -6589,81 +6589,81 @@ struct NotesSection {
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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_endnotes";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "endnotes";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there are no Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
if (opt_action.backmatter && opt_action.section_endnotes) {
ObjGenericComposite comp_obj_endnote_;
- comp_obj_endnote_ = comp_obj_endnote_.init;
- comp_obj_endnote_.of_part = "backmatter";
- comp_obj_endnote_.of_section = "endnote";
- comp_obj_endnote_.is_of = "para";
- comp_obj_endnote_.is_a = "endnote";
- comp_obj_endnote_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_endnote_.indent_hang = 0;
- comp_obj_endnote_.indent_base = 0;
- comp_obj_endnote_.bullet = false;
+ comp_obj_endnote_ = comp_obj_endnote_.init;
+ comp_obj_endnote_.typeinfo.of_part = "backmatter";
+ comp_obj_endnote_.typeinfo.of_section = "endnote";
+ comp_obj_endnote_.typeinfo.is_of = "para";
+ comp_obj_endnote_.typeinfo.is_a = "endnote";
+ comp_obj_endnote_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.inline_links = true;
+ 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_;
}
@@ -6869,12 +6869,12 @@ struct NodeStructureMetadata {
p_["obj_cite_number"] = lv4;
}
ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.is_a = is_;
- comp_obj_location.ocn = obj_cite_digits.on;
- comp_obj_location.segment_anchor_tag = segment_anchor_tag.to!string;
- comp_obj_location.parent_ocn = p_["obj_cite_number"];
- comp_obj_location.parent_lev_markup = p_["lev_markup_number"];
+ 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_["obj_cite_number"];
+ comp_obj_location.node.parent_lev_markup = p_["lev_markup_number"];
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("x ", _node.to!string);
@@ -6882,9 +6882,9 @@ struct NodeStructureMetadata {
writeln("- ", _node.to!string);
}
}
- assert(comp_obj_location.parent_lev_markup >= 4);
- assert(comp_obj_location.parent_lev_markup <= 7);
- assert(comp_obj_location.parent_ocn >= 0);
+ 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);
return comp_obj_location;
}
invariant() {
@@ -7026,29 +7026,29 @@ struct NodeStructureMetadata {
break;
}
ObjGenericComposite _comp_obj_heading_;
- _comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.of_part = "body";
- _comp_obj_heading_.of_section = "body";
- _comp_obj_heading_.is_of = "para";
- _comp_obj_heading_.is_a = "heading";
- _comp_obj_heading_.text = _text.to!string.strip;
- _comp_obj_heading_.ocn = obj_cite_digits.on;
- _comp_obj_heading_.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- _comp_obj_heading_.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- _comp_obj_heading_.obj_cite_number_type = obj_cite_digits.type;
- _comp_obj_heading_.segment_anchor_tag = segment_anchor_tag.to!string;
- _comp_obj_heading_.marked_up_level = lev;
- _comp_obj_heading_.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.parent_ocn = p_["obj_cite_number"];
- _comp_obj_heading_.parent_lev_markup = p_["lev_markup_number"];
- _comp_obj_heading_.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);
- _comp_obj_heading_.ptr_heading = ptr_;
- _comp_obj_heading_.inline_notes_reg = flag_notes_reg;
- _comp_obj_heading_.inline_notes_star = flag_notes_star;
- _comp_obj_heading_.inline_links = flag_links;
+ _comp_obj_heading_ = _comp_obj_heading_.init;
+ _comp_obj_heading_.typeinfo.of_part = "body";
+ _comp_obj_heading_.typeinfo.of_section = "body";
+ _comp_obj_heading_.typeinfo.is_of = "para";
+ _comp_obj_heading_.typeinfo.is_a = "heading";
+ _comp_obj_heading_.text = _text.to!string.strip;
+ _comp_obj_heading_.node.ocn = obj_cite_digits.on;
+ _comp_obj_heading_.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ _comp_obj_heading_.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ _comp_obj_heading_.misc.obj_cite_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_["obj_cite_number"];
+ _comp_obj_heading_.node.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);
+ _comp_obj_heading_.ptr.heading = ptr_;
+ _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
+ _comp_obj_heading_.has.inline_notes_star = flag_notes_star;
+ _comp_obj_heading_.has.inline_links = flag_links;
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("* ", _node.to!string);
@@ -7059,34 +7059,34 @@ struct NodeStructureMetadata {
writeln("* ", _node.to!string);
}
}
- assert(_comp_obj_heading_.parent_lev_markup <= 7);
- assert(_comp_obj_heading_.parent_ocn >= 0);
+ assert(_comp_obj_heading_.node.parent_lev_markup <= 7);
+ assert(_comp_obj_heading_.node.parent_ocn >= 0);
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- assert(_comp_obj_heading_.heading_lev_markup <= 7);
- assert(_comp_obj_heading_.ocn >= 0);
- if (_comp_obj_heading_.parent_lev_markup > 0) {
- assert(_comp_obj_heading_.parent_lev_markup < _comp_obj_heading_.heading_lev_markup);
- if (_comp_obj_heading_.ocn != 0) {
- assert(_comp_obj_heading_.parent_ocn < _comp_obj_heading_.ocn);
+ 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);
}
}
- if (_comp_obj_heading_.heading_lev_markup == 0) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
- assert(_comp_obj_heading_.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_1);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_2);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_3);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
+ 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) {
}
}
return _comp_obj_heading_;
@@ -7361,73 +7361,81 @@ template ObjectSetter() {
#+END_SRC
** 1. initialize structs :struct:
-*** heading attribute
-
-#+name: meta_structs_init
-#+BEGIN_SRC d
-struct HeadingAttrib {
- string lev = "9";
- int heading_lev_markup = 9;
- int heading_lev_collapsed = 9;
- int[] closes_lev_collapsed = [];
- int[] closes_lev_markup = [];
- int array_ptr = 0;
- int heading_array_ptr_segments = 0;
-}
-#+END_SRC
-
*** [#A] _composite object_
#+name: meta_structs_init
#+BEGIN_SRC d
-struct ObjGenericComposite {
- // size_t id;
- string of_part = "";
- string of_section = "";
- string is_of = "";
- string is_a = "";
- string text = "";
- string obj_cite_number = "";
- string obj_cite_number_off = "";
- string obj_cite_number_bkidx = "";
- int obj_cite_number_type = 0;
- string[] anchor_tags = [];
+struct DocObj_TypeInfo_ {
+ string of_part = ""; // frontmatter, body, backmatter
+ string of_section = ""; // toc, body, glossary, biography, book index, blurb
+ string is_of = ""; // para, block ?
+ string is_a = ""; // heading, para, table, code block, group, ...
+}
+struct DocObj_TxtAttrib_ {
int indent_base = 0;
int indent_hang = 0;
bool bullet = false;
+ string language = ""; // not implemented, consider
+}
+struct DocObj_Has_ {
bool inline_links = false;
bool inline_notes_reg = false;
bool inline_notes_star = false;
bool contains_image_without_dimensions = false;
- string language = ""; // not implemented, consider
- string code_block_syntax = "";
- int table_number_of_columns = 0;
- double[] table_column_widths = [];
- string[] table_column_aligns = [];
- bool table_heading = false;
- bool table_walls = false; // not implemented
- int ocn = 0;
- string segment_anchor_tag = "";
- string segname_prev = "";
- string segname_next = "";
- int parent_lev_markup = 0;
- int parent_ocn = 0;
- int[] ancestors = [];
+}
+struct DocObj_Node_ {
+ string[string][string] node;
+ int ocn = 0; // duplicated as string with obj_cite_number
+ string obj_cite_number = ""; // duplicated as int with ocn may apply additional info for backmatter (glossary, biblio etc.)
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_ {
+ int number_of_columns = 0;
+ double[] column_widths = [];
+ string[] column_aligns = [];
+ bool heading = false;
+ bool walls = false; // not implemented
+}
+struct DocObj_CodeBlock_ {
+ string syntax = "";
+}
+struct DocObj_Pointer_ {
+ int doc_object = 0;
+ int html_segnames = 0;
+ int heading = 0;
+}
+struct DocObj_Tags_ {
string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string segment_anchor_tag = "";
+ string segname_prev = "";
+ string segname_next = "";
string[] lev4_subtoc = [];
- int heading_array_ptr = 0;
- int ptr_doc_object = 0;
- int ptr_html_segnames = 0;
- int ptr_heading = 0;
- int array_ptr = 0;
- int heading_array_ptr_segments = 0;
- string[string][string] node;
+ string[] anchor_tags = [];
+}
+struct DocObj_Misc_ {
+ string obj_cite_number_bkidx = "";
+ string obj_cite_number_off = "";
+ int obj_cite_number_type = 0; // { ocn, non, bkidx }
+}
+struct ObjGenericComposite {
+ string text = "";
+ DocObj_TypeInfo_ typeinfo;
+ 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;
}
#+END_SRC
diff --git a/org/meta_debugs.org b/org/meta_debugs.org
index e624181..5af5cc4 100644
--- a/org/meta_debugs.org
+++ b/org/meta_debugs.org
@@ -89,8 +89,8 @@ debug(parent) {
);
foreach (key; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[key]) {
- if (obj.of_part != "empty") {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.of_part != "empty") {
+ if (obj.typeinfo.is_a == "heading") {
writefln(
"%s node: %s heading: %s %s",
obj.obj_cite_number,
@@ -117,11 +117,11 @@ debug(dumpdoc) {
);
if (key.length > 0) {
foreach (obj; contents[key]) {
- if (obj.of_part != "empty") {
+ if (obj.typeinfo.of_part != "empty") {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -190,7 +190,7 @@ debug(checkdoc) {
foreach (obj; contents[key]) {
writefln(
"[%s]\n%s",
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -213,7 +213,7 @@ debug(checkdoc) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -234,7 +234,7 @@ debug(section_head) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -292,7 +292,7 @@ debug(section_body) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -308,7 +308,7 @@ debug(toc_nav_dom) {
enum DomTags { none, open, close, close_and_open, open_still, }
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
foreach_reverse (k; 0 .. 7) {
switch (obj.dom_markedup[k]) {
case DomTags.close :
@@ -335,7 +335,7 @@ debug(toc_nav_dom) {
writeln("--------------------");
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
foreach_reverse (k; 0 .. 7) {
switch (obj.dom_collapsed[k]) {
case DomTags.close :
@@ -394,7 +394,7 @@ debug(section_glossary) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -413,7 +413,7 @@ debug(section_bibliography) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -463,7 +463,7 @@ debug(blurb_section) {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -482,11 +482,11 @@ debug(objects) {
__LINE__,
);
foreach (obj; contents[key]) {
- if (obj.of_part != "empty") {
+ if (obj.typeinfo.of_part != "empty") {
writefln(
"* [%s][%s] %s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -666,7 +666,7 @@ debug(anchor) {
);
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[k]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
writefln(
"%s~ [%s] %s %s",
obj.marked_up_level,
@@ -688,7 +688,7 @@ debug(anchor) {
debug(heading) { // heading
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (o; contents[k]) {
- if (o.is_a == "heading") {
+ if (o.typeinfo.is_a == "heading") {
writefln(
"%s* %s\n (markup level: %s; collapsed level: %s)",
replicate(" ", o.heading_lev_markup),
@@ -714,7 +714,7 @@ debug(headings) {
);
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[k]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
writefln(
"%s~ [%s] %s",
obj.marked_up_level,
diff --git a/org/output_sqlite.org b/org/output_sqlite.org
index c7b6571..8348870 100644
--- a/org/output_sqlite.org
+++ b/org/output_sqlite.org
@@ -446,7 +446,7 @@ auto html_heading(O)(
string o = format(q"¶<p class="%s"><b>
%s
</b></p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt,
);
return o;
@@ -465,10 +465,10 @@ auto html_heading(O)(
o = format(q"¶<h%s class="%s">
%s
</h%s>¶",
- obj.heading_lev_markup,
- obj.is_a,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_a,
_txt,
- obj.heading_lev_markup,
+ obj.node.heading_lev_markup,
);
return o;
}
@@ -482,13 +482,13 @@ auto html_para(O)(
auto return ref const O obj,
) {
string _txt = munge_html(obj);
- _txt = (obj.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
+ _txt = (obj.attrib.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
string o = format(q"¶<p class="%s" indent="h%si%s">
%s
</p>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
_txt
);
return o;
@@ -506,7 +506,7 @@ auto html_quote(O)(
string o = format(q"¶<p class="%s">
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -524,7 +524,7 @@ auto html_group(O)(
string o = format(q"¶<p class="%s">
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -541,7 +541,7 @@ auto html_block(O)(
string _txt = munge_html(obj);
string o = format(q"¶
<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt.stripRight
);
return o;
@@ -557,7 +557,7 @@ auto html_verse(O)(
) {
string _txt = munge_html(obj);
string o = format(q"¶<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -573,7 +573,7 @@ auto html_code(O)(
) {
string _txt = html_special_characters_code(obj.text);
string o = format(q"¶<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -603,14 +603,14 @@ auto html_table(O)(
&& (_table_rows.length <= row_idx+2)) { // check row_idx+2 (rather than == ++row_idx)
_tablenote ~= cell;
} else {
- string _col_is = (row_idx == 0 && obj.table_heading) ? "th" : "td";
+ string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
string _align = ("style=\"text-align:"
- ~ ((obj.table_column_aligns[col_idx] == "l")
+ ~ ((obj.table.column_aligns[col_idx] == "l")
? "left\"" : "right\""));
_table ~= "<"
~ _col_is
~ " width=\""
- ~ obj.table_column_widths[col_idx].to!string
+ ~ obj.table.column_widths[col_idx].to!string
~ "%\" "
~ _align
~ ">";
@@ -638,7 +638,7 @@ auto html_table(O)(
</table>
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt,
_note
);
@@ -925,7 +925,7 @@ auto table(O)(
}
#+END_SRC
-** 4. loop, identify, load - loop template
+** 4. ↻ loop, identify, load - loop template
#+name: sqlite_objects_loop
#+BEGIN_SRC d
@@ -935,32 +935,32 @@ string doc_text;
string[] _insert_doc_objects;
foreach (part; doc_matters.xml.keys_seq.sql) {
foreach (obj; doc_abstraction[part]) {
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head", part);
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
obj_txt = format_and_sqlite_load.heading(obj);
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": // assert(part == "body", part); // TODO broken
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
debug (asserts) { // TODO consider and fix or remove
if (part != "body") {
@@ -974,13 +974,13 @@ foreach (part; doc_matters.xml.keys_seq.sql) {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
obj_txt = format_and_sqlite_load.quote(obj);
break;
@@ -1003,23 +1003,23 @@ foreach (part; doc_matters.xml.keys_seq.sql) {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail", part);
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
obj_txt = format_and_sqlite_load.heading(obj);
break;
@@ -1037,14 +1037,14 @@ foreach (part; doc_matters.xml.keys_seq.sql) {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -1053,28 +1053,28 @@ foreach (part; doc_matters.xml.keys_seq.sql) {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); // check where empty value could come from
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part); // check where empty value could come from
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from
}
break;
}
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
if ((doc_matters.opt.action.verbose)) {
writeln(
- "markup: ", obj.heading_lev_markup,
- "> ", obj.dom_markedup,
- "; collapsed: ", obj.heading_lev_collapsed,
- "> ", obj.dom_collapsed,
- "; ocn: ", obj.ocn,
- " node: ", obj.node,
- "; parent: ", obj.parent_lev_markup,
- "; ocn: ", obj.parent_ocn,
+ "markup: ", obj.node.heading_lev_markup,
+ "> ", obj.node.dom_markedup,
+ "; collapsed: ", obj.node.heading_lev_collapsed,
+ "> ", obj.node.dom_collapsed,
+ "; ocn: ", obj.node.ocn,
+ " node: ", obj.node.node,
+ "; parent: ", obj.node.parent_lev_markup,
+ "; ocn: ", obj.node.parent_ocn,
"; ",
);
}
}
- if (!(obj.is_a == "comment")) {
+ if (!(obj.typeinfo.is_a == "comment")) {
_insert_doc_objects ~= insertDocObjectsRow(obj);
}
} // loop closes
@@ -1302,12 +1302,12 @@ _insert_doc_objects_row = format(q"¶
#+BEGIN_SRC d
¶",
_metadata_tid,
- obj.ocn,
+ obj.node.ocn,
SQLinsertDelimiter!()(obj_txt["text"]),
SQLinsertDelimiter!()(obj_txt["html"]),
- obj.heading_lev_markup,
- obj.is_of,
- obj.is_a,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_of,
+ obj.typeinfo.is_a,
);
#+END_SRC
diff --git a/org/output_xmls.org b/org/output_xmls.org
index 7b86093..eb0e263 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -107,7 +107,7 @@ string special_characters(O)(
.replaceAll(rgx.xhtml_less_than, "&#60;")
.replaceAll(rgx.xhtml_greater_than, "&#62;")
.replaceAll(rgx.nbsp_char, " ");
- if (!(obj.is_a == "code")) {
+ if (!(obj.typeinfo.is_a == "code")) {
_txt = (_txt)
.replaceAll(rgx.xhtml_line_break, "<br />");
}
@@ -455,7 +455,7 @@ auto inline_links(O)(
string _suffix = ".html",
string _xml_type = "seg",
) {
- if (obj.inline_links) {
+ if (obj.has.inline_links) {
if ((_txt.match(rgx.mark_internal_site_lnk))
&& (_xml_type == "scroll")) { // conditions reversed to avoid: gdc compiled program run segfault
_txt = (_txt).replaceAll(
@@ -477,8 +477,8 @@ auto inline_links(O)(
if (_txt.match(rgx.inline_link)) {
writeln(__LINE__,
" (missed) markup link identified (",
- obj.inline_links,
- "): ", obj.is_a, ": ",
+ obj.has.inline_links,
+ "): ", obj.typeinfo.is_a, ": ",
obj.text
);
}
@@ -487,8 +487,8 @@ auto inline_links(O)(
if (_txt.match(rgx.inline_link)) {
writeln(__LINE__,
" (missed) markup link identified (",
- obj.inline_links,
- "): ", obj.is_a, ": ",
+ obj.has.inline_links,
+ "): ", obj.typeinfo.is_a, ": ",
obj.text
);
}
@@ -505,7 +505,7 @@ auto inline_notes_scroll(O)(
auto return ref const O obj,
string _txt,
) {
- if (obj.inline_notes_reg) {
+ if (obj.has.inline_notes_reg) {
_txt = font_face(_txt);
_txt = (_txt).replaceAll(
rgx.inline_notes_delimiter_al_regular_number_note,
@@ -514,12 +514,12 @@ auto inline_notes_scroll(O)(
}
debug(markup_endnotes) {
if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
- writeln(__LINE__, " (missed) markup endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
debug(markup) {
if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
- writeln(__LINE__, " (missed) markup endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
return _txt;
@@ -535,7 +535,7 @@ auto inline_notes_seg(O)(
string _txt,
) {
string[] _endnotes;
- if (obj.inline_notes_reg) {
+ if (obj.has.inline_notes_reg) {
_txt = font_face(_txt);
/+ need markup for text, and separated footnote +/
foreach(m; _txt.matchAll(rgx.inline_notes_delimiter_al_regular_number_note)) {
@@ -560,7 +560,7 @@ auto inline_notes_seg(O)(
);
} else if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
debug(markup) {
- writeln(__LINE__, " endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
auto t = tuple(
@@ -614,7 +614,7 @@ string lev4_heading_subtoc(O)(
) {
char[] lev4_subtoc;
lev4_subtoc ~= " <div class=\"nav\">\n";
- foreach (subtoc; obj.lev4_subtoc) {
+ foreach (subtoc; obj.tags.lev4_subtoc) {
if (auto m = subtoc.match(rgx.inline_link_subtoc)) {
auto indent = m.captures[1].to!string;
auto text = m.captures[2].to!string;
@@ -645,7 +645,7 @@ auto nav_pre_next_svg(O)(
auto return ref const O obj,
) {
string prev, next, toc;
- if (obj.segment_anchor_tag == "toc") {
+ if (obj.tags.segment_anchor_tag == "toc") {
toc = "";
prev = "";
} else {
@@ -658,7 +658,7 @@ auto nav_pre_next_svg(O)(
</a>¶",
);
}
- if (obj.segname_prev == "") {
+ if (obj.tags.segname_prev == "") {
prev = "";
} else {
prev = format(q"¶<a href="%s.html" target="_top">
@@ -668,10 +668,10 @@ auto nav_pre_next_svg(O)(
</svg>
</div>
</a>¶",
- obj.segname_prev,
+ obj.tags.segname_prev,
);
}
- if (obj.segname_next == "") {
+ if (obj.tags.segname_next == "") {
next = "";
} else {
next = format(q"¶<a href="%s.html" target="_top">
@@ -681,7 +681,7 @@ auto nav_pre_next_svg(O)(
</svg>
</div>
</a>¶",
- obj.segname_next,
+ obj.tags.segname_next,
);
}
string _toc_pre_next = format(q"¶ <div class="flex-menu-option">
@@ -730,15 +730,15 @@ auto heading(O)(
string _txt,
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
string _horizontal_rule = "<hr />";
if ((_xml_type != "html")
- || (obj.heading_lev_markup == 0 || obj.heading_lev_markup > 4)) {
+ || (obj.node.heading_lev_markup == 0 || obj.node.heading_lev_markup > 4)) {
_horizontal_rule = "";
}
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶%s
<div class="substance">
<h%s class="%s">%s
@@ -746,11 +746,11 @@ auto heading(O)(
</h%s>
</div>¶",
_horizontal_rule,
- obj.heading_lev_markup,
- obj.is_a,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_a,
tags,
_txt,
- obj.heading_lev_markup,
+ obj.node.heading_lev_markup,
);
} else {
o = format(q"¶%s
@@ -761,15 +761,15 @@ auto heading(O)(
</h%s>
</div>¶",
_horizontal_rule,
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.heading_lev_markup,
- obj.is_a,
- obj.obj_cite_number,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
tags,
_txt,
- obj.heading_lev_markup,
+ obj.node.heading_lev_markup,
);
}
return o;
@@ -785,7 +785,7 @@ auto heading_scroll(O)(
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = heading(obj, _txt);
return o;
@@ -823,19 +823,19 @@ auto para(O)(
auto return ref const O obj,
string _txt,
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = font_face(_txt);
string o;
- _txt = (obj.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
- if (obj.obj_cite_number.empty) {
+ _txt = (obj.attrib.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s" indent="h%si%s">%s
%s
</p>
</div>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
tags,
_txt
);
@@ -846,12 +846,12 @@ auto para(O)(
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
+ obj.node.obj_cite_number,
tags,
_txt
);
@@ -869,7 +869,7 @@ auto para_scroll(O)(
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = para(obj, _txt);
return o;
@@ -909,13 +909,13 @@ auto quote(O)(
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">
%s
</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -925,10 +925,10 @@ auto quote(O)(
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -945,7 +945,7 @@ auto quote_scroll(O)(
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = quote(obj, _txt);
return o;
@@ -985,13 +985,13 @@ auto group(O)(
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">
%s
</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -1001,10 +1001,10 @@ auto group(O)(
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -1022,7 +1022,7 @@ auto group_scroll(O)(
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = group(obj, _txt);
return o;
@@ -1062,11 +1062,11 @@ auto block(O)(
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt.stripRight
);
} else {
@@ -1074,10 +1074,10 @@ auto block(O)(
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt.stripRight
);
}
@@ -1095,7 +1095,7 @@ auto block_scroll(O)(
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = block(obj, _txt);
return o;
@@ -1135,11 +1135,11 @@ auto verse(O)(
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -1147,10 +1147,10 @@ auto verse(O)(
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -1168,7 +1168,7 @@ auto verse_scroll(O)(
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = verse(obj, _txt);
return o;
@@ -1206,11 +1206,11 @@ auto code(O)(
string _txt,
) {
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -1218,10 +1218,10 @@ auto code(O)(
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -1258,11 +1258,11 @@ auto tablarize(O)(
&& (_table_rows.length <= row_idx+2)) {
_tablenote ~= cell;
} else {
- string _col_is = (row_idx == 0 && obj.table_heading) ? "th" : "td";
+ string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
string _align = ("style=\"text-align:"
- ~ ((obj.table_column_aligns[col_idx] == "l")
+ ~ ((obj.table.column_aligns[col_idx] == "l")
? "left\"" : "right\""));
- _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table_column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
+ _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table.column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
_table ~= cell;
_table ~= "</" ~ _col_is ~ ">";
}
@@ -1285,7 +1285,7 @@ auto table(O)(
auto return ref const O obj,
string _txt,
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = font_face(_txt);
auto t = tablarize(obj, _txt);
_txt = t[0];
@@ -1300,10 +1300,10 @@ auto table(O)(
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
tags,
_txt,
_note
@@ -1324,9 +1324,9 @@ auto endnote(O)(
o = format(q"¶ <p class="%s" indent="h%si%s">
%s
</p>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
_txt
);
return o;
@@ -1349,7 +1349,7 @@ template outputHTML() {
#+END_SRC
** scroll :scroll:
-*** switch (sections & objects) format html output
+*** ↻ loop & switch (sections & objects) format html output
#+name: output_html_scroll
#+BEGIN_SRC d
@@ -1369,11 +1369,11 @@ void scroll(D,I)(
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_scroll");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -1382,22 +1382,22 @@ void scroll(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": assert(part == "body" || "head"); // surprise
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -1406,13 +1406,13 @@ void scroll(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
doc_html ~= xhtml_format.quote_scroll(obj, _txt);
break;
@@ -1435,23 +1435,23 @@ void scroll(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_scroll" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -1472,14 +1472,14 @@ void scroll(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -1488,8 +1488,8 @@ void scroll(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
@@ -1530,7 +1530,7 @@ void scroll_write_output(M,C)(
#+END_SRC
** seg :seg:
-*** switch (sections & objects) format html output
+*** ↻ loop & switch (sections & objects) format html output
#+name: output_html_seg
#+BEGIN_SRC d
@@ -1554,12 +1554,12 @@ void seg(D,M)(
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
top_level_headings[0] = "";
top_level_headings[1] = "";
@@ -1580,12 +1580,12 @@ void seg(D,M)(
goto default;
default:
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg");
- top_level_headings[obj.heading_lev_markup] = t[0];
+ top_level_headings[obj.node.heading_lev_markup] = t[0];
break;
}
break;
case 4:
- segment_filename = obj.segment_anchor_tag;
+ segment_filename = obj.tags.segment_anchor_tag;
doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg");
auto navigation_bar = xhtml_format.nav_pre_next_svg(obj);
doc_html[segment_filename] ~= navigation_bar.toc_pre_next; // navigation bar
@@ -1606,45 +1606,45 @@ void seg(D,M)(
break;
case 8: .. case 9:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
}
break;
}
} else {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_seg");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "toc":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "body": assert(part == "body");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "para":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
@@ -1652,13 +1652,13 @@ void seg(D,M)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
auto t = xhtml_format.quote_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
@@ -1690,23 +1690,23 @@ void seg(D,M)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "endnote": assert(part == "endnotes");
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0];
@@ -1733,14 +1733,14 @@ void seg(D,M)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -1749,7 +1749,7 @@ void seg(D,M)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
}
break;
}
@@ -2004,20 +2004,20 @@ string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) {
debug(epubmanifest) {
foreach (s; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[s]) {
- if (obj.is_a == "heading") {
- if (obj.heading_lev_markup == 4) {
+ if (obj.typeinfo.is_a == "heading") {
+ if (obj.node.heading_lev_markup == 4) {
writefln(
"%s~ [%s.xhtml] %s",
obj.marked_up_level,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
obj.text
);
- } else if (obj.heading_lev_markup > 4) {
+ } else if (obj.node.heading_lev_markup > 4) {
writefln(
"%s~ [%s.xhtml#%s] %s",
obj.marked_up_level,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
obj.text
);
}
@@ -2054,49 +2054,49 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {
);
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
foreach_reverse (n; 0 .. 7) {
string k = n.to!string;
- switch (obj.dom_collapsed[n]) {
+ switch (obj.node.dom_collapsed[n]) {
case DomTags.close :
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "</li>" ~ "\n";
toc ~= markup.indent_by_spaces_provided(n, " ") ~ "</ol>" ~ "\n";
break;
case DomTags.close_and_open :
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "</li>" ~ "\n";
- if (obj.heading_lev_markup < 4) {
+ if (obj.node.heading_lev_markup < 4) {
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ "\">"
~ _txt
~ "</a>" ~ "\n";
} else {
- string hashtag =(obj.heading_lev_markup == 4)
+ string hashtag =(obj.node.heading_lev_markup == 4)
? ""
- : ("#" ~ obj.ocn.to!string);
+ : ("#" ~ obj.node.ocn.to!string);
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
~ _txt
~ "</a>" ~ "\n";
}
break;
case DomTags.open :
toc ~= markup.indent_by_spaces_provided(n, " ") ~ "<ol>" ~ "\n";
- if (obj.heading_lev_markup < 4) {
+ if (obj.node.heading_lev_markup < 4) {
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ "\">"
~ _txt
~ "</a>" ~ "\n";
} else {
- string hashtag =(obj.heading_lev_markup == 4)
+ string hashtag =(obj.node.heading_lev_markup == 4)
? ""
- : ("#" ~ obj.ocn.to!string);
+ : ("#" ~ obj.node.ocn.to!string);
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
~ _txt
~ "</a>" ~ "\n";
}
@@ -2160,11 +2160,11 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
);
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
- string hashtag =(obj.heading_lev_markup <= 4) ? "" : ("#" ~ obj.ocn.to!string);
+ string hashtag =(obj.node.heading_lev_markup <= 4) ? "" : ("#" ~ obj.node.ocn.to!string);
foreach_reverse (k; 0 .. 7) {
- switch (obj.dom_markedup[k]) {
+ switch (obj.node.dom_markedup[k]) {
case DomTags.close :
toc ~= "\n </navPoint>";
break;
@@ -2179,7 +2179,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
<content src="%s.xhtml%s" />¶",
counter,
_txt,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
hashtag,
);
break;
@@ -2193,7 +2193,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
<content src="%s.xhtml%s" />¶",
counter,
_txt,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
hashtag,
);
break;
@@ -2211,7 +2211,7 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) {
#+END_SRC
** the document contents :seg:
-*** switch (sections & objects) format epub3 xhtml output
+*** ↻ loop & switch (sections & objects) format epub3 xhtml output
#+name: output_epub3_xhtml_seg
#+BEGIN_SRC d
@@ -2233,12 +2233,12 @@ void outputEPub3(D,I)(
foreach (part; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[part]) {
string _txt = xhtml_format.special_characters(obj, obj.text);
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
top_level_headings[0] = "";
top_level_headings[1] = "";
@@ -2258,16 +2258,16 @@ void outputEPub3(D,I)(
top_level_headings[3] = "";
goto default;
default:
- doc_parts_ ~= obj.segment_anchor_tag;
- doc_epub3[obj.segment_anchor_tag] ~= xhtml_format.epub3_seg_head(doc_matters);
+ doc_parts_ ~= obj.tags.segment_anchor_tag;
+ doc_epub3[obj.tags.segment_anchor_tag] ~= xhtml_format.epub3_seg_head(doc_matters);
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "epub");
- doc_epub3[obj.segment_anchor_tag] ~= t[0];
- doc_epub3_endnotes[obj.segment_anchor_tag] ~= t[1];
+ doc_epub3[obj.tags.segment_anchor_tag] ~= t[0];
+ doc_epub3_endnotes[obj.tags.segment_anchor_tag] ~= t[1];
break;
}
break;
case 4:
- segment_filename = obj.segment_anchor_tag;
+ segment_filename = obj.tags.segment_anchor_tag;
doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters);
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -2280,23 +2280,23 @@ void outputEPub3(D,I)(
break;
case 8: .. case 9:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
}
break;
}
} else {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_seg");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "toc":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -2304,22 +2304,22 @@ void outputEPub3(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": assert(part == "body");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "para":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -2327,13 +2327,13 @@ void outputEPub3(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
auto t = xhtml_format.quote_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0].to!string;
@@ -2365,23 +2365,23 @@ void outputEPub3(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "endnote": assert(part == "endnotes");
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -2408,14 +2408,14 @@ void outputEPub3(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -2424,53 +2424,53 @@ void outputEPub3(D,I)(
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
}
break;
}
}
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(obj.text.length > 0);
- if (obj.heading_lev_markup <= 4) {
+ if (obj.node.heading_lev_markup <= 4) {
oepbs_content_parts["manifest_documents"] ~=
format(q"¶ <item id="%s.xhtml" href="%s.xhtml" media-type="application/xhtml+xml" />
¶",
- obj.segment_anchor_tag,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
oepbs_content_parts["spine"] ~=
format(q"¶ <itemref idref="%s.xhtml" linear="yes" />
¶",
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
oepbs_content_parts["guide"] ~=
format(q"¶ <reference type="%s" href="%s" />
¶",
- obj.segment_anchor_tag,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
- } else if (obj.heading_lev_markup > 4) {
+ } else if (obj.node.heading_lev_markup > 4) {
oepbs_content_parts["manifest_documents"] ~=
format(q"¶ <item id="%s.xhtml#%s" href="%s.xhtml#%s" media-type="application/xhtml+xml" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
oepbs_content_parts["spine"] ~=
format(q"¶ <itemref idref="%s.xhtml#%s" linear="yes" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
oepbs_content_parts["guide"] ~=
format(q"¶ <reference type="%s#%s" href="%s#%s" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
}
}
diff --git a/org/sdp.org b/org/sdp.org
index 442fa7d..7a8d86d 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -26,7 +26,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 26, 2);
+enum ver = Version(0, 26, 3);
#+END_SRC
** compilation restrictions (supported compilers)
@@ -179,7 +179,6 @@ mixin CompileTimeInfo;
#+BEGIN_SRC d
mixin SiSUrgxInit;
mixin contentJSONtoSiSUstruct;
-mixin SiSUnode;
mixin SiSUbiblio;
mixin SiSUrgxInitFlags;
mixin outputHub;
@@ -947,18 +946,18 @@ string[string] check = [
];
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[k]) {
- if (obj.of_part != "empty") {
- if (!empty(obj.obj_cite_number)) {
+ if (obj.typeinfo.of_part != "empty") {
+ if (!empty(obj.node.obj_cite_number)) {
if (k == "body") {
- check["last_obj_cite_number_body"] = obj.obj_cite_number;
+ check["last_obj_cite_number_body"] = obj.node.obj_cite_number;
}
- if (!(obj.obj_cite_number.empty)) {
- check["last_obj_cite_number"] = obj.obj_cite_number;
+ if (!(obj.node.obj_cite_number.empty)) {
+ check["last_obj_cite_number"] = obj.node.obj_cite_number;
}
}
if (k == "bookindex_seg") {
- if (obj.obj_cite_number_type == 2) {
- check["last_obj_cite_number_bkidx"] = obj.obj_cite_number_bkidx;
+ if (obj.misc.obj_cite_number_type == 2) {
+ check["last_obj_cite_number_bkidx"] = obj.misc.obj_cite_number_bkidx;
}
}
}
diff --git a/src/sdp/meta/doc_debugs.d b/src/sdp/meta/doc_debugs.d
index 18f50ad..60ad63f 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.of_part != "empty") {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.of_part != "empty") {
+ if (obj.typeinfo.is_a == "heading") {
writefln(
"%s node: %s heading: %s %s",
obj.obj_cite_number,
@@ -61,11 +61,11 @@ template SiSUdebugs() {
);
if (key.length > 0) {
foreach (obj; contents[key]) {
- if (obj.of_part != "empty") {
+ if (obj.typeinfo.of_part != "empty") {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -79,7 +79,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -108,7 +108,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.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.is_a == "heading") {
+ if (obj.typeinfo.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.is_a == "heading") {
+ if (obj.typeinfo.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.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -198,7 +198,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -223,7 +223,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -236,11 +236,11 @@ template SiSUdebugs() {
__LINE__,
);
foreach (obj; contents[key]) {
- if (obj.of_part != "empty") {
+ if (obj.typeinfo.of_part != "empty") {
writefln(
"* [%s][%s] %s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -402,7 +402,7 @@ template SiSUdebugs() {
);
foreach (k; doc_matters.xml.keys_seq.seg) {
foreach (obj; contents[k]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.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.is_a == "heading") {
+ if (o.typeinfo.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.is_a == "heading") {
+ if (obj.typeinfo.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.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
@@ -644,7 +644,7 @@ template SiSUdebugs() {
writefln(
"[%s][%s]\n%s",
obj.obj_cite_number,
- obj.is_a,
+ obj.typeinfo.is_a,
obj.text
);
}
diff --git a/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d
index 4aaafce..8160010 100644
--- a/src/sdp/meta/metadoc.d
+++ b/src/sdp/meta/metadoc.d
@@ -21,7 +21,6 @@ template SiSUabstraction() {
sdp.output.paths_source;
mixin SiSUrgxInit;
mixin contentJSONtoSiSUstruct;
- mixin SiSUnode;
mixin SiSUbiblio;
mixin SiSUrgxInitFlags;
mixin outputHub;
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d
index 8fb22be..ba85b68 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.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
lv_ancestors_txt[0] = obj.text.to!string;
foreach(k; 1..8) {
@@ -133,7 +133,7 @@ template SiSUdocAbstraction() {
lv_ancestors_txt[7] = obj.text.to!string;
goto default;
default:
- obj.heading_ancestors_text = lv_ancestors_txt.dup;
+ obj.tags.heading_ancestors_text = lv_ancestors_txt.dup;
}
return obj;
}
@@ -178,7 +178,7 @@ template SiSUdocAbstraction() {
debug(dom_magic_numbers) {
writeln("marked up: ", lev, ": ", dom);
}
- obj.dom_markedup = dom.dup;
+ obj.node.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.dom_collapsed = dom.dup;
+ obj.node.dom_collapsed = dom.dup;
return obj;
}
static auto ocn_emit(int ocn_status_flag) {
@@ -323,29 +323,29 @@ 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_.of_part = "frontmatter";
- comp_obj_heading_.of_section = "toc";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Table of Contents";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "toc";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.ptr_html_segnames = html_segnames_ptr;
- comp_obj_heading_.anchor_tags = ["toc"];
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.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_.typeinfo.of_part = "frontmatter";
+ comp_obj_heading_.typeinfo.of_section = "toc";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Table of Contents";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
html_segnames_ptr_cntr++;
the_table_of_contents_section = [
"seg": [toc_head],
@@ -466,60 +466,60 @@ 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_glossary";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "glossary";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- comp_obj_heading_.anchor_tags = ["glossary"];
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} 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.of_part = "backmatter";
- comp_obj_para.of_section = "glossary";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "glossary";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "glossary";
+ comp_obj_para.typeinfo.is_of = "para";
+ comp_obj_para.typeinfo.is_a = "glossary";
comp_obj_para.text = line.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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;
@@ -577,80 +577,80 @@ 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_blurb";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["blurb"];
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else if (line.matchFirst(rgx.heading)
&& (opt_action.backmatter && opt_action.section_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = line.to!string;
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = an_object["lev"].to!string;
- comp_obj_heading_.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = line.to!string;
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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;
+ 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.of_part = "backmatter";
- comp_obj_para.of_section = "blurb";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "blurb";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "blurb";
+ comp_obj_para.typeinfo.is_of = "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.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.inline_links = true;
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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;
@@ -748,14 +748,14 @@ template SiSUdocAbstraction() {
debug(comment) {
writeln(line);
}
- an_object[an_object_key] ~= line ~= "\n";
- comp_obj_comment = comp_obj_comment.init;
- comp_obj_comment.of_part = "comment"; // breaks flow
- comp_obj_comment.of_section = "comment"; // breaks flow
- comp_obj_comment.is_of = "comment";
- comp_obj_comment.is_a = "comment";
- comp_obj_comment.text = an_object[an_object_key].strip;
- the_document_body_section ~= comp_obj_comment;
+ an_object[an_object_key] ~= line ~= "\n";
+ comp_obj_comment = comp_obj_comment.init;
+ comp_obj_comment.typeinfo.of_part = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.of_section = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.is_of = "comment";
+ comp_obj_comment.typeinfo.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);
processing.remove("verse");
++cntr;
@@ -953,26 +953,26 @@ 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];
anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "body";
- comp_obj_para.of_section = "body";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "para";
- comp_obj_para.text = an_object["substantive"].to!string.strip;
- comp_obj_para.ocn = obj_cite_digits.digit;
- comp_obj_para.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_para.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_para.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_para.obj_cite_number_type = obj_cite_digits.type;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- comp_obj_para.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_para.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_para.inline_links = substantive_obj_misc_tuple[sObj.links];
- comp_obj_para.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
- the_document_body_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "body";
+ comp_obj_para.typeinfo.of_section = "body";
+ comp_obj_para.typeinfo.is_of = "para";
+ comp_obj_para.typeinfo.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.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_para.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_para.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_para.misc.obj_cite_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;
+ comp_obj_para.tags.anchor_tags = anchor_tags;
+ comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ comp_obj_para.has.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
+ the_document_body_section ~= comp_obj_para;
_common_reset_(line_occur, an_object, obj_type_status);
indent=[
"hang_position" : 0,
@@ -989,23 +989,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].is_a == "para")
- || (the_document_body_section[$-1].is_a == "heading")
- || (the_document_body_section[$-1].is_a == "quote")
- || (the_document_body_section[$-1].is_a == "group")
- || (the_document_body_section[$-1].is_a == "block")
- || (the_document_body_section[$-1].is_a == "verse"))
+ 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"))
&& (the_document_body_section.length > previous_length)) {
- if ((the_document_body_section[$-1].is_a == "heading")
- && (the_document_body_section[$-1].heading_lev_markup < 5)) {
+ if ((the_document_body_section[$-1].typeinfo.is_a == "heading")
+ && (the_document_body_section[$-1].node.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].is_a == "verse") {
+ if (the_document_body_section[$-1].typeinfo.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].is_a == "verse") {
+ if (the_document_body_section[i].typeinfo.is_a == "verse") {
if ((the_document_body_section[i].text).match(
rgx.inline_notes_delimiter_al_regular_number_note
)) {
@@ -1052,22 +1052,22 @@ template SiSUdocAbstraction() {
}
}
if (an_object["glossary_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Glossary section";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else {
writeln("gloss");
}
@@ -1081,58 +1081,58 @@ 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_bibliography";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bibliography";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["bibliography"];
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
string out_;
foreach (entry; biblio_ordered) {
@@ -1150,21 +1150,21 @@ 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.of_part = "backmatter";
- comp_obj_para.of_section = "bibliography";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bibliography";
- comp_obj_para.text = out_.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- the_bibliography_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bibliography";
+ comp_obj_para.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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) {
@@ -1188,23 +1188,23 @@ template SiSUdocAbstraction() {
}
}
if (an_object["blurb_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Blurb section";
- comp_obj_heading_.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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_;
}
debug(blurb) {
foreach (blurb; the_blurb_section) {
@@ -1215,18 +1215,18 @@ template SiSUdocAbstraction() {
"hang_position" : 1,
"base_position" : 1,
];
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_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",
@@ -1237,7 +1237,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_glossary_section.length > 1) {
@@ -1250,7 +1250,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1259,7 +1259,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bibliography_section.length > 1){
@@ -1272,7 +1272,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
@@ -1282,7 +1282,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bookindex_section["seg"].length > 1) {
@@ -1295,7 +1295,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_bookindex_section["scroll"].length > 1) {
@@ -1306,7 +1306,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_blurb_section.length > 1) {
@@ -1319,7 +1319,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1327,7 +1327,7 @@ template SiSUdocAbstraction() {
"blurb", // _anchor_tag
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
comp_obj_toc.text = toc_txt_.to!string.strip;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
@@ -1338,7 +1338,7 @@ template SiSUdocAbstraction() {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["seg"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
debug(tocscroll) {
@@ -1348,7 +1348,7 @@ template SiSUdocAbstraction() {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["scroll"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
the_document_head_section ~= the_document_body_section[0];
@@ -1357,8 +1357,8 @@ template SiSUdocAbstraction() {
html_segnames ~= "endnotes";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_endnotes_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1368,8 +1368,8 @@ template SiSUdocAbstraction() {
html_segnames ~= "glossary";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_glossary_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1379,8 +1379,8 @@ template SiSUdocAbstraction() {
html_segnames ~= "bibliography";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bibliography_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1390,14 +1390,14 @@ template SiSUdocAbstraction() {
html_segnames ~= "bookindex";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bookindex_section["scroll"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
foreach (ref section; the_bookindex_section["seg"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1407,8 +1407,8 @@ template SiSUdocAbstraction() {
html_segnames ~= "blurb";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_blurb_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1424,7 +1424,7 @@ template SiSUdocAbstraction() {
}
string[] segnames_0_4;
auto _image_dimensions(M,O)(M manifest_matter, O obj) {
- if (obj.contains_image_without_dimensions) {
+ if (obj.has.contains_image_without_dimensions) {
import std.math;
import imageformats;
int w, h, chans;
@@ -1458,21 +1458,21 @@ template SiSUdocAbstraction() {
return obj;
}
foreach (ref obj; the_document_head_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
}
- if (obj.heading_lev_markup == 0) {
+ if (obj.node.heading_lev_markup == 0) {
/+ TODO second hit (of two) with same assertion failure, check, fix and reinstate
- assert( obj.ocn == 1,
- "Title OCN should be 1 not: " ~ obj.ocn.to!string); // bug introduced 0.18.1
+ assert( obj.node.ocn == 1,
+ "Title OCN should be 1 not: " ~ obj.node.ocn.to!string); // bug introduced 0.18.1
+/
- obj.ocn = 1;
- obj.obj_cite_number = "1";
- obj.obj_cite_number_type = OCNtype.ocn;
+ obj.node.ocn = 1;
+ obj.node.obj_cite_number = "1";
+ obj.misc.obj_cite_number_type = OCNtype.ocn;
}
/+ dom structure (marked up & collapsed) +/
if ((opt_action.html)
@@ -1482,8 +1482,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1493,13 +1493,13 @@ 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.is_a == "heading") {
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.typeinfo.is_a == "heading") {
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1510,8 +1510,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1520,24 +1520,24 @@ 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.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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]);
}
}
if ((opt_action.html)
|| (opt_action.html_scroll)
|| (opt_action.html_seg)
|| (opt_action.epub)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1546,20 +1546,20 @@ 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.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.lev4_subtoc = lev4_subtoc[obj.segment_anchor_tag];
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1570,11 +1570,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "para") {
+ } else if (obj.typeinfo.is_a == "para") {
_images ~= extract_images(obj.text);
obj = _image_dimensions(manifest_matter, obj);
}
@@ -1588,22 +1588,22 @@ template SiSUdocAbstraction() {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_endnotes_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1614,8 +1614,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -1624,22 +1624,22 @@ template SiSUdocAbstraction() {
/+ optional only one 1~ level +/
if (the_glossary_section.length > 1) {
foreach (ref obj; the_glossary_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1650,36 +1650,36 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "glossary") {
+ } else if (obj.typeinfo.is_a == "glossary") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
/+ optional only one 1~ level +/
if (the_bibliography_section.length > 1) {
foreach (ref obj; the_bibliography_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string; // check
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string; // check
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1690,14 +1690,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bibliography") {
+ } else if (obj.typeinfo.is_a == "bibliography") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
@@ -1710,21 +1710,21 @@ template SiSUdocAbstraction() {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_bookindex_section["scroll"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1735,36 +1735,36 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
obj_cite_digits = ocn_emit(OCNstatus.bkidx);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.misc.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
+ obj.misc.obj_cite_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.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- obj.ocn = ++ocn_;
- obj.obj_cite_number = obj.ocn.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = ++ocn_;
+ obj.node.obj_cite_number = obj.node.ocn.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1775,14 +1775,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.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
ocn_bidx_ = ++ocn_bkidx_;
- obj.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.misc.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
+ obj.misc.obj_cite_number_type = OCNtype.bkidx;
}
}
/+ TODO assert failure, reinstate
@@ -1793,22 +1793,22 @@ template SiSUdocAbstraction() {
/+ optional only one 1~ level +/
if (the_blurb_section.length > 1) {
foreach (ref obj; the_blurb_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.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];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -1819,44 +1819,44 @@ template SiSUdocAbstraction() {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ 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_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "blurb") {
+ } else if (obj.typeinfo.is_a == "blurb") {
obj_cite_digits = ocn_emit(OCNstatus.off);
- obj.obj_cite_number_off = obj_cite_digits.off.to!string;
- obj.obj_cite_number_type = OCNtype.non;
+ obj.misc.obj_cite_number_off = obj_cite_digits.off.to!string;
+ obj.misc.obj_cite_number_type = OCNtype.non;
}
}
}
/+ TODO
- note create/insert heading object sole purpose eof close all open tags
sort out:
- - obj.dom_markedup = dom_markedup;
- - obj.dom_collapsed = dom_collapsed;
+ - obj.node.dom_markedup = dom_markedup;
+ - obj.node.dom_collapsed = dom_collapsed;
+/
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "";
- comp_obj_heading_.marked_up_level = "";
- comp_obj_heading_.heading_lev_markup = 9;
- comp_obj_heading_.heading_lev_collapsed = 9;
- comp_obj_heading_.parent_ocn = 0;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = dom_markedup.dup;
- comp_obj_heading_.dom_collapsed = dom_collapsed.dup;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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_ = 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);
- // the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
+ // the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
auto document_the = [
"head": the_document_head_section,
"toc_seg": the_table_of_contents_section["seg"],
@@ -1924,16 +1924,16 @@ template SiSUdocAbstraction() {
destroy(html_segnames);
destroy(bookindex_unordered_hashes);
destroy(an_object);
- biblio_arr_json = [];
- obj_cite_digits=ocn_emit(OCNstatus.reset);
- obj_cite_digit_=0;
- html_segnames_ptr=0;
- html_segnames_ptr_cntr=0;
- content_non_header = "8";
- dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ obj_cite_digits = ocn_emit(OCNstatus.reset);
+ biblio_arr_json = [];
+ obj_cite_digit_ = 0;
+ html_segnames_ptr = 0;
+ html_segnames_ptr_cntr = 0;
+ content_non_header = "8";
+ dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
auto t = tuple(
document_the,
sequenced_document_keys,
@@ -2414,19 +2414,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
}
object_reset(an_object);
@@ -2472,19 +2472,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -2515,19 +2515,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_cite_number_poem["end"] = obj_cite_digits.on.to!string;
object_reset(an_object);
@@ -2573,19 +2573,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "verse";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -2872,15 +2872,15 @@ template SiSUdocAbstraction() {
an_object["is"] = "table";
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.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_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;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -2933,19 +2933,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "quote";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "quote";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["quote"] = TriState.off;
@@ -2977,19 +2977,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "group";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "group";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["group"] = TriState.off;
@@ -3020,19 +3020,19 @@ 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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "block";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ comp_obj_block.typeinfo.of_part = "body";
+ comp_obj_block.typeinfo.of_section = "body";
+ comp_obj_block.typeinfo.is_of = "block";
+ comp_obj_block.typeinfo.is_a = "block";
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_type_status["blocks"] = TriState.off;
obj_type_status["block"] = TriState.off;
@@ -3058,20 +3058,20 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- comp_obj_poem_ocn = comp_obj_poem_ocn.init;
- comp_obj_poem_ocn.of_part = "body";
- comp_obj_poem_ocn.of_section = "body";
- comp_obj_poem_ocn.is_of = "block";
- comp_obj_poem_ocn.is_a = "poem";
- comp_obj_poem_ocn.ocn = obj_cite_digits.on;
- comp_obj_poem_ocn.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
- comp_obj_poem_ocn.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
- comp_obj_poem_ocn.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
- comp_obj_poem_ocn.obj_cite_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;
- obj_type_status["poem"] = TriState.off;
+ comp_obj_poem_ocn = comp_obj_poem_ocn.init;
+ comp_obj_poem_ocn.typeinfo.of_part = "body";
+ comp_obj_poem_ocn.typeinfo.of_section = "body";
+ comp_obj_poem_ocn.typeinfo.is_of = "block";
+ comp_obj_poem_ocn.typeinfo.is_a = "poem";
+ comp_obj_poem_ocn.node.ocn = obj_cite_digits.on;
+ comp_obj_poem_ocn.node.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
+ comp_obj_poem_ocn.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_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;
+ obj_type_status["poem"] = TriState.off;
object_reset(an_object);
processing.remove("verse");
} else if (obj_type_status["code"] == TriState.closing) {
@@ -3099,19 +3099,19 @@ 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.of_part = "body";
- comp_obj_code.of_section = "body";
- comp_obj_code.is_of = "block";
- comp_obj_code.is_a = "code";
- comp_obj_code.ocn = obj_cite_digits.on;
- comp_obj_code.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_code.typeinfo.of_part = "body";
+ comp_obj_code.typeinfo.of_section = "body";
+ comp_obj_code.typeinfo.is_of = "block";
+ comp_obj_code.typeinfo.is_a = "code";
+ comp_obj_code.node.ocn = obj_cite_digits.on;
+ comp_obj_code.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_code.text = an_object["substantive"];
- comp_obj_code.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_code.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_code.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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];
+ comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_code;
obj_type_status["blocks"] = TriState.off;
obj_type_status["code"] = TriState.off;
@@ -3143,11 +3143,11 @@ 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.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
@@ -3600,20 +3600,20 @@ template SiSUdocAbstraction() {
return ref H table_head,
) {
static auto rgx = Rgx();
- table_object.of_part = "body";
- table_object.of_section = "body";
- table_object.is_of = "block";
- table_object.is_a = "table";
- table_object.inline_notes_reg = false;
- table_object.inline_notes_star = false;
- table_object.inline_links = false;
+ table_object.typeinfo.of_part = "body";
+ table_object.typeinfo.of_section = "body";
+ table_object.typeinfo.is_of = "block";
+ table_object.typeinfo.is_a = "table";
+ table_object.has.inline_notes_reg = false;
+ table_object.has.inline_notes_star = false;
+ table_object.has.inline_links = false;
if (auto m = table_head.matchFirst(rgx.table_head_instructions)) {
- table_object.table_heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
- table_object.table_number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
+ table_object.table.heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
+ table_object.table.number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
foreach (cw; m["c_widths"].matchAll(rgx.table_col_widths)) {
auto x = cw.hit.matchFirst(rgx.table_col_widths_and_alignment);
- table_object.table_column_widths ~= x["width"].to!int;
- table_object.table_column_aligns ~= (x["align"].empty) ? "" : x["align"];
+ table_object.table.column_widths ~= x["width"].to!int;
+ table_object.table.column_aligns ~= (x["align"].empty) ? "" : x["align"];
}
}
return table_object;
@@ -3655,26 +3655,26 @@ template SiSUdocAbstraction() {
}
col_num_ = idx_c;
_table_substantive ~= col ~ mng.tc_s;
- if (idx_r == 0 && comp_obj_block.table_heading) {
+ if (idx_r == 0 && comp_obj_block.table.heading) {
} else if (col.match(rgx.numeric_col) && idx_r == 1) { // conditions reversed to avoid: gdc compiled program run segfault
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "r";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "r";
} else {
- comp_obj_block.table_column_aligns ~= "r";
+ comp_obj_block.table.column_aligns ~= "r";
}
} else if (idx_r == 1) {
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "l";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "l";
} else {
- comp_obj_block.table_column_aligns ~= "l";
+ comp_obj_block.table.column_aligns ~= "l";
}
}
}
@@ -3688,55 +3688,55 @@ template SiSUdocAbstraction() {
}
_table_substantive = _table_substantive.replaceFirst(rgx.table_col_separator_nl, "\n");
}
- if (comp_obj_block.table_number_of_columns != col_num) {
- if (comp_obj_block.table_number_of_columns == 0) {
- comp_obj_block.table_number_of_columns = (col_num).to!int;
+ if (comp_obj_block.table.number_of_columns != col_num) {
+ if (comp_obj_block.table.number_of_columns == 0) {
+ comp_obj_block.table.number_of_columns = (col_num).to!int;
} else {
debug(table_dev) {
- writeln(comp_obj_block.table_number_of_columns, " != ", col_num);
+ writeln(comp_obj_block.table.number_of_columns, " != ", col_num);
}
}
}
- if (table_object.table_number_of_columns == 0
- && table_object.table_column_widths.length > 0) {
+ if (table_object.table.number_of_columns == 0
+ && table_object.table.column_widths.length > 0) {
writeln(__LINE__, " ERROR");
}
- if (table_object.table_number_of_columns > 0
- && table_object.table_column_widths.length == 0) {
- double col_w = (100.00 / table_object.table_number_of_columns);
- foreach (i; 0..table_object.table_number_of_columns) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > 0
+ && table_object.table.column_widths.length == 0) {
+ double col_w = (100.00 / table_object.table.number_of_columns);
+ foreach (i; 0..table_object.table.number_of_columns) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns
- != table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns
+ != table_object.table.column_widths.length) {
debug(table_dev) {
writeln(m.hit); // further logic required
}
- if (table_object.table_number_of_columns > table_object.table_column_widths.length) {
- double col_w = (100.00 - (table_object.table_column_widths).sum)
- / (table_object.table_number_of_columns - table_object.table_column_widths.length);
- foreach (i; 0..table_object.table_column_widths.length) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > table_object.table.column_widths.length) {
+ double col_w = (100.00 - (table_object.table.column_widths).sum)
+ / (table_object.table.number_of_columns - table_object.table.column_widths.length);
+ foreach (i; 0..table_object.table.column_widths.length) {
+ table_object.table.column_widths ~= col_w;
}
- foreach (i; 0..(table_object.table_number_of_columns - table_object.table_column_widths.length)) {
- table_object.table_column_widths ~= col_w;
+ foreach (i; 0..(table_object.table.number_of_columns - table_object.table.column_widths.length)) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns < table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns < table_object.table.column_widths.length) {
writeln(__LINE__, " warning, ERROR");
}
}
- if (table_object.table_column_widths.sum > 101
- || table_object.table_column_widths.sum < 95 ) {
- writeln("sum: ", table_object.table_column_widths.sum,
- ", array: ", table_object.table_column_widths,
- ", cols: ", table_object.table_number_of_columns);
+ if (table_object.table.column_widths.sum > 101
+ || table_object.table.column_widths.sum < 95 ) {
+ writeln("sum: ", table_object.table.column_widths.sum,
+ ", array: ", table_object.table.column_widths,
+ ", cols: ", table_object.table.number_of_columns);
writeln(_table_substantive);
}
debug(table_res) {
- writeln("aligns: ", comp_obj_block.table_column_aligns, "\n",
- "no. of columns: ", comp_obj_block.table_number_of_columns, "\n",
- "col widths: ", comp_obj_block.table_column_widths,
- " sum: ", comp_obj_block.table_column_widths.sum, "\n",
+ writeln("aligns: ", comp_obj_block.table.column_aligns, "\n",
+ "no. of columns: ", comp_obj_block.table.number_of_columns, "\n",
+ "col widths: ", comp_obj_block.table.column_widths,
+ " sum: ", comp_obj_block.table.column_widths.sum, "\n",
_table_substantive);
}
comp_obj_block.text = _table_substantive;
@@ -4340,19 +4340,19 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_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.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
} else {
indent=[
@@ -4360,32 +4360,32 @@ template SiSUdocAbstraction() {
"base_position" : 0,
];
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_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.inline_links = true;
+ 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.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.bullet = false;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ comp_obj_toc.typeinfo.of_section = "toc";
+ comp_obj_toc.typeinfo.is_of = "para";
+ comp_obj_toc.typeinfo.is_a = "toc";
+ comp_obj_toc.node.ocn = 0;
+ comp_obj_toc.node.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_number_type = 0;
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
case 0:
indent=[
@@ -4394,10 +4394,10 @@ template SiSUdocAbstraction() {
];
toc_txt_ = "{ Table of Contents }" ~ mkup.mark_internal_site_lnk ~ "toc.fnSuffix";
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 1: .. case 3:
@@ -4410,10 +4410,10 @@ template SiSUdocAbstraction() {
heading_toc_,
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 4:
@@ -4430,10 +4430,10 @@ template SiSUdocAbstraction() {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 5: .. case 7:
@@ -4459,10 +4459,10 @@ template SiSUdocAbstraction() {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
default:
@@ -4893,16 +4893,16 @@ template SiSUdocAbstraction() {
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["obj_cite_number"] = _comp_obj_heading.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.heading_lev_collapsed;
+ oa_j.object["obj_cite_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["heading_ptr"]
- = _comp_obj_heading.ptr_heading;
+ = _comp_obj_heading.ptr.heading;
oa_j.object["doc_object_ptr"]
- = _comp_obj_heading.ptr_doc_object;
+ = _comp_obj_heading.ptr.doc_object;
}
- oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.parent_ocn;
- oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.parent_lev_markup;
+ oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.node.parent_ocn;
+ oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.node.parent_lev_markup;
_obj_attrib = oa_j.toString();
return _obj_attrib;
}
@@ -5078,46 +5078,46 @@ 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Book Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_book_index";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Book Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bookindex";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.inline_links = false;
- comp_obj_heading_.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_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
import std.array : appender;
auto buffer = appender!(char[])();
@@ -5174,42 +5174,42 @@ 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.of_part = "backmatter";
- comp_obj_para.of_section = "bookindex";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bookindex";
- comp_obj_para.text = bi_tmp_scroll.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.anchor_tags = bi_tmp_tags;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = false;
- comp_obj_para.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.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bookindex";
+ comp_obj_para.typeinfo.is_of = "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.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_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_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.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_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
auto t = tuple(bookindex_section, obj_cite_digits);
return t;
@@ -5227,12 +5227,12 @@ template SiSUdocAbstraction() {
int cntr,
)
in {
- assert((contents_am[cntr].is_a == "para")
- || (contents_am[cntr].is_a == "heading")
- || (contents_am[cntr].is_a == "quote")
- || (contents_am[cntr].is_a == "group")
- || (contents_am[cntr].is_a == "block")
- || (contents_am[cntr].is_a == "verse"));
+ 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(cntr >= previous_count);
previous_count=cntr;
assert(
@@ -5308,81 +5308,81 @@ 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_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_endnotes";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "endnotes";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
++mkn;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there are no Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "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_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_;
}
if (opt_action.backmatter && opt_action.section_endnotes) {
ObjGenericComposite comp_obj_endnote_;
- comp_obj_endnote_ = comp_obj_endnote_.init;
- comp_obj_endnote_.of_part = "backmatter";
- comp_obj_endnote_.of_section = "endnote";
- comp_obj_endnote_.is_of = "para";
- comp_obj_endnote_.is_a = "endnote";
- comp_obj_endnote_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_endnote_.indent_hang = 0;
- comp_obj_endnote_.indent_base = 0;
- comp_obj_endnote_.bullet = false;
+ comp_obj_endnote_ = comp_obj_endnote_.init;
+ comp_obj_endnote_.typeinfo.of_part = "backmatter";
+ comp_obj_endnote_.typeinfo.of_section = "endnote";
+ comp_obj_endnote_.typeinfo.is_of = "para";
+ comp_obj_endnote_.typeinfo.is_a = "endnote";
+ comp_obj_endnote_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_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_.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.inline_links = true;
+ 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_;
}
@@ -5534,12 +5534,12 @@ template SiSUdocAbstraction() {
p_["obj_cite_number"] = lv4;
}
ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.is_a = is_;
- comp_obj_location.ocn = obj_cite_digits.on;
- comp_obj_location.segment_anchor_tag = segment_anchor_tag.to!string;
- comp_obj_location.parent_ocn = p_["obj_cite_number"];
- comp_obj_location.parent_lev_markup = p_["lev_markup_number"];
+ 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_["obj_cite_number"];
+ comp_obj_location.node.parent_lev_markup = p_["lev_markup_number"];
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("x ", _node.to!string);
@@ -5547,9 +5547,9 @@ template SiSUdocAbstraction() {
writeln("- ", _node.to!string);
}
}
- assert(comp_obj_location.parent_lev_markup >= 4);
- assert(comp_obj_location.parent_lev_markup <= 7);
- assert(comp_obj_location.parent_ocn >= 0);
+ 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);
return comp_obj_location;
}
invariant() {
@@ -5685,29 +5685,29 @@ template SiSUdocAbstraction() {
break;
}
ObjGenericComposite _comp_obj_heading_;
- _comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.of_part = "body";
- _comp_obj_heading_.of_section = "body";
- _comp_obj_heading_.is_of = "para";
- _comp_obj_heading_.is_a = "heading";
- _comp_obj_heading_.text = _text.to!string.strip;
- _comp_obj_heading_.ocn = obj_cite_digits.on;
- _comp_obj_heading_.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- _comp_obj_heading_.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- _comp_obj_heading_.obj_cite_number_type = obj_cite_digits.type;
- _comp_obj_heading_.segment_anchor_tag = segment_anchor_tag.to!string;
- _comp_obj_heading_.marked_up_level = lev;
- _comp_obj_heading_.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.parent_ocn = p_["obj_cite_number"];
- _comp_obj_heading_.parent_lev_markup = p_["lev_markup_number"];
- _comp_obj_heading_.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);
- _comp_obj_heading_.ptr_heading = ptr_;
- _comp_obj_heading_.inline_notes_reg = flag_notes_reg;
- _comp_obj_heading_.inline_notes_star = flag_notes_star;
- _comp_obj_heading_.inline_links = flag_links;
+ _comp_obj_heading_ = _comp_obj_heading_.init;
+ _comp_obj_heading_.typeinfo.of_part = "body";
+ _comp_obj_heading_.typeinfo.of_section = "body";
+ _comp_obj_heading_.typeinfo.is_of = "para";
+ _comp_obj_heading_.typeinfo.is_a = "heading";
+ _comp_obj_heading_.text = _text.to!string.strip;
+ _comp_obj_heading_.node.ocn = obj_cite_digits.on;
+ _comp_obj_heading_.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ _comp_obj_heading_.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ _comp_obj_heading_.misc.obj_cite_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_["obj_cite_number"];
+ _comp_obj_heading_.node.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);
+ _comp_obj_heading_.ptr.heading = ptr_;
+ _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
+ _comp_obj_heading_.has.inline_notes_star = flag_notes_star;
+ _comp_obj_heading_.has.inline_links = flag_links;
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("* ", _node.to!string);
@@ -5718,34 +5718,34 @@ template SiSUdocAbstraction() {
writeln("* ", _node.to!string);
}
}
- assert(_comp_obj_heading_.parent_lev_markup <= 7);
- assert(_comp_obj_heading_.parent_ocn >= 0);
+ assert(_comp_obj_heading_.node.parent_lev_markup <= 7);
+ assert(_comp_obj_heading_.node.parent_ocn >= 0);
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- assert(_comp_obj_heading_.heading_lev_markup <= 7);
- assert(_comp_obj_heading_.ocn >= 0);
- if (_comp_obj_heading_.parent_lev_markup > 0) {
- assert(_comp_obj_heading_.parent_lev_markup < _comp_obj_heading_.heading_lev_markup);
- if (_comp_obj_heading_.ocn != 0) {
- assert(_comp_obj_heading_.parent_ocn < _comp_obj_heading_.ocn);
+ 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);
}
}
- if (_comp_obj_heading_.heading_lev_markup == 0) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
- assert(_comp_obj_heading_.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_1);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_2);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_3);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
+ 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) {
}
}
return _comp_obj_heading_;
diff --git a/src/sdp/meta/metadoc_summary.d b/src/sdp/meta/metadoc_summary.d
index 7db1b23..0566ff5 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.of_part != "empty") {
- if (!empty(obj.obj_cite_number)) {
+ if (obj.typeinfo.of_part != "empty") {
+ if (!empty(obj.node.obj_cite_number)) {
if (k == "body") {
- check["last_obj_cite_number_body"] = obj.obj_cite_number;
+ check["last_obj_cite_number_body"] = obj.node.obj_cite_number;
}
- if (!(obj.obj_cite_number.empty)) {
- check["last_obj_cite_number"] = obj.obj_cite_number;
+ if (!(obj.node.obj_cite_number.empty)) {
+ check["last_obj_cite_number"] = obj.node.obj_cite_number;
}
}
if (k == "bookindex_seg") {
- if (obj.obj_cite_number_type == 2) {
- check["last_obj_cite_number_bkidx"] = obj.obj_cite_number_bkidx;
+ if (obj.misc.obj_cite_number_type == 2) {
+ check["last_obj_cite_number_bkidx"] = obj.misc.obj_cite_number_bkidx;
}
}
}
diff --git a/src/sdp/meta/object_setter.d b/src/sdp/meta/object_setter.d
index 380bab7..2e92877 100644
--- a/src/sdp/meta/object_setter.d
+++ b/src/sdp/meta/object_setter.d
@@ -6,63 +6,77 @@
module sdp.meta.object_setter;
template ObjectSetter() {
/+ structs +/
- struct HeadingAttrib {
- string lev = "9";
- int heading_lev_markup = 9;
- int heading_lev_collapsed = 9;
- int[] closes_lev_collapsed = [];
- int[] closes_lev_markup = [];
- int array_ptr = 0;
- int heading_array_ptr_segments = 0;
+ struct DocObj_TypeInfo_ {
+ string of_part = ""; // frontmatter, body, backmatter
+ string of_section = ""; // toc, body, glossary, biography, book index, blurb
+ string is_of = ""; // para, block ?
+ string is_a = ""; // heading, para, table, code block, group, ...
}
- struct ObjGenericComposite {
- // size_t id;
- string of_part = "";
- string of_section = "";
- string is_of = "";
- string is_a = "";
- string text = "";
- string obj_cite_number = "";
- string obj_cite_number_off = "";
- string obj_cite_number_bkidx = "";
- int obj_cite_number_type = 0;
- string[] anchor_tags = [];
+ struct DocObj_TxtAttrib_ {
int indent_base = 0;
int indent_hang = 0;
bool bullet = false;
+ string language = ""; // not implemented, consider
+ }
+ struct DocObj_Has_ {
bool inline_links = false;
bool inline_notes_reg = false;
bool inline_notes_star = false;
bool contains_image_without_dimensions = false;
- string language = ""; // not implemented, consider
- string code_block_syntax = "";
- int table_number_of_columns = 0;
- double[] table_column_widths = [];
- string[] table_column_aligns = [];
- bool table_heading = false;
- bool table_walls = false; // not implemented
- int ocn = 0;
- string segment_anchor_tag = "";
- string segname_prev = "";
- string segname_next = "";
- int parent_lev_markup = 0;
- int parent_ocn = 0;
- int[] ancestors = [];
+ }
+ struct DocObj_Node_ {
+ string[string][string] node;
+ int ocn = 0; // duplicated as string with obj_cite_number
+ string obj_cite_number = ""; // duplicated as int with ocn may apply additional info for backmatter (glossary, biblio etc.)
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_ {
+ int number_of_columns = 0;
+ double[] column_widths = [];
+ string[] column_aligns = [];
+ bool heading = false;
+ bool walls = false; // not implemented
+ }
+ struct DocObj_CodeBlock_ {
+ string syntax = "";
+ }
+ struct DocObj_Pointer_ {
+ int doc_object = 0;
+ int html_segnames = 0;
+ int heading = 0;
+ }
+ struct DocObj_Tags_ {
string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string segment_anchor_tag = "";
+ string segname_prev = "";
+ string segname_next = "";
string[] lev4_subtoc = [];
- int heading_array_ptr = 0;
- int ptr_doc_object = 0;
- int ptr_html_segnames = 0;
- int ptr_heading = 0;
- int array_ptr = 0;
- int heading_array_ptr_segments = 0;
- string[string][string] node;
+ string[] anchor_tags = [];
+ }
+ struct DocObj_Misc_ {
+ string obj_cite_number_bkidx = "";
+ string obj_cite_number_off = "";
+ int obj_cite_number_type = 0; // { ocn, non, bkidx }
+ }
+ struct ObjGenericComposite {
+ string text = "";
+ DocObj_TypeInfo_ typeinfo;
+ 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;
diff --git a/src/sdp/output/epub3.d b/src/sdp/output/epub3.d
index 3209fae..18b9986 100644
--- a/src/sdp/output/epub3.d
+++ b/src/sdp/output/epub3.d
@@ -104,20 +104,20 @@ template outputEPub3() {
debug(epubmanifest) {
foreach (s; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[s]) {
- if (obj.is_a == "heading") {
- if (obj.heading_lev_markup == 4) {
+ if (obj.typeinfo.is_a == "heading") {
+ if (obj.node.heading_lev_markup == 4) {
writefln(
"%s~ [%s.xhtml] %s",
obj.marked_up_level,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
obj.text
);
- } else if (obj.heading_lev_markup > 4) {
+ } else if (obj.node.heading_lev_markup > 4) {
writefln(
"%s~ [%s.xhtml#%s] %s",
obj.marked_up_level,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
obj.text
);
}
@@ -146,49 +146,49 @@ template outputEPub3() {
);
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
foreach_reverse (n; 0 .. 7) {
string k = n.to!string;
- switch (obj.dom_collapsed[n]) {
+ switch (obj.node.dom_collapsed[n]) {
case DomTags.close :
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "</li>" ~ "\n";
toc ~= markup.indent_by_spaces_provided(n, " ") ~ "</ol>" ~ "\n";
break;
case DomTags.close_and_open :
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "</li>" ~ "\n";
- if (obj.heading_lev_markup < 4) {
+ if (obj.node.heading_lev_markup < 4) {
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ "\">"
~ _txt
~ "</a>" ~ "\n";
} else {
- string hashtag =(obj.heading_lev_markup == 4)
+ string hashtag =(obj.node.heading_lev_markup == 4)
? ""
- : ("#" ~ obj.ocn.to!string);
+ : ("#" ~ obj.node.ocn.to!string);
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
~ _txt
~ "</a>" ~ "\n";
}
break;
case DomTags.open :
toc ~= markup.indent_by_spaces_provided(n, " ") ~ "<ol>" ~ "\n";
- if (obj.heading_lev_markup < 4) {
+ if (obj.node.heading_lev_markup < 4) {
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ "\">"
~ _txt
~ "</a>" ~ "\n";
} else {
- string hashtag =(obj.heading_lev_markup == 4)
+ string hashtag =(obj.node.heading_lev_markup == 4)
? ""
- : ("#" ~ obj.ocn.to!string);
+ : ("#" ~ obj.node.ocn.to!string);
toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "<li>" ~ "\n"
~ markup.indent_by_spaces_provided((n + 2), " ")
- ~ "<a href=\"" ~ obj.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
+ ~ "<a href=\"" ~ obj.tags.segment_anchor_tag ~ ".xhtml" ~ hashtag ~ "\">"
~ _txt
~ "</a>" ~ "\n";
}
@@ -243,11 +243,11 @@ template outputEPub3() {
);
foreach (sect; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[sect]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip;
- string hashtag =(obj.heading_lev_markup <= 4) ? "" : ("#" ~ obj.ocn.to!string);
+ string hashtag =(obj.node.heading_lev_markup <= 4) ? "" : ("#" ~ obj.node.ocn.to!string);
foreach_reverse (k; 0 .. 7) {
- switch (obj.dom_markedup[k]) {
+ switch (obj.node.dom_markedup[k]) {
case DomTags.close :
toc ~= "\n </navPoint>";
break;
@@ -262,7 +262,7 @@ template outputEPub3() {
<content src="%s.xhtml%s" />¶",
counter,
_txt,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
hashtag,
);
break;
@@ -276,7 +276,7 @@ template outputEPub3() {
<content src="%s.xhtml%s" />¶",
counter,
_txt,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
hashtag,
);
break;
@@ -310,12 +310,12 @@ template outputEPub3() {
foreach (part; doc_matters.xml.keys_seq.seg) {
foreach (obj; doc_abstraction[part]) {
string _txt = xhtml_format.special_characters(obj, obj.text);
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
top_level_headings[0] = "";
top_level_headings[1] = "";
@@ -335,16 +335,16 @@ template outputEPub3() {
top_level_headings[3] = "";
goto default;
default:
- doc_parts_ ~= obj.segment_anchor_tag;
- doc_epub3[obj.segment_anchor_tag] ~= xhtml_format.epub3_seg_head(doc_matters);
+ doc_parts_ ~= obj.tags.segment_anchor_tag;
+ doc_epub3[obj.tags.segment_anchor_tag] ~= xhtml_format.epub3_seg_head(doc_matters);
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "epub");
- doc_epub3[obj.segment_anchor_tag] ~= t[0];
- doc_epub3_endnotes[obj.segment_anchor_tag] ~= t[1];
+ doc_epub3[obj.tags.segment_anchor_tag] ~= t[0];
+ doc_epub3_endnotes[obj.tags.segment_anchor_tag] ~= t[1];
break;
}
break;
case 4:
- segment_filename = obj.segment_anchor_tag;
+ segment_filename = obj.tags.segment_anchor_tag;
doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters);
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -357,23 +357,23 @@ template outputEPub3() {
break;
case 8: .. case 9:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
}
break;
}
} else {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_seg");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "toc":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -381,22 +381,22 @@ template outputEPub3() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": assert(part == "body");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "para":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -404,13 +404,13 @@ template outputEPub3() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
auto t = xhtml_format.quote_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0].to!string;
@@ -442,23 +442,23 @@ template outputEPub3() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "endnote": assert(part == "endnotes");
auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub");
doc_epub3[segment_filename] ~= t[0];
@@ -485,14 +485,14 @@ template outputEPub3() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -501,53 +501,53 @@ template outputEPub3() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
}
break;
}
}
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(obj.text.length > 0);
- if (obj.heading_lev_markup <= 4) {
+ if (obj.node.heading_lev_markup <= 4) {
oepbs_content_parts["manifest_documents"] ~=
format(q"¶ <item id="%s.xhtml" href="%s.xhtml" media-type="application/xhtml+xml" />
¶",
- obj.segment_anchor_tag,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
oepbs_content_parts["spine"] ~=
format(q"¶ <itemref idref="%s.xhtml" linear="yes" />
¶",
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
oepbs_content_parts["guide"] ~=
format(q"¶ <reference type="%s" href="%s" />
¶",
- obj.segment_anchor_tag,
- obj.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
+ obj.tags.segment_anchor_tag,
);
- } else if (obj.heading_lev_markup > 4) {
+ } else if (obj.node.heading_lev_markup > 4) {
oepbs_content_parts["manifest_documents"] ~=
format(q"¶ <item id="%s.xhtml#%s" href="%s.xhtml#%s" media-type="application/xhtml+xml" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
oepbs_content_parts["spine"] ~=
format(q"¶ <itemref idref="%s.xhtml#%s" linear="yes" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
oepbs_content_parts["guide"] ~=
format(q"¶ <reference type="%s#%s" href="%s#%s" />
¶",
- obj.segment_anchor_tag,
- obj.obj_cite_number,
- obj.segment_anchor_tag,
- obj.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
+ obj.tags.segment_anchor_tag,
+ obj.node.obj_cite_number,
);
}
}
diff --git a/src/sdp/output/html.d b/src/sdp/output/html.d
index ddd3c9f..6078c00 100644
--- a/src/sdp/output/html.d
+++ b/src/sdp/output/html.d
@@ -28,11 +28,11 @@ template outputHTML() {
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_scroll");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -41,22 +41,22 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": assert(part == "body" || "head"); // surprise
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -65,13 +65,13 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
doc_html ~= xhtml_format.quote_scroll(obj, _txt);
break;
@@ -94,23 +94,23 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_scroll" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
@@ -131,14 +131,14 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -147,8 +147,8 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
@@ -200,12 +200,12 @@ template outputHTML() {
foreach (obj; doc_abstraction[part]) {
delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
top_level_headings[0] = "";
top_level_headings[1] = "";
@@ -226,12 +226,12 @@ template outputHTML() {
goto default;
default:
auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg");
- top_level_headings[obj.heading_lev_markup] = t[0];
+ top_level_headings[obj.node.heading_lev_markup] = t[0];
break;
}
break;
case 4:
- segment_filename = obj.segment_anchor_tag;
+ segment_filename = obj.tags.segment_anchor_tag;
doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg");
auto navigation_bar = xhtml_format.nav_pre_next_svg(obj);
doc_html[segment_filename] ~= navigation_bar.toc_pre_next; // navigation bar
@@ -252,45 +252,45 @@ template outputHTML() {
break;
case 8: .. case 9:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a, ": ", obj.heading_lev_markup);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup);
}
break;
}
} else {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head" || "toc_seg");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "toc":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "body": assert(part == "body");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "para":
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
@@ -298,13 +298,13 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
auto t = xhtml_format.quote_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0].to!string;
@@ -336,23 +336,23 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "endnote": assert(part == "endnotes");
auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg");
doc_html[segment_filename] ~= t[0];
@@ -379,14 +379,14 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -395,7 +395,7 @@ template outputHTML() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part);
}
break;
}
diff --git a/src/sdp/output/sqlite.d b/src/sdp/output/sqlite.d
index e9667ae..f45eec6 100644
--- a/src/sdp/output/sqlite.d
+++ b/src/sdp/output/sqlite.d
@@ -246,7 +246,7 @@ template SQLiteFormatAndLoadObject() {
string o = format(q"¶<p class="%s"><b>
%s
</b></p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt,
);
return o;
@@ -255,13 +255,13 @@ template SQLiteFormatAndLoadObject() {
auto return ref const O obj,
) {
string _txt = munge_html(obj);
- _txt = (obj.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
+ _txt = (obj.attrib.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
string o = format(q"¶<p class="%s" indent="h%si%s">
%s
</p>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
_txt
);
return o;
@@ -273,7 +273,7 @@ template SQLiteFormatAndLoadObject() {
string o = format(q"¶<p class="%s">
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -285,7 +285,7 @@ template SQLiteFormatAndLoadObject() {
string o = format(q"¶<p class="%s">
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -296,7 +296,7 @@ template SQLiteFormatAndLoadObject() {
string _txt = munge_html(obj);
string o = format(q"¶
<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt.stripRight
);
return o;
@@ -306,7 +306,7 @@ template SQLiteFormatAndLoadObject() {
) {
string _txt = munge_html(obj);
string o = format(q"¶<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -316,7 +316,7 @@ template SQLiteFormatAndLoadObject() {
) {
string _txt = html_special_characters_code(obj.text);
string o = format(q"¶<p class="%s">%s</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
return o;
@@ -340,14 +340,14 @@ template SQLiteFormatAndLoadObject() {
&& (_table_rows.length <= row_idx+2)) { // check row_idx+2 (rather than == ++row_idx)
_tablenote ~= cell;
} else {
- string _col_is = (row_idx == 0 && obj.table_heading) ? "th" : "td";
+ string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
string _align = ("style=\"text-align:"
- ~ ((obj.table_column_aligns[col_idx] == "l")
+ ~ ((obj.table.column_aligns[col_idx] == "l")
? "left\"" : "right\""));
_table ~= "<"
~ _col_is
~ " width=\""
- ~ obj.table_column_widths[col_idx].to!string
+ ~ obj.table.column_widths[col_idx].to!string
~ "%\" "
~ _align
~ ">";
@@ -375,7 +375,7 @@ template SQLiteFormatAndLoadObject() {
</table>
%s
</p>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt,
_note
);
@@ -888,12 +888,12 @@ template SQLiteInsertDocObjectsLoop() {
);
¶",
_metadata_tid,
- obj.ocn,
+ obj.node.ocn,
SQLinsertDelimiter!()(obj_txt["text"]),
SQLinsertDelimiter!()(obj_txt["html"]),
- obj.heading_lev_markup,
- obj.is_of,
- obj.is_a,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_of,
+ obj.typeinfo.is_a,
);
return _insert_doc_objects_row;
}
@@ -903,32 +903,32 @@ template SQLiteInsertDocObjectsLoop() {
string[] _insert_doc_objects;
foreach (part; doc_matters.xml.keys_seq.sql) {
foreach (obj; doc_abstraction[part]) {
- switch (obj.of_part) {
+ switch (obj.typeinfo.of_part) {
case "frontmatter": assert(part == "head", part);
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
obj_txt = format_and_sqlite_load.heading(obj);
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "body": // assert(part == "body", part); // TODO broken
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
debug (asserts) { // TODO consider and fix or remove
if (part != "body") {
@@ -942,13 +942,13 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
case "block":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "quote":
obj_txt = format_and_sqlite_load.quote(obj);
break;
@@ -971,23 +971,23 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
break;
case "backmatter":
assert(part == "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail", part);
- switch (obj.is_of) {
+ switch (obj.typeinfo.is_of) {
case "para":
- switch (obj.is_a) {
+ switch (obj.typeinfo.is_a) {
case "heading":
obj_txt = format_and_sqlite_load.heading(obj);
break;
@@ -1005,14 +1005,14 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
}
break;
}
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of);
}
break;
}
@@ -1021,28 +1021,28 @@ template SQLiteInsertDocObjectsLoop() {
break;
default:
if ((doc_matters.opt.action.debug_do)) {
- writeln(__FILE__, ":", __LINE__, ": ", obj.of_part); // check where empty value could come from
- writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.of_part); // check where empty value could come from
+ writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from
}
break;
}
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
if ((doc_matters.opt.action.verbose)) {
writeln(
- "markup: ", obj.heading_lev_markup,
- "> ", obj.dom_markedup,
- "; collapsed: ", obj.heading_lev_collapsed,
- "> ", obj.dom_collapsed,
- "; ocn: ", obj.ocn,
- " node: ", obj.node,
- "; parent: ", obj.parent_lev_markup,
- "; ocn: ", obj.parent_ocn,
+ "markup: ", obj.node.heading_lev_markup,
+ "> ", obj.node.dom_markedup,
+ "; collapsed: ", obj.node.heading_lev_collapsed,
+ "> ", obj.node.dom_collapsed,
+ "; ocn: ", obj.node.ocn,
+ " node: ", obj.node.node,
+ "; parent: ", obj.node.parent_lev_markup,
+ "; ocn: ", obj.node.parent_ocn,
"; ",
);
}
}
- if (!(obj.is_a == "comment")) {
+ if (!(obj.typeinfo.is_a == "comment")) {
_insert_doc_objects ~= insertDocObjectsRow(obj);
}
} // loop closes
diff --git a/src/sdp/output/xmls.d b/src/sdp/output/xmls.d
index 785d87e..cc08bfe 100644
--- a/src/sdp/output/xmls.d
+++ b/src/sdp/output/xmls.d
@@ -60,7 +60,7 @@ template outputXHTMLs() {
.replaceAll(rgx.xhtml_less_than, "&#60;")
.replaceAll(rgx.xhtml_greater_than, "&#62;")
.replaceAll(rgx.nbsp_char, " ");
- if (!(obj.is_a == "code")) {
+ if (!(obj.typeinfo.is_a == "code")) {
_txt = (_txt)
.replaceAll(rgx.xhtml_line_break, "<br />");
}
@@ -340,7 +340,7 @@ template outputXHTMLs() {
string _suffix = ".html",
string _xml_type = "seg",
) {
- if (obj.inline_links) {
+ if (obj.has.inline_links) {
if ((_txt.match(rgx.mark_internal_site_lnk))
&& (_xml_type == "scroll")) { // conditions reversed to avoid: gdc compiled program run segfault
_txt = (_txt).replaceAll(
@@ -362,8 +362,8 @@ template outputXHTMLs() {
if (_txt.match(rgx.inline_link)) {
writeln(__LINE__,
" (missed) markup link identified (",
- obj.inline_links,
- "): ", obj.is_a, ": ",
+ obj.has.inline_links,
+ "): ", obj.typeinfo.is_a, ": ",
obj.text
);
}
@@ -372,8 +372,8 @@ template outputXHTMLs() {
if (_txt.match(rgx.inline_link)) {
writeln(__LINE__,
" (missed) markup link identified (",
- obj.inline_links,
- "): ", obj.is_a, ": ",
+ obj.has.inline_links,
+ "): ", obj.typeinfo.is_a, ": ",
obj.text
);
}
@@ -384,7 +384,7 @@ template outputXHTMLs() {
auto return ref const O obj,
string _txt,
) {
- if (obj.inline_notes_reg) {
+ if (obj.has.inline_notes_reg) {
_txt = font_face(_txt);
_txt = (_txt).replaceAll(
rgx.inline_notes_delimiter_al_regular_number_note,
@@ -393,12 +393,12 @@ template outputXHTMLs() {
}
debug(markup_endnotes) {
if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
- writeln(__LINE__, " (missed) markup endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
debug(markup) {
if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
- writeln(__LINE__, " (missed) markup endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
return _txt;
@@ -408,7 +408,7 @@ template outputXHTMLs() {
string _txt,
) {
string[] _endnotes;
- if (obj.inline_notes_reg) {
+ if (obj.has.inline_notes_reg) {
_txt = font_face(_txt);
/+ need markup for text, and separated footnote +/
foreach(m; _txt.matchAll(rgx.inline_notes_delimiter_al_regular_number_note)) {
@@ -433,7 +433,7 @@ template outputXHTMLs() {
);
} else if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) {
debug(markup) {
- writeln(__LINE__, " endnote: ", obj.is_a, ": ", obj.text);
+ writeln(__LINE__, " endnote: ", obj.typeinfo.is_a, ": ", obj.text);
}
}
auto t = tuple(
@@ -468,7 +468,7 @@ template outputXHTMLs() {
) {
char[] lev4_subtoc;
lev4_subtoc ~= " <div class=\"nav\">\n";
- foreach (subtoc; obj.lev4_subtoc) {
+ foreach (subtoc; obj.tags.lev4_subtoc) {
if (auto m = subtoc.match(rgx.inline_link_subtoc)) {
auto indent = m.captures[1].to!string;
auto text = m.captures[2].to!string;
@@ -493,7 +493,7 @@ template outputXHTMLs() {
auto return ref const O obj,
) {
string prev, next, toc;
- if (obj.segment_anchor_tag == "toc") {
+ if (obj.tags.segment_anchor_tag == "toc") {
toc = "";
prev = "";
} else {
@@ -506,7 +506,7 @@ template outputXHTMLs() {
</a>¶",
);
}
- if (obj.segname_prev == "") {
+ if (obj.tags.segname_prev == "") {
prev = "";
} else {
prev = format(q"¶<a href="%s.html" target="_top">
@@ -516,10 +516,10 @@ template outputXHTMLs() {
</svg>
</div>
</a>¶",
- obj.segname_prev,
+ obj.tags.segname_prev,
);
}
- if (obj.segname_next == "") {
+ if (obj.tags.segname_next == "") {
next = "";
} else {
next = format(q"¶<a href="%s.html" target="_top">
@@ -529,7 +529,7 @@ template outputXHTMLs() {
</svg>
</div>
</a>¶",
- obj.segname_next,
+ obj.tags.segname_next,
);
}
string _toc_pre_next = format(q"¶ <div class="flex-menu-option">
@@ -571,15 +571,15 @@ template outputXHTMLs() {
string _txt,
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
string _horizontal_rule = "<hr />";
if ((_xml_type != "html")
- || (obj.heading_lev_markup == 0 || obj.heading_lev_markup > 4)) {
+ || (obj.node.heading_lev_markup == 0 || obj.node.heading_lev_markup > 4)) {
_horizontal_rule = "";
}
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶%s
<div class="substance">
<h%s class="%s">%s
@@ -587,11 +587,11 @@ template outputXHTMLs() {
</h%s>
</div>¶",
_horizontal_rule,
- obj.heading_lev_markup,
- obj.is_a,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_a,
tags,
_txt,
- obj.heading_lev_markup,
+ obj.node.heading_lev_markup,
);
} else {
o = format(q"¶%s
@@ -602,15 +602,15 @@ template outputXHTMLs() {
</h%s>
</div>¶",
_horizontal_rule,
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.heading_lev_markup,
- obj.is_a,
- obj.obj_cite_number,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.heading_lev_markup,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
tags,
_txt,
- obj.heading_lev_markup,
+ obj.node.heading_lev_markup,
);
}
return o;
@@ -620,7 +620,7 @@ template outputXHTMLs() {
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = heading(obj, _txt);
return o;
@@ -645,19 +645,19 @@ template outputXHTMLs() {
auto return ref const O obj,
string _txt,
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = font_face(_txt);
string o;
- _txt = (obj.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
- if (obj.obj_cite_number.empty) {
+ _txt = (obj.attrib.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s" indent="h%si%s">%s
%s
</p>
</div>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
tags,
_txt
);
@@ -668,12 +668,12 @@ template outputXHTMLs() {
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
+ obj.node.obj_cite_number,
tags,
_txt
);
@@ -685,7 +685,7 @@ template outputXHTMLs() {
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = para(obj, _txt);
return o;
@@ -712,13 +712,13 @@ template outputXHTMLs() {
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">
%s
</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -728,10 +728,10 @@ template outputXHTMLs() {
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -742,7 +742,7 @@ template outputXHTMLs() {
string _txt,
string _suffix = ".html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = quote(obj, _txt);
return o;
@@ -769,13 +769,13 @@ template outputXHTMLs() {
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">
%s
</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -785,10 +785,10 @@ template outputXHTMLs() {
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -800,7 +800,7 @@ template outputXHTMLs() {
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = group(obj, _txt);
return o;
@@ -827,11 +827,11 @@ template outputXHTMLs() {
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt.stripRight
);
} else {
@@ -839,10 +839,10 @@ template outputXHTMLs() {
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt.stripRight
);
}
@@ -854,7 +854,7 @@ template outputXHTMLs() {
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = block(obj, _txt);
return o;
@@ -881,11 +881,11 @@ template outputXHTMLs() {
) {
_txt = font_face(_txt);
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -893,10 +893,10 @@ template outputXHTMLs() {
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
@@ -908,7 +908,7 @@ template outputXHTMLs() {
string _suffix = ".html",
string _xml_type = "html",
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = inline_markup_scroll(obj, _txt, _suffix);
string o = verse(obj, _txt);
return o;
@@ -945,11 +945,11 @@ template outputXHTMLs() {
&& (_table_rows.length <= row_idx+2)) {
_tablenote ~= cell;
} else {
- string _col_is = (row_idx == 0 && obj.table_heading) ? "th" : "td";
+ string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
string _align = ("style=\"text-align:"
- ~ ((obj.table_column_aligns[col_idx] == "l")
+ ~ ((obj.table.column_aligns[col_idx] == "l")
? "left\"" : "right\""));
- _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table_column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
+ _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table.column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
_table ~= cell;
_table ~= "</" ~ _col_is ~ ">";
}
@@ -966,7 +966,7 @@ template outputXHTMLs() {
auto return ref const O obj,
string _txt,
) {
- auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags);
_txt = font_face(_txt);
auto t = tablarize(obj, _txt);
_txt = t[0];
@@ -981,10 +981,10 @@ template outputXHTMLs() {
%s
</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
tags,
_txt,
_note
@@ -999,9 +999,9 @@ template outputXHTMLs() {
o = format(q"¶ <p class="%s" indent="h%si%s">
%s
</p>¶",
- obj.is_a,
- obj.indent_hang,
- obj.indent_base,
+ obj.typeinfo.is_a,
+ obj.attrib.indent_hang,
+ obj.attrib.indent_base,
_txt
);
return o;
@@ -1011,11 +1011,11 @@ template outputXHTMLs() {
string _txt,
) {
string o;
- if (obj.obj_cite_number.empty) {
+ if (obj.node.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s">%s</p>
</div>¶",
- obj.is_a,
+ obj.typeinfo.is_a,
_txt
);
} else {
@@ -1023,10 +1023,10 @@ template outputXHTMLs() {
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
<p class="%s" id="%s">%s</p>
</div>¶",
- obj.obj_cite_number,
- obj.obj_cite_number,
- obj.is_a,
- obj.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.node.obj_cite_number,
+ obj.typeinfo.is_a,
+ obj.node.obj_cite_number,
_txt
);
}
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d
index c5ee70a..0093f74 100755
--- a/src/sdp/sdp.d
+++ b/src/sdp/sdp.d
@@ -32,7 +32,6 @@ homepage "http://sisudoc.org"
void main(string[] args) {
mixin SiSUrgxInit;
mixin contentJSONtoSiSUstruct;
- mixin SiSUnode;
mixin SiSUbiblio;
mixin SiSUrgxInitFlags;
mixin outputHub;
diff --git a/views/version.txt b/views/version.txt
index 1c0b9d5..45dcb3b 100644
--- a/views/version.txt
+++ b/views/version.txt
@@ -4,7 +4,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 26, 2);
+enum ver = Version(0, 26, 3);
version (Posix) {
version (DigitalMars) {
} else version (LDC) {