Package net.sf.xslthl.highlighters
Class HTMLHighlighter
- java.lang.Object
-
- net.sf.xslthl.Highlighter
-
- net.sf.xslthl.WholeHighlighter
-
- net.sf.xslthl.highlighters.HTMLHighlighter
-
public class HTMLHighlighter extends WholeHighlighter
XML/SGML highlighter. It has a couple of default styles: tag, attribute, value, directive. Accepted parameters:- elementSet
- Specialized highlighting for set elements
- elementPrefix
- Specialized highlighting for element prefixes
- styleElement
- The style to use for elements, defaults to 'tag'
- styleAttributes
- The style to use for attributes, defaults to 'attribute'
- styleValue
- The style to use for attribute values, defaults to 'value'
- stylePi
- The style to use for processing instructions, defaults to 'directive'
- styleComment
- The style to use for comments, defaults to 'comment'
- styleDoctype
- The style to use for the doctype declaration, defaults to 'doccomment'
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.xslthl.Highlighter
Highlighter.IgnoreCaseComparator
-
-
Field Summary
-
Fields inherited from class net.sf.xslthl.Highlighter
XMLname
-
-
Constructor Summary
Constructors Constructor Description HTMLHighlighter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultStyle()
The default style nameboolean
highlight(CharIter in, java.util.List<Block> out)
Perform highlighting on the current token stream.void
init(Params params)
Initializer-
Methods inherited from class net.sf.xslthl.Highlighter
isNewLine, reset, startsWith
-
-
-
-
Method Detail
-
init
public void init(Params params) throws HighlighterConfigurationException
Description copied from class:Highlighter
Initializer- Overrides:
init
in classWholeHighlighter
- Throws:
HighlighterConfigurationException
-
highlight
public boolean highlight(CharIter in, java.util.List<Block> out)
Description copied from class:Highlighter
Perform highlighting on the current token stream. Return true when highlighting was performed, or false in case of a false positive.- Specified by:
highlight
in classHighlighter
- Returns:
-
getDefaultStyle
public java.lang.String getDefaultStyle()
Description copied from class:Highlighter
The default style name- Specified by:
getDefaultStyle
in classHighlighter
- Returns:
-
-