From 6f8fddb2dfa5faad56af2a0bfd0bf3b694695136 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Jun 2018 15:38:38 -0400 Subject: 0.26.3 object info changes --- src/sdp/meta/metadoc_from_src.d | 1834 +++++++++++++++++++-------------------- 1 file changed, 917 insertions(+), 917 deletions(-) (limited to 'src/sdp/meta/metadoc_from_src.d') 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_; -- cgit v1.2.3