Class WebHelpStep
- java.lang.Object
-
- com.xmlmind.w2x.processor.ProcessStep
-
- com.xmlmind.w2x.processor.SplitStep
-
- com.xmlmind.w2x.processor.WebHelpStep
-
public class WebHelpStep extends SplitStep
This processing step is used to convert input XHTML+CSS document (typically created using aConvertStep) or input semantic XHTML document (typically created using aEditSteprunning "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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classWebHelpStep.EntryElement-
Nested classes/interfaces inherited from class com.xmlmind.w2x.processor.SplitStep
SplitStep.Part
-
-
Field Summary
Fields Modifier and Type Field Description protected static NameANCHOR_NAMEprotected static StringDOCUMENT_READYprotected static NameENTRY_NAMEprotected static NameINDEX_NAMEprotected static NameMERGE_AND_SORT_NAMEprotected static PrefixEntry[]PREFIX_ENTRIESprotected static NameREF_NAMEprotected static NameSEE_NAMEprotected static NameTERM_NAMEprotected static NameTITLE_NAMEprotected static NameTOC_NAMEprotected static NamespaceWHC_NSprotected static StringWINDOW_ONLOAD-
Fields inherited from class com.xmlmind.w2x.processor.SplitStep
COLS_ATTR, FRAME_ELEM, FRAMESET_ELEM, SCROLLING_ATTR, TOC_CSS
-
Fields inherited from class com.xmlmind.w2x.processor.ProcessStep
stepName
-
-
Constructor Summary
Constructors Constructor Description WebHelpStep(String stepName)Constructs a WebHelpStep having specified name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompileWebHelp(List<SplitStep.Part> parts, File tocFile, File indexFile, Map<String,String> parameters, ProgressMonitor monitor)protected DocumentcreatePartTemplate(Document xhtmlDoc)protected static booleanisDebug(ProgressMonitor monitor)protected voidlinkIndexTerm(Element entry, String[] parentTerms, Map<String,WebHelpStep.EntryElement> fullTermToEntry, Map<String,WebHelpStep.EntryElement> simpleTermToEntry, Map<String,Element[]> textToSee)protected voidlinkIndexTerms(List<Element> indexEntries)protected FilenewOutFile(File file, int partNum)voidprocess(Object[] state, Map<String,String> parameters, int[] stepCounter, ProgressMonitor monitor)Execute this processing step.protected voidprocessIndexTerms(Element tree, String partHref, boolean strict, List<Element> indexEntries)protected Element[]processIndexTerms(List<SplitStep.Part> parts)protected voidsaveDocument(Document doc, boolean indent, String encoding, File file, ProgressMonitor monitor)protected voidsaveIndex(Element[] indexEntries, String lang, File file, ProgressMonitor monitor)protected voidsaveTOC(List<SplitStep.Part> parts, boolean omitTOCRoot, File file, ProgressMonitor monitor)protected ElementtoIndexEntry(Element indexTerm, String id, String partHref)protected DocumenttoTOC(List<SplitStep.Part> parts, boolean omitTOCRoot)-
Methods inherited from class com.xmlmind.w2x.processor.SplitStep
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
-
Methods inherited from class com.xmlmind.w2x.processor.ProcessStep
debugParameters, equals, getAllParameters, getBooleanParameter, getFileParameter, getIntParameter, getParameter, getURLParameter, hashCode, illegalState, joinAllParameters, missingParameter, parameterName, progress, toString, urlOrFile
-
-
-
-
Field Detail
-
WHC_NS
protected static final Namespace WHC_NS
-
PREFIX_ENTRIES
protected static final PrefixEntry[] PREFIX_ENTRIES
-
TOC_NAME
protected static final Name TOC_NAME
-
ENTRY_NAME
protected static final Name ENTRY_NAME
-
TITLE_NAME
protected static final Name TITLE_NAME
-
INDEX_NAME
protected static final Name INDEX_NAME
-
MERGE_AND_SORT_NAME
protected static final Name MERGE_AND_SORT_NAME
-
TERM_NAME
protected static final Name TERM_NAME
-
ANCHOR_NAME
protected static final Name ANCHOR_NAME
-
SEE_NAME
protected static final Name SEE_NAME
-
REF_NAME
protected static final Name REF_NAME
-
WINDOW_ONLOAD
protected static final String WINDOW_ONLOAD
- See Also:
- Constant Field Values
-
DOCUMENT_READY
protected static final String DOCUMENT_READY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebHelpStep
public WebHelpStep(String stepName)
Constructs a WebHelpStep having specified name.
-
-
Method Detail
-
process
public void process(Object[] state, Map<String,String> parameters, int[] stepCounter, ProgressMonitor monitor) throws Exception
Description copied from class:SplitStepExecute this processing step.state[0]contains:- Before this method is executed: an XHTML+CSS document
(typically created using a
ConvertStep). - After this method is executed: the save file containing the frameset.
- Overrides:
processin classSplitStep- Parameters:
state- contains the current state of processing: aDocumentor aFile.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
statearray with a newDocumentorFileto pass the result/output of this step to the next step.parameters- all the parameters passed to theProcessorowning 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 stepsInvoking convenience method
ProcessStep.progress(java.lang.String, int[], com.xmlmind.util.ProgressMonitor)suffices to make good use of bothmonitorandstepCounter.- Throws:
Exception- if for any reason, this method fails
- Before this method is executed: an XHTML+CSS document
(typically created using a
-
createPartTemplate
protected Document createPartTemplate(Document xhtmlDoc) throws Exception
- Overrides:
createPartTemplatein classSplitStep- Throws:
Exception
-
newOutFile
protected File newOutFile(File file, int partNum)
- Overrides:
newOutFilein classSplitStep
-
processIndexTerms
protected Element[] processIndexTerms(List<SplitStep.Part> parts)
-
processIndexTerms
protected void processIndexTerms(Element tree, String partHref, boolean strict, List<Element> indexEntries)
-
linkIndexTerm
protected void linkIndexTerm(Element entry, String[] parentTerms, Map<String,WebHelpStep.EntryElement> fullTermToEntry, Map<String,WebHelpStep.EntryElement> simpleTermToEntry, Map<String,Element[]> textToSee)
-
saveDocument
protected void saveDocument(Document doc, boolean indent, String encoding, File file, ProgressMonitor monitor) throws CanceledException, IOException
- Overrides:
saveDocumentin classSplitStep- Throws:
CanceledExceptionIOException
-
saveTOC
protected void saveTOC(List<SplitStep.Part> parts, boolean omitTOCRoot, File file, ProgressMonitor monitor) throws CanceledException, IOException
- Throws:
CanceledExceptionIOException
-
toTOC
protected Document toTOC(List<SplitStep.Part> parts, boolean omitTOCRoot)
-
saveIndex
protected void saveIndex(Element[] indexEntries, String lang, File file, ProgressMonitor monitor) throws CanceledException, IOException
- Throws:
CanceledExceptionIOException
-
compileWebHelp
protected void compileWebHelp(List<SplitStep.Part> parts, File tocFile, File indexFile, Map<String,String> parameters, ProgressMonitor monitor) throws Exception
- Throws:
Exception
-
isDebug
protected static final boolean isDebug(ProgressMonitor monitor)
-
-