Top Description Constructors Methods
com.sun.msv.scanner.dtd

public Class XmlNames

extends Object
Class Inheritance

This class contains static methods used to determine whether identifiers may appear in certain roles in XML documents. Such methods are used both to parse and to create such documents.
Author
David Brownell
Version
1.1, 00/08/05

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean
isName(String
the string being tested
value
)

Returns true if the value is a legal XML name.

public static boolean
isNCNmtoken(String
the string being tested
token
)

This method returns true if the identifier is a "name token" as defined by the XML Namespaces proposed recommendation.

public static boolean
isNmtoken(String
the string being tested
token
)

This method returns true if the identifier is a "name token" as defined in the XML specification.

public static boolean
isQualifiedName(String
the string being tested
value
)

Returns true if the value is a legal "qualified" XML name, as defined in the XML Namespaces proposed recommendation.

public static boolean
isUnqualifiedName(String
the string being tested
value
)

Returns true if the value is a legal "unqualified" XML name, as defined in the XML Namespaces proposed recommendation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XmlNamesback to summary
private XmlNames()

Method Detail

isNameback to summary
public static boolean isName(String value)

Returns true if the value is a legal XML name.

Parameters
value:String

the string being tested

isNCNmtokenback to summary
public static boolean isNCNmtoken(String token)

This method returns true if the identifier is a "name token" as defined by the XML Namespaces proposed recommendation. These are like XML "name tokens" but they may not contain the "colon" character.

Parameters
token:String

the string being tested

See Also
isNmtoken
isNmtokenback to summary
public static boolean isNmtoken(String token)

This method returns true if the identifier is a "name token" as defined in the XML specification. Like names, these may only contain "name characters"; however, they do not need to have letters as their initial characters. Attribute values defined to be of type NMTOKEN(S) must satisfy this predicate.

Parameters
token:String

the string being tested

isQualifiedNameback to summary
public static boolean isQualifiedName(String value)

Returns true if the value is a legal "qualified" XML name, as defined in the XML Namespaces proposed recommendation. Qualified names are composed of an optional prefix (an unqualified name), followed by a colon, and a required "local part" (an unqualified name). Prefixes are declared, and correspond to particular URIs which scope the "local part" of the name. (This method cannot check whether the prefix of a name has been declared.)

Parameters
value:String

the string being tested

isUnqualifiedNameback to summary
public static boolean isUnqualifiedName(String value)

Returns true if the value is a legal "unqualified" XML name, as defined in the XML Namespaces proposed recommendation. These are normal XML names, except that they may not contain a "colon" character.

Parameters
value:String

the string being tested