Class HtmlRenderer
Principle: There is a complete parsed DTD (given to the constructor by param "dtd") and there is the source text. The source is parsed a second time and copied to the output, after being wrapped into HTML elements according to the parameters and the cross-reference info in the Dtd object.
ATTENTION this class inherits from "TunedDTDParser", but is used for incomplete functionality, so that many field values are under-defined and can be irritating, esp when in "PARSED-dtd" they have the same name (e.g. "this.entityUsage" is totally undefined, and "parsedDtd.entityUsage" is meant!)
After the object has been created,
printHtml(Writer,String,String,File,ToolOptions,String)
must be called.
The current implementation renders a primitive html document which
(modulo color) CAN LOOK EXACTLY like the dtd source.
Indeed, color, links and tool-tips are added for easy orientation:
All colors are defined by css classes for <span>
, <a>
,
<p>
elements, etc.
Anchors are given to (the start of)
- each element definition,
- each entity declaration,
- each attlist
Links are put accordingly,
- from element references in content models, to element declarations,
- from entity references in content models, to entity declarations,
- from entity references in attlists, to entity declarations,
- from entity references in entity values, to entity declarations,
- from element references in entity values, iff the entity is used in a content model anywhere,
- between the heads of attlists and content declarations for the same tag.
TOOLTIPS are given
- with element references, showing content model and attribute names
- with entity references, showing definition or replacement text.
--expandTooltips
for switching
all tooltips between definition text and expanded(=effective) text.
Attlists stand a little bit aside and are reachable by links in a cyclic way:
- from element definition header to the sequence of attlists,
- and from the last attlist back to the element.
When the NAME in a definiton (content model or attlist) is given by a parameter entity, than the switch --expandDefNames decides what to show. The cyclic links through elements and attlists are the same as above, but additionally the tooltip is prepended with the other variant, and, iff shown, the character "%" is a link to the definition place.
Preparing all this syntactic information requires expansion, but the goal for
verbatim visual presentation forbids. Therefore the method of choice
is a two(2)-phase approach:
The successfully parsed dtd model and the unparsed text are both
parameters to this process.
The original layout shall be kept verbatim.
The parsing process from TunedDTDParser
is partly overridden,
most analysis is skipped and reduced to mere verbatim character copying.
The required syntax information is taken from the dtd model.
Nearly all generated output is contained in one top-level
"<pre>
" element, which is the most-light-weight way of
making browsers respect whitespace and line-breaks.
Switching visibility goes by java-script. It operates on PAIRS OF SIBLINGS:
- a FIRST "
<span>
" element carries the "onclick" code for expanding its successor and collapsing itself. It is additionally marked by the dedicated class "dtd_meta_switch".- the FIRST CHILD of the SECOND SIBLING "
<span>
" carries the "onclick" code for expanding the predecessor of its parent and collapsing its parent.- the code for "expand all"/"collaps all" searches for the switch-on
spans and identifies their flavour by a certain "indicator class",
which can appear with the first or second child of the second span.
pre | | (<=== ON/OFF PAIR ====>) ( +-----------------------------+------------------------(------- | | ( span span style="display:none;" style="display:block;" class=dtd_meta_switch | ( onclick=switchon() +------------------+-------------(-+---- | | | ( | | span(/div/?) span (span div(/i/?) onclick=switchoff() | ( | class="dtd_attlist_decl" | --> arbitrary nesting (=indicator class!) | #PCDATA "switchOnText"
Seen from the standpoint of the following code, there is the additional level of "content" packing:pre | +-----------------------------+------------------------------- | | pre.Content pre.Content span class=meta_switch span class=PI/Comment/Eldef etc switchOnText | onclick=switchon() +----------------+-------------(-+---- | | ( | span.Content span.Content (span.Content span span (span onclick=switchoff()
=============================================================
Attention : The base classes have a different wording w.r.t errors: they use "MessageGenerator" and provide "error()", "warning()" etc.. "msg" is not known there. =============================================================
- the code for "expand all"/"collaps all" searches for the switch-on
spans and identifies their flavour by a certain "indicator class",
which can appear with the first or second child of the second span.
- the FIRST CHILD of the SECOND SIBLING "
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.dtd.TunedDTDParser
TunedDTDParser.ParsingFailed
Nested classes/interfaces inherited from class eu.bandm.tools.rdparser.TunableParser
TunableParser.CharSet, TunableParser.ExtensionalCharSet
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected StringBuilder
Temporary storage of consumed input characters, fed by overriden "consume()" below.protected int
The width after the first two columns.static final int
static final int
protected static final DTD.Comment
protected static final DTD.Element
(package private) DTD.Entity
protected final DTD.PI
protected boolean
protected final Map<DTD.Element,
String> Map of elements to Strings with content-plus-attributenamesprotected final Map<DTD.Entity,
String> protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected int
protected boolean
static final String
protected boolean
static final String
protected Element_span
Memo for a-posteriori modification (FIXME besser raus)protected int
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected ToolOptions.visibility
protected static final Element_span.Content
protected int
protected String
protected boolean
protected final DTD.Dtd
static final String
static final String
protected List<Element_pre.Content>
Output storage of constructed html elements, top-level, i.e.static final int
static final String
protected String
ATTENTION must be in synch with renderedDtd.js, because there the back-calculation to text anchors takes place !?static final Element_span
protected final Element_span
protected Stack<List<Element_span.Content>>
Stack of layers BEYOND the preItems, i.e.protected final Element_span
protected final Statistics
Fields inherited from class eu.bandm.tools.dtd.TunedDTDParser
currentElementName, entityUsage, errorOnExpand, generalEntities, ignoreErrors, LAZY_ENTITY_ERROR, nicePE, parameterEntities, UNPARSED_CONTENTS
Fields inherited from class eu.bandm.tools.rdparser.TunableParserForXml
asciiLetterSet, decDigitSet, encNameSet, hexDigitSet, initialSet, nameSet, prefix_GE, prefix_PE, pubidCharSet, sNoPESet, sSet, stringconstant_IGNORE, stringconstant_INCLUDE, versionNumSet
Fields inherited from class eu.bandm.tools.rdparser.TunableParser
base, in, messageReceiver, topleveldocumentid
-
Constructor Summary
ConstructorDescriptionHtmlRenderer
(DTD.Dtd dtd, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, Statistics statistics, Reader text) Only constructor, returns a use-once instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_close
(String switchOnText, ToolOptions.visibility visible, String switch_on_class) Take the currently top-level (currently growing) list "Ln" of span elements.protected Element_a
static final String
anchorEntityName
(String name, boolean parameter) For anchors in generated html.static final String
anchorName
(DTD.Attlist a, int count) static final String
protected void
Append to top-level list (either in spanLists or the lsit preItems).protected void
Append to top-level list (either in spanLists or the lsit preItems).protected void
protected DTD.Attlist
Parsing AND rendering function, DEEPLY CHANGED COPY of super(): Entities can appear anywhere and cover more than one "column".protected void
checkCssClass
(String cssClass) protected void
checkMassSwitch
(ToolOptions.visibility visible, boolean present, String text, String cssClass, List<Element_span.Content> ons, List<Element_span.Content> offs) protected void
close_region_and_prepend_switch
(String switchtext, ToolOptions.visibility visible) Special values for text and css class, but operation as in_close(String, ToolOptions.visibility,String)
}.protected void
close_region_and_prepend_switch_external_entity_content
(String switchtext, ToolOptions.visibility visible) Special values for text and css class, but operation as in_close(String, ToolOptions.visibility,String)
}.static final String
protected void
collectAttlistSource
(String name) protected DTD.Comment
comment()
Parsing function.protected void
Parsing function.protected void
consume()
CALL-BACK function, influencing the parsing functionality of the super-class to store all character data in the bufferconsumed
.protected boolean
ATTENTION GERefs will also be signalled !?!?! ATTENTION external PERefs will also be signalled !?!?! With "conventional" usage both facts should not be confusing.protected void
content_match
(String keyword) protected DTD.Element
Parsing AND rendering function, EXTENDED COPY of super():static String
elementGraphFileName
(String resultFileName) protected DTD.Entity
Parsing AND rendering function, EXTENDED COPY of super():static String
entityGraphFileName
(String resultFileName) protected String
protected String
ATTENION "mode=1" ??? FIXME WAS SOLL DAS BEDEUTEN ?? append the content model behind each "DTD.Abbrev"protected String
ATTENTION intended only for INTERNAL PARAMETER entities!protected ToolOptions.visibility
protected void
Consume whitespace before the "close span region()" is called, so that the whitespace will be part of collapsing/exploding/skipping.protected void
initModes
(ToolOptions options) Sets the global boolean flags etc.protected void
insert_switchOff
(String text, String cssClass, ToolOptions.visibility currentmode) Do the same asreduce_switchOff(String, ToolOptions.visibility)
, but not with accumulated source text, but with synthetic, explicit text (probably in a Dtd "comment" syntax !-)
Is required for insertion of external parameter entities and additional print-outs like graphics and analyses!protected void
insertAlphaindex
(ToolOptions options) protected void
insertAnalyses
(ToolOptions options) protected ToolOptions.visibility
intern
(ToolOptions options, ToolOptions.visibility optionMode) Option still does not use enumerations.protected boolean
protected Element_p
makeFooter
(String basicFileName, String url_htmlRenderer_docu) protected void
makeHeadline_dtd_coords
(String alternative, boolean dynamic, String cmdline, String date, String userText) protected void
makeMassSwitches
(boolean withInstructions) assume only called if "htmlIsDynamic==true"protected void
makeSvg
(File outputfile, String title, Multimap<String, String> relation, String altText, String switchText, String mapIdentifier, ToolOptions.visibility visibility) DOCMEprotected void
push a new (intially empty) list of span.content, for later reducing it to a single content element.protected String
peRef2deftext
(String entname) A pe REF can be dangling! ONLY in this case null is returned.protected DTD.PI
pi()
Parsing function.void
prepareTooltips
(boolean expand) Collect tool-tip text for element references.void
printHtml
(Writer output, String dtdFileName, String outfilename, @Opt File outputdir, ToolOptions options, String cmdLineText) Main (currently: the only) entry method after constructor call.protected ToolOptions.visibility
readMode
(boolean present, boolean isFileInsert, boolean isAdditional, String name, ToolOptions.visibility code, ToolOptions options) Processes on/off/onOff/offOn-switches.protected Element_a
Append an xhtml "anchor" object to the currently growing list.protected void
Output either a link to the definition, as calculated by the global "object to anchor" mechanisms, or a span, iff the reference is void/dangling!
INCLUDES PARSING, ie.protected DTD.Entity
reduce_entity_reference
(boolean parameter) Output either a link to the definition, as calculated by the global "object to anchor" mechanisms, or a span, iff the reference is void/dangling!
INCLUDES PARSING, ie.protected Element_span
Substitute the "css class for the rest, which has no own class"protected Element_span
reduce_span
(String cssClass) Append an xhtml "span" object containing ALL characters accumulated in the bufferconsumed
, with the given (non-null, non-empty!) css class.protected void
reduce_switchOff
(String cssClass, ToolOptions.visibility currentmode) Do the same asreduce_span(String)
, but additionally set the onclick-action, iff ToolOptions.visibility is dynamic.protected void
s()
Parsing function for non-optional whitespace, at those places where expansion pf PEs is allowed.protected void
scanForReferences_attOrEnt
(boolean inSingleQuotes, boolean inDoubleQuotes, boolean possiblyElementRefs) Parses the definition string of a entity defintion, or a whole sequence of attribute definition entries.protected void
Parses an element definition's content model and outputs all sub-segments correctly wrapped to the html element list.protected void
protected Element_span
protected Element_span
protected void
protected void
protected DTD.XmlDecl
xmlDecl()
Parsing function.Methods inherited from class eu.bandm.tools.dtd.TunedDTDParser
attDef, attType, attValue, AUX_convert, children, constructReplacementText, content, cp, declareGeneralEntity, declareParameterEntity, defaultDecl, dtd, encName, encodingDecl, entityValue, enumerated, eq, eRef, externalId, extSubset, fatalError, ignore, markupDecl, mixed, modifierOpt, name, niceEntityValue, nmtoken, notationDecl, parse, parse, parseId, parselocal, peRef, pubidLiteral, resolve, retrieveGeneralEntity, retrieveParameterEntity, retrieveReplacementText, sNoPE, sOpt, sOptNoPE, storeEntityUsage, sWsOpt, systemLiteral, versionInfo, versionNum
Methods inherited from class eu.bandm.tools.rdparser.TunableParserForXml
lookahead_pe, prefixedEntityName
Methods inherited from class eu.bandm.tools.rdparser.TunableParser
eof, error, failure, getMessageReceiver, lookahead, lookahead, lookahead, lookahead, lookahead, lookahead_eof, match, match, match, match, matchahead, matchahead, matchahead, matchUpto, matchUpto, readExternal, setBase, setMessageReceiver, skipUpto, warning, word
-
Field Details
-
path_to_stylesheet
- See Also:
-
path_to_javascript
- See Also:
-
href_bandm_online_docu
- See Also:
-
infotext_bandm_online_docu
- See Also:
-
class_noclass
- See Also:
-
class_meta_switch
- See Also:
-
class_meta_generated
- See Also:
-
class_alert
- See Also:
-
class_textdecl
- See Also:
-
class_comment
- See Also:
-
class_copyright_comment
- See Also:
-
class_pi
- See Also:
-
class_ent_include
- See Also:
-
class_ent_ignore
- See Also:
-
class_ent_p_def
- See Also:
-
class_ent_p_ref
- See Also:
-
class_ent_p_ref_UNDEF
- See Also:
-
class_ent_p_ext_ref
- See Also:
-
class_ent_p_ext_content_frame
- See Also:
-
class_ent_p_ext_content
- See Also:
-
class_ent_p_ext_nonshow
- See Also:
-
class_ent_g_def
- See Also:
-
class_ent_g_ref
- See Also:
-
class_ent_g_ref_UNDEF
- See Also:
-
class_el_def
- See Also:
-
class_el_ref
- See Also:
-
class_el_ref_UNDEF
- See Also:
-
class_att_def
- See Also:
-
class_att_def_DANGLING
- See Also:
-
class_att_ref
- See Also:
-
class_att_ref_UNDEF
- See Also:
-
mode_pi
-
mode_comment
-
mode_insert
-
mode_element
-
mode_attlist
-
mode_pe
-
mode_ge
-
mode_elementGraph
-
mode_entityGraph
-
mode_analyses
-
mode_alphaindex
-
expandTooltips
protected boolean expandTooltips -
expandEntities
protected boolean expandEntities -
expandContents
protected boolean expandContents -
expandAttlists
protected boolean expandAttlists -
expandDefNames
protected boolean expandDefNames -
separator_content_attlist
-
eatWs
protected boolean eatWs -
output_linewidth
protected int output_linewidth -
content_linewidth
protected int content_linewidthThe width after the first two columns. -
max_tooltip_width
protected int max_tooltip_width -
DISTANCE_TOOLTIP_OVERALL_WIDTH
public static final int DISTANCE_TOOLTIP_OVERALL_WIDTH- See Also:
-
DISTANCE_CONTENTS_OVERALL_WIDTH
public static final int DISTANCE_CONTENTS_OVERALL_WIDTH- See Also:
-
nbsp2
-
htmlIsDynamic
protected boolean htmlIsDynamic -
outputFormatIsDynamic
protected boolean outputFormatIsDynamic -
hasPEs
protected boolean hasPEs -
outputDifferences
-
el2tooltip
Map of elements to Strings with content-plus-attributenames -
ent2tooltip
-
parsedDtd
-
statistics
-
preItems
Output storage of constructed html elements, top-level, i.e. contents of the top-level xhtml [pre] element. -
spanLists
Stack of layers BEYOND the preItems, i.e. levels of nesting of [span] xhtml elements. -
last_appended_span
Memo for a-posteriori modification (FIXME besser raus) -
consumed
Temporary storage of consumed input characters, fed by overriden "consume()" below. -
spanLF
-
spanSP
-
fileInsertionNumber
protected int fileInsertionNumber -
dummy_PI
-
dummy_comment
-
dummy_element
-
dummy_entity
DTD.Entity dummy_entity -
attlistCount
-
lastAttlist
-
attributeSourceText
-
attributeSourceToolTip
-
shortname2graphanchor
ATTENTION must be in synch with renderedDtd.js, because there the back-calculation to text anchors takes place !? -
shortname2usertext
-
ref_list_spacer
- See Also:
-
span_ref_list_spacer
-
ref_list_right_margin
public static final int ref_list_right_margin- See Also:
-
peDefCheck
-
geDefCheck
-
gePeCheck
-
const_ent_p_ref
-
const_el_ref
-
const_el_ref_UNDEF
-
-
Constructor Details
-
HtmlRenderer
public HtmlRenderer(DTD.Dtd dtd, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, Statistics statistics, Reader text) Only constructor, returns a use-once instance. Usage: construct instance and invokeprintHtml(java.io.Writer, java.lang.String, java.lang.String, java.io.File, eu.bandm.tools.dtm.ToolOptions, java.lang.String)
.- Parameters:
dtd
- already successfully parsed dtd with all digested informationmsg
- for all error messagestext
- the same text as in "dtd", but unparsed
-
-
Method Details
-
isDynamic
-
firstPart
-
entityGraphFileName
-
elementGraphFileName
-
anchorEntityName
For anchors in generated html. -
anchorName
-
anchorName
-
codekey2anchorname
-
prepareTooltips
public void prepareTooltips(boolean expand) Collect tool-tip text for element references.
FIXME with [(text)+] toFormat() omits parentheses !?!?! -
peRef2deftext
A pe REF can be dangling! ONLY in this case null is returned. -
containsPERefs
ATTENTION GERefs will also be signalled !?!?! ATTENTION external PERefs will also be signalled !?!?! With "conventional" usage both facts should not be confusing. -
expandedText
ATTENION "mode=1" ??? FIXME WAS SOLL DAS BEDEUTEN ?? append the content model behind each "DTD.Abbrev" -
expandedText
-
expandedText
ATTENTION intended only for INTERNAL PARAMETER entities! -
append
Append to top-level list (either in spanLists or the lsit preItems). -
append
Append to top-level list (either in spanLists or the lsit preItems). -
open_span_region
protected void open_span_region()push a new (intially empty) list of span.content, for later reducing it to a single content element. -
throwAwaySpanRegion
protected void throwAwaySpanRegion() -
_close
Take the currently top-level (currently growing) list "Ln" of span elements. Pop this list off the stack and pack its contents according to the mode switch. If off, then discard, if on, then append it to the next higher list "L(n-1)" Otherwise create the on-switch and append this and Ln to the L(n-1). (Assume off-switch already contained at the beginning of Ln!) -
close_region_and_prepend_switch
Special values for text and css class, but operation as in_close(String, ToolOptions.visibility,String)
}. -
close_region_and_prepend_switch_external_entity_content
protected void close_region_and_prepend_switch_external_entity_content(String switchtext, ToolOptions.visibility visible) Special values for text and css class, but operation as in_close(String, ToolOptions.visibility,String)
}. -
consume
protected void consume()CALL-BACK function, influencing the parsing functionality of the super-class to store all character data in the bufferconsumed
.- Overrides:
consume
in classTunableParser<XMLDocumentIdentifier>
-
throwAwayConsumed
protected void throwAwayConsumed() -
checkCssClass
-
spanC
-
spanCC
-
anchorCH
-
reduce_a
protected Element_a reduce_a(String cssClass, String ownAnchor, @Opt @Opt String foreignAnchor, String tooltip) Append an xhtml "anchor" object to the currently growing list. (No further effects on the list stack!) Assume name of target element has just been consumed, but not yet reduced. The generated text field is also a "link" = "jump START", iff foreignAnchor != null.- Returns:
- the visibible part to which a toolttip can be attached.
-
reduce_span
Append an xhtml "span" object containing ALL characters accumulated in the bufferconsumed
, with the given (non-null, non-empty!) css class. Flush that buffer. (No further effects on the list stack!) -
reduce_span
Substitute the "css class for the rest, which has no own class" -
reduce_switchOff
Do the same asreduce_span(String)
, but additionally set the onclick-action, iff ToolOptions.visibility is dynamic. -
insert_switchOff
Do the same asreduce_switchOff(String, ToolOptions.visibility)
, but not with accumulated source text, but with synthetic, explicit text (probably in a Dtd "comment" syntax !-)
Is required for insertion of external parameter entities and additional print-outs like graphics and analyses! -
reduce_element_reference
protected void reduce_element_reference()Output either a link to the definition, as calculated by the global "object to anchor" mechanisms, or a span, iff the reference is void/dangling!
INCLUDES PARSING, ie. everything before the name has been flushed from theconsumed
buffer, and no component of the name has been parsed/consumed. -
reduce_entity_reference
Output either a link to the definition, as calculated by the global "object to anchor" mechanisms, or a span, iff the reference is void/dangling!
INCLUDES PARSING, ie. everything before the lead-in character has been flushed from theconsumed
buffer, and the lead-in character has just been recognized, but not consumed. -
scanForReferences_contentModel
protected void scanForReferences_contentModel()Parses an element definition's content model and outputs all sub-segments correctly wrapped to the html element list. IGNORES all syntactic structure, except explicit parameter entity references, plain identifiers and the special identifier for content models. (All other character data is copies transparently into the current output buffer and reduced at the end of this method into on span element one level above!) Assume "#EMPTY" already intercepted one level above. -
scanForReferences_attOrEnt
protected void scanForReferences_attOrEnt(boolean inSingleQuotes, boolean inDoubleQuotes, boolean possiblyElementRefs) Parses the definition string of a entity defintion, or a whole sequence of attribute definition entries. IGNORES all syntactic structure, except explicit entity references, and quoted string constants. Is called for top-level of attribute list and for the defining text of an entity declaration, both after the name(). So even the top-level quotes are not yet recognized when entering. Can be called recursively at most three times (due to quote variants). -
s
protected void s()Parsing function for non-optional whitespace, at those places where expansion pf PEs is allowed. MUST only be called from TOP-LEVEL dtd parser. The PEs referred to must expand to "files" (=external pe), and syntactically to a sequnence of zero or more COMPLETE top-level mark-up declarations. (MUST NOT be called INSIDE of attlist or element decl, for these situations there are DEDICATED parsing routines!)- Overrides:
s
in classTunedDTDParser
-
xmlDecl
Description copied from class:TunedDTDParser
Parsing function.- Overrides:
xmlDecl
in classTunedDTDParser
-
includeTrailingWs
protected void includeTrailingWs()Consume whitespace before the "close span region()" is called, so that the whitespace will be part of collapsing/exploding/skipping. -
pi
Description copied from class:TunedDTDParser
Parsing function.- Overrides:
pi
in classTunedDTDParser
-
comment
Description copied from class:TunedDTDParser
Parsing function.- Overrides:
comment
in classTunedDTDParser
-
elementDecl
Parsing AND rendering function, EXTENDED COPY of super():- Overrides:
elementDecl
in classTunedDTDParser
-
content_match
-
conditionalSection
Parsing function.- Overrides:
conditionalSection
in classTunedDTDParser
-
entityDecl
Parsing AND rendering function, EXTENDED COPY of super():- Overrides:
entityDecl
in classTunedDTDParser
-
skip_entityDef
protected void skip_entityDef() -
collectAttlistSource
-
attlistDecl
Parsing AND rendering function, DEEPLY CHANGED COPY of super(): Entities can appear anywhere and cover more than one "column". Relies on ">" not appearing outside of (single/double) quotes.- Overrides:
attlistDecl
in classTunedDTDParser
-
initModes
Sets the global boolean flags etc. according to the supplied options. Non-trivial interdependencies are calculated. Output differences accumulates the diagnosis whether and why the pure text differs from the original. -
intern
Option still does not use enumerations. Go from int via string array to interal enumeration value! FIXME -
readMode
protected ToolOptions.visibility readMode(boolean present, boolean isFileInsert, boolean isAdditional, String name, ToolOptions.visibility code, ToolOptions options) Processes on/off/onOff/offOn-switches. (1) whether feasible, otherwise trunc them, (2) collect whether result is dynamic, (3) add diagnosis which category in initial doc state differs from original. -
makeHeadline_dtd_coords
-
makeMassSwitches
protected void makeMassSwitches(boolean withInstructions) assume only called if "htmlIsDynamic==true" -
checkMassSwitch
protected void checkMassSwitch(ToolOptions.visibility visible, boolean present, String text, String cssClass, List<Element_span.Content> ons, List<Element_span.Content> offs) -
makeSvg
protected void makeSvg(File outputfile, String title, Multimap<String, String> relation, String altText, String switchText, String mapIdentifier, ToolOptions.visibility visibility) DOCME -
append_list_all_references
-
insertAlphaindex
-
insertAnalyses
-
printHtml
public void printHtml(Writer output, String dtdFileName, String outfilename, @Opt @Opt File outputdir, ToolOptions options, String cmdLineText) Main (currently: the only) entry method after constructor call. Writes an html rendering to the output. ATTENTION mode xhtml_stand_alone CURRENTLY WRITES NOTHING ?? FIXME
Called from dtm.Tool.main and from tdom.TDOM_Main.
ATTENTION renderedDtd.js COUNTS pre-elements and ASSUMES nr 2 contains all expandable items FIXME !!- Parameters:
output
- theWriter
to create the html file.dtdFileName
- DOCMEoutfilename
- local name of the written html text, used only to derive the names of the svg files, if any (and for one single warning, if it ends not with "html")outputdir
- directory of the written html text, there the svg files will be placed. When null, svg generation is suppressed.options
- needed for all the fine-tuning switches. Can come from a command line, or can be constructed explicitly when html rendering is initiated programmatically. (Therefore the options already decoded into the other method parameters are ignored.)cmdLineText
- DOCME
-