org.apache.wicket.markup.parser
Class TagStack

java.lang.Object
  extended by org.apache.wicket.markup.parser.TagStack

public class TagStack
extends java.lang.Object

Stack to push and pop HTML elements asserting its structure.


Constructor Summary
TagStack()
           
 
Method Summary
 void assertValidInStack(ComponentTag tag)
          Assert that tag has no mismatch error.
 void debug()
          Configure this stack to call log.debug at operations
 ComponentTag getNotClosedTag()
           
static boolean hasEqualTagName(ComponentTag tag1, ComponentTag tag2)
          Compare tag name including namespace
static boolean requiresCloseTag(java.lang.String name)
          Gets whether this tag does not require a closing tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagStack

public TagStack()
Method Detail

assertValidInStack

public void assertValidInStack(ComponentTag tag)
                        throws java.text.ParseException
Assert that tag has no mismatch error. If the parameter is an open tag, just push it on stack to be tested latter.

Parameters:
tag -
Throws:
java.text.ParseException

getNotClosedTag

public ComponentTag getNotClosedTag()
Returns:
not closed tag

debug

public void debug()
Configure this stack to call log.debug at operations


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.