public abstract class AbstractMarkupParser extends Object
The result will be an Markup object, which is basically a list, containing Wicket relevant tags and RawMarkup.
IMarkupFilter
,
MarkupFactory
,
MarkupSettings
Modifier and Type | Field and Description |
---|---|
static Pattern |
CONDITIONAL_COMMENT_OPENING
Opening a conditional comment section, which is NOT treated as a comment section
|
Constructor and Description |
---|
AbstractMarkupParser(IXmlPullParser xmlParser,
MarkupResourceStream resource)
Constructor.
|
AbstractMarkupParser(MarkupResourceStream resource)
Constructor.
|
AbstractMarkupParser(String markup)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
compressWhitespace(String rawMarkup)
Remove whitespace from the raw markup
|
List<IMarkupFilter> |
getMarkupFilters() |
protected MarkupResourceStream |
getMarkupResourceStream()
Applications which subclass initFilterChain() might also wish to access the markup resource
stream.
|
protected CharSequence |
handleRawText(String rawMarkup) |
protected abstract List<IMarkupFilter> |
initializeMarkupFilters(Markup markup)
Create a new markup filter chain and initialize with all default filters required.
|
Markup |
parse()
Reads and parses markup from a file.
|
protected void |
postProcess(Markup markup) |
void |
setWicketNamespace(String namespace)
In case you want to analyze markup which BY DEFAULT does not use "wicket" to find relevant
tags.
|
String |
toString() |
public static final Pattern CONDITIONAL_COMMENT_OPENING
public AbstractMarkupParser(MarkupResourceStream resource)
resource
- The markup resource (file)public AbstractMarkupParser(String markup)
markup
- The markup resource.public AbstractMarkupParser(IXmlPullParser xmlParser, MarkupResourceStream resource)
xmlParser
- The streaming xml parser to read and parse the markupresource
- The markup resource (file)public List<IMarkupFilter> getMarkupFilters()
public final void setWicketNamespace(String namespace)
namespace
- protected MarkupResourceStream getMarkupResourceStream()
protected abstract List<IMarkupFilter> initializeMarkupFilters(Markup markup)
markup
- public final Markup parse() throws IOException, ResourceStreamNotFoundException
IOException
ResourceStreamNotFoundException
protected void postProcess(Markup markup)
markup
- protected CharSequence handleRawText(String rawMarkup)
rawMarkup
- protected String compressWhitespace(String rawMarkup)
rawMarkup
- public String toString()
toString
in class Object
Object.toString()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.