Package net.sf.xslthl.highlighters
Class XMLHighlighter
- java.lang.Object
-
- net.sf.xslthl.Highlighter
-
- net.sf.xslthl.WholeHighlighter
-
- net.sf.xslthl.highlighters.XMLHighlighter
-
public class XMLHighlighter 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 XMLHighlighter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultStyle()The default style namebooleanhighlight(CharIter in, java.util.List<Block> out)Perform highlighting on the current token stream.voidinit(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:HighlighterInitializer- Overrides:
initin classWholeHighlighter- Throws:
HighlighterConfigurationException
-
highlight
public boolean highlight(CharIter in, java.util.List<Block> out)
Description copied from class:HighlighterPerform highlighting on the current token stream. Return true when highlighting was performed, or false in case of a false positive.- Specified by:
highlightin classHighlighter- Returns:
-
getDefaultStyle
public java.lang.String getDefaultStyle()
Description copied from class:HighlighterThe default style name- Specified by:
getDefaultStylein classHighlighter- Returns:
-
-