From b86c91d6136476de3a35e0077db28caccacd816e Mon Sep 17 00:00:00 2001
From: Ralph Amissah
%s
%s
%s
%s
%s %s %s
%s %s
%s
%s
%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt.stripRight ); } @@ -1135,11 +1135,11 @@ auto verse(O)( ) { _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt ); } @@ -1206,11 +1206,11 @@ auto code(O)( string _txt, ) { string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt ); } @@ -1300,10 +1300,10 @@ auto table(O)( %s ¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, tags, _txt, _note @@ -1324,7 +1324,7 @@ auto endnote(O)( o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, _txt @@ -1369,11 +1369,11 @@ void scroll(D,I)( foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj, obj.text); - switch (obj.typeinfo.is_of_part) { + switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head" || "toc_scroll"); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); break; @@ -1382,22 +1382,22 @@ void scroll(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } break; case "body": assert(part == "body" || "head"); // surprise - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); break; @@ -1406,13 +1406,13 @@ void scroll(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; case "block": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "quote": doc_html ~= xhtml_format.quote_scroll(obj, _txt); break; @@ -1435,23 +1435,23 @@ void scroll(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } break; case "backmatter": assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_scroll" || "blurb" || "tail"); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); break; @@ -1472,14 +1472,14 @@ void scroll(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } @@ -1488,8 +1488,8 @@ void scroll(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_part); - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } break; @@ -1554,12 +1554,12 @@ void seg(D,M)( foreach (obj; doc_abstraction[part]) { delimit = xhtml_format.div_delimit(part, previous_part); string _txt = xhtml_format.special_characters(obj, obj.text); - if (obj.typeinfo.is_a == "heading") { + if (obj.metainfo.is_a == "heading") { assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail"); - switch (obj.node.heading_lev_markup) { + switch (obj.metainfo.heading_lev_markup) { case 0: .. case 3: /+ fill buffer, and replace with new levels from 1 to 3 +/ - switch (obj.node.heading_lev_markup) { + switch (obj.metainfo.heading_lev_markup) { case 0: top_level_headings[0] = ""; top_level_headings[1] = ""; @@ -1580,7 +1580,7 @@ void seg(D,M)( goto default; default: auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg"); - top_level_headings[obj.node.heading_lev_markup] = t[0]; + top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; @@ -1606,45 +1606,45 @@ void seg(D,M)( break; case 8: .. case 9: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a, ": ", obj.node.heading_lev_markup); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } break; } } else { assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail"); - switch (obj.typeinfo.is_of_part) { + switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head" || "toc_seg"); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "toc": auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; case "body": assert(part == "body"); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "para": auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; @@ -1652,13 +1652,13 @@ void seg(D,M)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; case "block": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "quote": auto t = xhtml_format.quote_seg(obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; @@ -1690,23 +1690,23 @@ void seg(D,M)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } break; case "backmatter": assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail"); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "endnote": assert(part == "endnotes"); auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; @@ -1733,14 +1733,14 @@ void seg(D,M)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } @@ -1749,7 +1749,7 @@ void seg(D,M)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } break; } @@ -2004,20 +2004,20 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { debug(epubmanifest) { foreach (s; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[s]) { - if (obj.typeinfo.is_a == "heading") { - if (obj.node.heading_lev_markup == 4) { + if (obj.metainfo.is_a == "heading") { + if (obj.metainfo.heading_lev_markup == 4) { writefln( "%s~ [%s.xhtml] %s", obj.marked_up_level, obj.tags.segment_anchor_tag, obj.text ); - } else if (obj.node.heading_lev_markup > 4) { + } else if (obj.metainfo.heading_lev_markup > 4) { writefln( "%s~ [%s.xhtml#%s] %s", obj.marked_up_level, obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, obj.text ); } @@ -2054,27 +2054,27 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { ); foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { - if (obj.typeinfo.is_a == "heading") { + if (obj.metainfo.is_a == "heading") { string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip; foreach_reverse (n; 0 .. 7) { string k = n.to!string; - switch (obj.node.dom_collapsed[n]) { + switch (obj.metainfo.dom_collapsed[n]) { case DomTags.close : toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "" ~ "\n"; toc ~= markup.indent_by_spaces_provided(n, " ") ~ "" ~ "\n"; break; case DomTags.close_and_open : toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "" ~ "\n"; - if (obj.node.heading_lev_markup < 4) { + if (obj.metainfo.heading_lev_markup < 4) { toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt, ); return o; @@ -259,7 +259,7 @@ template SQLiteFormatAndLoadObject() { string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, _txt @@ -273,7 +273,7 @@ template SQLiteFormatAndLoadObject() { string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); return o; @@ -285,7 +285,7 @@ template SQLiteFormatAndLoadObject() { string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); return o; @@ -296,7 +296,7 @@ template SQLiteFormatAndLoadObject() { string _txt = munge_html(obj); string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt.stripRight ); return o; @@ -306,7 +306,7 @@ template SQLiteFormatAndLoadObject() { ) { string _txt = munge_html(obj); string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); return o; @@ -316,7 +316,7 @@ template SQLiteFormatAndLoadObject() { ) { string _txt = html_special_characters_code(obj.text); string o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); return o; @@ -375,7 +375,7 @@ template SQLiteFormatAndLoadObject() { %s ¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt, _note ); @@ -888,12 +888,12 @@ template SQLiteInsertDocObjectsLoop() { ); ¶", _metadata_tid, - obj.node.ocn, + obj.metainfo.ocn, SQLinsertDelimiter!()(obj_txt["text"]), SQLinsertDelimiter!()(obj_txt["html"]), - obj.node.heading_lev_markup, - obj.typeinfo.is_of_type, - obj.typeinfo.is_a, + obj.metainfo.heading_lev_markup, + obj.metainfo.is_of_type, + obj.metainfo.is_a, ); return _insert_doc_objects_row; } @@ -903,32 +903,32 @@ template SQLiteInsertDocObjectsLoop() { string[] _insert_doc_objects; foreach (part; doc_matters.xml.keys_seq.sql) { foreach (obj; doc_abstraction[part]) { - switch (obj.typeinfo.is_of_part) { + switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": obj_txt = format_and_sqlite_load.heading(obj); break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } break; case "body": // assert(part == "body", part); // TODO broken - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": debug (asserts) { // TODO consider and fix or remove if (part != "body") { @@ -942,13 +942,13 @@ template SQLiteInsertDocObjectsLoop() { break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; case "block": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "quote": obj_txt = format_and_sqlite_load.quote(obj); break; @@ -971,23 +971,23 @@ template SQLiteInsertDocObjectsLoop() { break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } break; case "backmatter": assert(part == "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail", part); - switch (obj.typeinfo.is_of_type) { + switch (obj.metainfo.is_of_type) { case "para": - switch (obj.typeinfo.is_a) { + switch (obj.metainfo.is_a) { case "heading": obj_txt = format_and_sqlite_load.heading(obj); break; @@ -1005,14 +1005,14 @@ template SQLiteInsertDocObjectsLoop() { break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } break; } break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_type); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } break; } @@ -1021,28 +1021,28 @@ template SQLiteInsertDocObjectsLoop() { break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_of_part); // check where empty value could come from - writeln(__FILE__, ":", __LINE__, ": ", obj.typeinfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from } break; } - if (obj.typeinfo.is_a == "heading") { + if (obj.metainfo.is_a == "heading") { if ((doc_matters.opt.action.verbose)) { writeln( - "markup: ", obj.node.heading_lev_markup, - "> ", obj.node.dom_markedup, - "; collapsed: ", obj.node.heading_lev_collapsed, - "> ", obj.node.dom_collapsed, - "; ocn: ", obj.node.ocn, - " node: ", obj.node.node, - "; parent: ", obj.node.parent_lev_markup, - "; ocn: ", obj.node.parent_ocn, + "markup: ", obj.metainfo.heading_lev_markup, + "> ", obj.metainfo.dom_markedup, + "; collapsed: ", obj.metainfo.heading_lev_collapsed, + "> ", obj.metainfo.dom_collapsed, + "; ocn: ", obj.metainfo.ocn, + " node: ", obj.metainfo.node, + "; parent: ", obj.metainfo.parent_lev_markup, + "; ocn: ", obj.metainfo.parent_ocn, "; ", ); } } - if (!(obj.typeinfo.is_a == "comment")) { + if (!(obj.metainfo.is_a == "comment")) { _insert_doc_objects ~= insertDocObjectsRow(obj); } } // loop closes diff --git a/src/sdp/output/xmls.d b/src/sdp/output/xmls.d index e5d27c9..e977e6c 100644 --- a/src/sdp/output/xmls.d +++ b/src/sdp/output/xmls.d @@ -60,7 +60,7 @@ template outputXHTMLs() { .replaceAll(rgx.xhtml_less_than, "<") .replaceAll(rgx.xhtml_greater_than, ">") .replaceAll(rgx.nbsp_char, " "); - if (!(obj.typeinfo.is_a == "code")) { + if (!(obj.metainfo.is_a == "code")) { _txt = (_txt) .replaceAll(rgx.xhtml_line_break, "%s %s
%s
%s
%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt.stripRight ); } @@ -881,11 +881,11 @@ template outputXHTMLs() { ) { _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt ); } @@ -981,10 +981,10 @@ template outputXHTMLs() { %s ¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, tags, _txt, _note @@ -999,7 +999,7 @@ template outputXHTMLs() { o = format(q"¶%s
¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, _txt @@ -1011,11 +1011,11 @@ template outputXHTMLs() { string _txt, ) { string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶%s
%s
¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, + obj.metainfo.object_number, _txt ); } -- cgit v1.2.3