org.apache.wicket.markup.parser
Interface IMarkupFilter

All Known Subinterfaces:
IXmlPullParser
All Known Implementing Classes:
AbstractMarkupFilter, EnclosureHandler, HeadForceTagIdHandler, HtmlHandler, HtmlHeaderSectionHandler, HtmlProblemFinder, OpenCloseTagExpander, RelativePathPrefixHandler, TagTypeHandler, WicketLinkTagHandler, WicketMessageTagHandler, WicketNamespaceHandler, WicketRemoveTagHandler, WicketTagIdentifier, XmlPullParser

public interface IMarkupFilter

Wicket uses a streaming XML parser to read the markup. A chain of IMarkupFilters is used e.g. to remove comments, allow for html typical markup (some tags don't need to be closed explicitly), etc.

The streaming XML parser must implement IMarkupFilter itself and thus is usually the first element of the chain.

Author:
Juergen Donnerstag
See Also:
MarkupParser

Method Summary
 IMarkupFilter getParent()
          IMarkupFilters are usually chained with the last filter being an XML parser.
 MarkupElement nextTag()
          Get the next MarkupElement from the parent MarkupFilter and handle it if the specific filter criteria are met.
 void setParent(IMarkupFilter parent)
          Set parent filter.
 

Method Detail

getParent

IMarkupFilter getParent()
IMarkupFilters are usually chained with the last filter being an XML parser. The getParent() method returns the next filter in the chain.

Returns:
The next filter in the chain, or null if the last one.

nextTag

MarkupElement nextTag()
                      throws java.text.ParseException
Get the next MarkupElement from the parent MarkupFilter and handle it if the specific filter criteria are met. Depending on the filter, it may return the MarkupElement unchanged, modified or remove it by asking the parent handler for the next tag.

Returns:
Return the next eligible MarkupElement
Throws:
java.text.ParseException

setParent

void setParent(IMarkupFilter parent)
Set parent filter.

Parameters:
parent - The next element in the chain


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.