org.apache.wicket.util.parse.metapattern.parsers
Class TagNameParser

java.lang.Object
  extended by org.apache.wicket.util.parse.metapattern.parsers.MetaPatternParser
      extended by org.apache.wicket.util.parse.metapattern.parsers.TagNameParser

public final class TagNameParser
extends MetaPatternParser

Parses XML tag names and attribute names which may include optional namespaces like "namespace:name" or "name". Both ":name" and "namespace:" are not allowed. Both, the namespace and the name have to follow naming rules for variable names (identifier).

Author:
Jonathan Locke, Juergen Donnerstag

Constructor Summary
TagNameParser(java.lang.CharSequence input)
          Constructs a tag name parser for a given input character sequence.
 
Method Summary
 java.lang.String getName()
          Gets the tag name part (eg 'form' in 'html:form' or 'form')
 java.lang.String getNamespace()
          Get the namespace part (eg 'html' in 'html:form') converted to all lower case characters.
 
Methods inherited from class org.apache.wicket.util.parse.metapattern.parsers.MetaPatternParser
advance, atEnd, matcher, matches, setPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagNameParser

public TagNameParser(java.lang.CharSequence input)
Constructs a tag name parser for a given input character sequence.

Parameters:
input - The input to parse
Method Detail

getNamespace

public java.lang.String getNamespace()
Get the namespace part (eg 'html' in 'html:form') converted to all lower case characters.

Returns:
the namespace part. Will be null, if optional namespace was not found

getName

public java.lang.String getName()
Gets the tag name part (eg 'form' in 'html:form' or 'form')

Returns:
the name part


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