From b86c91d6136476de3a35e0077db28caccacd816e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Jun 2018 11:42:14 -0400 Subject: doc object metainfo consolidation --- org/output_xmls.org | 284 ++++++++++++++++++++++++++-------------------------- 1 file changed, 142 insertions(+), 142 deletions(-) (limited to 'org/output_xmls.org') diff --git a/org/output_xmls.org b/org/output_xmls.org index 894f329..3742975 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -107,7 +107,7 @@ string special_characters(O)( .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, "
"); } @@ -478,7 +478,7 @@ auto inline_links(O)( writeln(__LINE__, " (missed) markup link identified (", obj.has.inline_links, - "): ", obj.typeinfo.is_a, ": ", + "): ", obj.metainfo.is_a, ": ", obj.text ); } @@ -488,7 +488,7 @@ auto inline_links(O)( writeln(__LINE__, " (missed) markup link identified (", obj.has.inline_links, - "): ", obj.typeinfo.is_a, ": ", + "): ", obj.metainfo.is_a, ": ", obj.text ); } @@ -514,12 +514,12 @@ auto inline_notes_scroll(O)( } debug(markup_endnotes) { if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) { - writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text); + writeln(__LINE__, " (missed) markup endnote: ", obj.metainfo.is_a, ": ", obj.text); } } debug(markup) { if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) { - writeln(__LINE__, " (missed) markup endnote: ", obj.typeinfo.is_a, ": ", obj.text); + writeln(__LINE__, " (missed) markup endnote: ", obj.metainfo.is_a, ": ", obj.text); } } return _txt; @@ -560,7 +560,7 @@ auto inline_notes_seg(O)( ); } else if (_txt.match(rgx.inline_notes_delimiter_al_regular_number_note)) { debug(markup) { - writeln(__LINE__, " endnote: ", obj.typeinfo.is_a, ": ", obj.text); + writeln(__LINE__, " endnote: ", obj.metainfo.is_a, ": ", obj.text); } } auto t = tuple( @@ -733,12 +733,12 @@ auto heading(O)( auto tags = _xhtml_anchor_tags(obj.tags.anchor_tags); string _horizontal_rule = "
"; if ((_xml_type != "html") - || (obj.node.heading_lev_markup == 0 || obj.node.heading_lev_markup > 4)) { + || (obj.metainfo.heading_lev_markup == 0 || obj.metainfo.heading_lev_markup > 4)) { _horizontal_rule = ""; } _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶%s
%s @@ -746,11 +746,11 @@ auto heading(O)(
¶", _horizontal_rule, - obj.node.heading_lev_markup, - obj.typeinfo.is_a, + obj.metainfo.heading_lev_markup, + obj.metainfo.is_a, tags, _txt, - obj.node.heading_lev_markup, + obj.metainfo.heading_lev_markup, ); } else { o = format(q"¶%s @@ -761,15 +761,15 @@ auto heading(O)( ¶", _horizontal_rule, - obj.node.object_number, - obj.node.object_number, - obj.node.heading_lev_markup, - obj.typeinfo.is_a, - obj.node.object_number, - obj.node.object_number, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.heading_lev_markup, + obj.metainfo.is_a, + obj.metainfo.object_number, + obj.metainfo.object_number, tags, _txt, - obj.node.heading_lev_markup, + obj.metainfo.heading_lev_markup, ); } return o; @@ -827,13 +827,13 @@ auto para(O)( _txt = font_face(_txt); string o; _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶

%s %s

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, tags, @@ -846,12 +846,12 @@ auto para(O)( %s

¶", - obj.node.object_number, - obj.node.object_number, - obj.typeinfo.is_a, + obj.metainfo.object_number, + obj.metainfo.object_number, + obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, - obj.node.object_number, + obj.metainfo.object_number, tags, _txt ); @@ -909,13 +909,13 @@ auto quote(O)( ) { _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶

%s

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); } else { @@ -925,10 +925,10 @@ auto quote(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, _txt ); } @@ -985,13 +985,13 @@ auto group(O)( ) { _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶

%s

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); } else { @@ -1001,10 +1001,10 @@ auto group(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, _txt ); } @@ -1062,11 +1062,11 @@ auto block(O)( ) { _txt = font_face(_txt); string o; - if (obj.node.object_number.empty) { + if (obj.metainfo.object_number.empty) { o = format(q"¶

%s

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt.stripRight ); } else { @@ -1074,10 +1074,10 @@ auto block(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, _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

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); } else { @@ -1147,10 +1147,10 @@ auto verse(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, _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

¶", - obj.typeinfo.is_a, + obj.metainfo.is_a, _txt ); } else { @@ -1218,10 +1218,10 @@ auto code(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, _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), " ") ~ "
  • " ~ "\n" ~ markup.indent_by_spaces_provided((n + 2), " ") ~ "" ~ _txt ~ "" ~ "\n"; } else { - string hashtag =(obj.node.heading_lev_markup == 4) + string hashtag =(obj.metainfo.heading_lev_markup == 4) ? "" - : ("#" ~ obj.node.ocn.to!string); + : ("#" ~ obj.metainfo.ocn.to!string); toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "
  • " ~ "\n" ~ markup.indent_by_spaces_provided((n + 2), " ") ~ "" @@ -2084,16 +2084,16 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { break; case DomTags.open : toc ~= markup.indent_by_spaces_provided(n, " ") ~ "
      " ~ "\n"; - if (obj.node.heading_lev_markup < 4) { + if (obj.metainfo.heading_lev_markup < 4) { toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "
    1. " ~ "\n" ~ markup.indent_by_spaces_provided((n + 2), " ") ~ "" ~ _txt ~ "" ~ "\n"; } else { - string hashtag =(obj.node.heading_lev_markup == 4) + string hashtag =(obj.metainfo.heading_lev_markup == 4) ? "" - : ("#" ~ obj.node.ocn.to!string); + : ("#" ~ obj.metainfo.ocn.to!string); toc ~= markup.indent_by_spaces_provided((n + 1), " ") ~ "
    2. " ~ "\n" ~ markup.indent_by_spaces_provided((n + 2), " ") ~ "" @@ -2160,11 +2160,11 @@ string epub2_oebps_toc_ncx(D,I)(D doc_abstraction, I doc_matters) { ); foreach (sect; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[sect]) { - if (obj.typeinfo.is_a == "heading") { + if (obj.metainfo.is_a == "heading") { string _txt = obj.text.replaceAll(rgx.inline_notes_al_gen, "").strip; - string hashtag =(obj.node.heading_lev_markup <= 4) ? "" : ("#" ~ obj.node.ocn.to!string); + string hashtag =(obj.metainfo.heading_lev_markup <= 4) ? "" : ("#" ~ obj.metainfo.ocn.to!string); foreach_reverse (k; 0 .. 7) { - switch (obj.node.dom_markedup[k]) { + switch (obj.metainfo.dom_markedup[k]) { case DomTags.close : toc ~= "\n "; break; @@ -2233,12 +2233,12 @@ void outputEPub3(D,I)( foreach (part; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[part]) { string _txt = xhtml_format.special_characters(obj, obj.text); - if (obj.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] = ""; @@ -2280,23 +2280,23 @@ void outputEPub3(D,I)( 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, "epub"); doc_epub3[segment_filename] ~= t[0]; @@ -2304,22 +2304,22 @@ void outputEPub3(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.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"); - 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, "epub"); doc_epub3[segment_filename] ~= t[0]; @@ -2327,13 +2327,13 @@ void outputEPub3(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.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, "epub"); doc_epub3[segment_filename] ~= t[0].to!string; @@ -2365,23 +2365,23 @@ void outputEPub3(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.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, "epub"); doc_epub3[segment_filename] ~= t[0]; @@ -2408,14 +2408,14 @@ void outputEPub3(D,I)( break; default: if ((doc_matters.opt.action.debug_do)) { - writeln(__FILE__, ":", __LINE__, ": ", obj.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; } @@ -2424,14 +2424,14 @@ void outputEPub3(D,I)( 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; } } - if (obj.typeinfo.is_a == "heading") { + if (obj.metainfo.is_a == "heading") { assert(obj.text.length > 0); - if (obj.node.heading_lev_markup <= 4) { + if (obj.metainfo.heading_lev_markup <= 4) { oepbs_content_parts["manifest_documents"] ~= format(q"¶ ¶", @@ -2449,28 +2449,28 @@ void outputEPub3(D,I)( obj.tags.segment_anchor_tag, obj.tags.segment_anchor_tag, ); - } else if (obj.node.heading_lev_markup > 4) { + } else if (obj.metainfo.heading_lev_markup > 4) { oepbs_content_parts["manifest_documents"] ~= format(q"¶ ¶", obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, ); oepbs_content_parts["spine"] ~= format(q"¶ ¶", obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, ); oepbs_content_parts["guide"] ~= format(q"¶ ¶", obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, obj.tags.segment_anchor_tag, - obj.node.object_number, + obj.metainfo.object_number, ); } } -- cgit v1.2.3