public class WebHelpStep extends SplitStep
ConvertStep
) or input
semantic XHTML document (typically created using a EditStep
running "w2x:xed/main.xed") to a Web Help.
The Web Help "compiler" being used here is
XMLmind Web Help
Compiler.
The outline level used to split the input XHTML+CSS document is specified by parameter step_name.split-before-level. This outline level is an integer between 0 and 8 inclusive. Default outline level is 0.
The save file of the Web Help "main" is specified by parameter step_name.out-file.
SplitStep.Part
Modifier and Type | Field and Description |
---|---|
protected static Name |
ANCHOR_NAME |
protected static String |
DOCUMENT_READY |
protected static Name |
ENTRY_NAME |
protected static Name |
INDEX_NAME |
protected static Name |
MERGE_AND_SORT_NAME |
protected static PrefixEntry[] |
PREFIX_ENTRIES |
protected static Name |
SEE_NAME |
protected static Name |
TERM_NAME |
protected static Name |
TITLE_NAME |
protected static Name |
TOC_NAME |
protected static Namespace |
WHC_NS |
protected static String |
WINDOW_ONLOAD |
COLS_ATTR, FRAME_ELEM, FRAMESET_ELEM, SCROLLING_ATTR, TOC_CSS
stepName
Constructor and Description |
---|
WebHelpStep(String stepName)
Constructs a WebHelpStep having specified name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
compileWebHelp(List<SplitStep.Part> parts,
File tocFile,
File indexFile,
Map<String,String> parameters,
ProgressMonitor monitor) |
protected Document |
createPartTemplate(Document xhtmlDoc) |
protected static boolean |
isDebug(ProgressMonitor monitor) |
protected File |
newOutFile(File file,
int partNum) |
void |
process(Object[] state,
Map<String,String> parameters,
int[] stepCounter,
ProgressMonitor monitor)
Execute this processing step.
|
protected void |
processIndexTerms(Element tree,
String partHref,
boolean strict,
List<Element> indexEntries) |
protected Element[] |
processIndexTerms(List<SplitStep.Part> parts) |
protected void |
saveDocument(Document doc,
boolean indent,
String encoding,
File file,
ProgressMonitor monitor) |
protected void |
saveIndex(Element[] indexEntries,
String lang,
File file,
ProgressMonitor monitor) |
protected void |
saveTOC(List<SplitStep.Part> parts,
boolean omitTOCRoot,
File file,
ProgressMonitor monitor) |
protected Element |
toIndexEntry(Element indexTerm,
String id,
String partHref) |
protected Document |
toTOC(List<SplitStep.Part> parts,
boolean omitTOCRoot) |
addPart, collectCounters, collectIds, collectNotes, copyNotes, copyNotes2, createCharsetMeta, createFrameset, createTOCStyle, creatingFile, deleteNotes, findById, findCharset, findCharsetMeta, findNotes, findParentPart, findTitle, fixLinks, getAllText, getBoxFirstChildElement, getOutlineLevel, isNote, isNoteRef, isNoteSeparator, newOutFile, parseCounterPI, parseCounterReset, processCounters, processLinks, processNotes, processNotes2, processParts, resetCounters, saveParts, setNotes, splitDocument, toTOC, useSameChunk
debugParameters, equals, getAllParameters, getBooleanParameter, getFileParameter, getIntParameter, getParameter, getURLParameter, hashCode, illegalState, joinAllParameters, missingParameter, parameterName, progress, toString, urlOrFile
protected static final Namespace WHC_NS
protected static final PrefixEntry[] PREFIX_ENTRIES
protected static final Name TOC_NAME
protected static final Name ENTRY_NAME
protected static final Name TITLE_NAME
protected static final Name INDEX_NAME
protected static final Name MERGE_AND_SORT_NAME
protected static final Name TERM_NAME
protected static final Name ANCHOR_NAME
protected static final Name SEE_NAME
protected static final String WINDOW_ONLOAD
protected static final String DOCUMENT_READY
public WebHelpStep(String stepName)
public void process(Object[] state, Map<String,String> parameters, int[] stepCounter, ProgressMonitor monitor) throws Exception
SplitStep
state[0]
contains:
ConvertStep
).
process
in class SplitStep
state
- contains the current state of processing:
a Document
or a File
.
This object is used as the input of this step and thus, is processed by this step.
After its execution, this method generally updates
the state array with a new Document
or File
to pass the result/output of this step to the next step.
parameters
- all the parameters passed to the Processor
owning and thus executing this process step.
Parameters which are relevant to this processing step are prefixed
with "ProcessStep.stepName
.".
stepCounter
- contains the rank of previously executed
processing step. Must be incremented by this method.monitor
- used to monitor the progress of the processing steps
Invoking convenience method ProcessStep.progress(java.lang.String, int[], com.xmlmind.util.ProgressMonitor)
suffices to
make good use of both monitor and stepCounter.
Exception
- if for any reason, this method failsprotected Document createPartTemplate(Document xhtmlDoc) throws Exception
createPartTemplate
in class SplitStep
Exception
protected File newOutFile(File file, int partNum)
newOutFile
in class SplitStep
protected Element[] processIndexTerms(List<SplitStep.Part> parts)
protected void processIndexTerms(Element tree, String partHref, boolean strict, List<Element> indexEntries)
protected void saveDocument(Document doc, boolean indent, String encoding, File file, ProgressMonitor monitor) throws CanceledException, IOException
saveDocument
in class SplitStep
CanceledException
IOException
protected void saveTOC(List<SplitStep.Part> parts, boolean omitTOCRoot, File file, ProgressMonitor monitor) throws CanceledException, IOException
CanceledException
IOException
protected Document toTOC(List<SplitStep.Part> parts, boolean omitTOCRoot)
protected void saveIndex(Element[] indexEntries, String lang, File file, ProgressMonitor monitor) throws CanceledException, IOException
CanceledException
IOException
protected void compileWebHelp(List<SplitStep.Part> parts, File tocFile, File indexFile, Map<String,String> parameters, ProgressMonitor monitor) throws Exception
Exception
protected static final boolean isDebug(ProgressMonitor monitor)