org.apache.wicket.markup.parser.filter
Class HtmlHandler

java.lang.Object
  extended by org.apache.wicket.markup.parser.AbstractMarkupFilter
      extended by org.apache.wicket.markup.parser.filter.HtmlHandler
All Implemented Interfaces:
IMarkupFilter

public final class HtmlHandler
extends AbstractMarkupFilter

This is a markup inline filter. It identifies HTML specific issues which make HTML not 100% xml compliant. E.g. tags like <p> often are missing the corresponding close tag.

Author:
Juergen Donnerstag

Constructor Summary
HtmlHandler()
          Construct.
 
Method Summary
static boolean hasEqualTagName(ComponentTag tag1, ComponentTag tag2)
          Compare tag name including namespace
protected  MarkupElement onComponentTag(ComponentTag tag)
          Invoked when a ComponentTag was found.
 void postProcess(Markup markup)
          Called after all filters have been processed.
static boolean requiresCloseTag(java.lang.String name)
          Gets whether this tag does not require a closing tag.
 
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
getNextFilter, nextElement, onSpecialTag, setNextFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlHandler

public HtmlHandler()
Construct.

Method Detail

postProcess

public void postProcess(Markup markup)
Description copied from interface: IMarkupFilter
Called after all filters have been processed.

Specified by:
postProcess in interface IMarkupFilter
Overrides:
postProcess in class AbstractMarkupFilter

onComponentTag

protected MarkupElement onComponentTag(ComponentTag tag)
                                throws java.text.ParseException
Description copied from class: AbstractMarkupFilter
Invoked when a ComponentTag was found.

By default this method is also called for WicketTags.

Specified by:
onComponentTag in class AbstractMarkupFilter
Returns:
Usually the same as the tag attribute
Throws:
java.text.ParseException

requiresCloseTag

public static boolean requiresCloseTag(java.lang.String name)
Gets whether this tag does not require a closing tag.

Parameters:
name - The tag's name, e.g. a, br, div, etc.
Returns:
True if this tag does not require a closing tag

hasEqualTagName

public static boolean hasEqualTagName(ComponentTag tag1,
                                      ComponentTag tag2)
Compare tag name including namespace

Parameters:
tag1 -
tag2 -
Returns:
true if name and namespace are equal


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.