org.millscript.commons.xml.tokenizer
Class NameTokenizer

java.lang.Object
  extended by org.millscript.commons.xml.tokenizer.NameTokenizer
Direct Known Subclasses:
NamespaceAwareNameTokenizer, NamespaceIgnoreNameTokenizer

public abstract class NameTokenizer
extends java.lang.Object

This class provides a base for tokenizing XML names, depending on whether namespaces are supported by the application or not.


Constructor Summary
NameTokenizer(AbstractXmlTokenizerImpl xt)
          Constructs a new name tokenizer to tokenize a name from the specified tokenizer.
 
Method Summary
abstract  AbstractName readAttributeName()
          Returns a name for an attribute, read from the underlying tokenizer.
abstract  AbstractName readTagName()
          Returns a name for a tag, read from the underlying tokenizer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameTokenizer

public NameTokenizer(AbstractXmlTokenizerImpl xt)
Constructs a new name tokenizer to tokenize a name from the specified tokenizer.

Parameters:
xt - the tokenizer to tokenize a name from
Method Detail

readAttributeName

public abstract AbstractName readAttributeName()
Returns a name for an attribute, read from the underlying tokenizer. This method is provided for reading an attribute name and nothing else, as it only allows qualified names to have a namespace.

Returns:
a ProtoName for the attribute, read from the underlying tokenizer

readTagName

public abstract AbstractName readTagName()
Returns a name for a tag, read from the underlying tokenizer. This method is provided for reading a tag name and nothing else, as it allows tag names to use the default namespace declaration.

Returns:
a ProtoName for the tag, read from the underlying tokenizer


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.