gnu.xml

Class XName

Implemented Interfaces:
Comparable, Externalizable, EnvironmentKey

public class XName
extends Symbol
implements Externalizable

A QName with namespace nodes [and future optional type annotation].

Field Summary

Fields inherited from class gnu.mapping.Symbol

FUNCTION, PLIST, name

Fields inherited from interface gnu.mapping.EnvironmentKey

FUNCTION

Constructor Summary

XName()
XName(Symbol symbol, NamespaceBinding namespaceNodes)

Method Summary

static int
checkName(String value)
Check if a string is a valid NMTOKEN, Name, or NCName.
NamespaceBinding
getNamespaceNodes()
Namespace nodes associated with an element.
static boolean
isNCName(String value)
static boolean
isName(String value)
static boolean
isNamePart(int ch)
static boolean
isNameStart(int ch)
static boolean
isNmToken(String value)
void
readExternal(ObjectInput in)
void
setNamespaceNodes(NamespaceBinding nodes)
void
writeExternal(ObjectOutput out)

Methods inherited from class gnu.mapping.Symbol

compareTo, equals, equals, getKeyProperty, getKeySymbol, getLocalName, getLocalPart, getName, getNamespace, getNamespaceURI, getPrefix, hasEmptyNamespace, hashCode, make, make, makeUninterned, makeWithUnknownNamespace, matches, matches, parse, readExternal, readResolve, setNamespace, toString, writeExternal

Constructor Details

XName

public XName()

XName

public XName(Symbol symbol,
             NamespaceBinding namespaceNodes)

Method Details

checkName

public static int checkName(String value)
Check if a string is a valid NMTOKEN, Name, or NCName.
Returns:
2 if string is an NCName; otherwise 1 if string is a Name; otherwise 0 if string is an NMTOKEN; otherwise -1.

getNamespaceNodes

public final NamespaceBinding getNamespaceNodes()
Namespace nodes associated with an element. These are in inverse document/parse order.

isNCName

public static boolean isNCName(String value)

isName

public static boolean isName(String value)

isNamePart

public static boolean isNamePart(int ch)

isNameStart

public static boolean isNameStart(int ch)

isNmToken

public static boolean isNmToken(String value)

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException
Overrides:
readExternal in interface Symbol

setNamespaceNodes

public final void setNamespaceNodes(NamespaceBinding nodes)

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException
Overrides:
writeExternal in interface Symbol