| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Verifier
handles XML checks on names, data, and other
verification tasks for JDOM.
Method Summary | |
final static String | checkAttributeName(String name) This will check the supplied name to see if it valid for use as a JDOM Attribute name. |
final static String | checkCDATASection(String data) This will ensure that the data for a CDATA
section is appropriate. |
final static String | checkCharacterData(String text) This will check the supplied string to see if it only contains characters allowed by the XML 1.0 specification. |
final static String | checkCommentData(String data) This will ensure that the data for a Comment
is appropriate. |
final static String | checkElementName(String name) This will check the supplied name to see if it valid for use as a JDOM Element name. |
final static String | checkNamespacePrefix(String prefix) This will check the supplied name to see if it valid for use as a JDOM Namespace prefix. |
final static String | checkNamespaceURI(String uri) This will check the supplied name to see if it valid for use as a JDOM Namespace URI. |
final static String | checkProcessingInstructionTarget(String target) This will check the supplied name to see if it valid for use as a JDOM processing instruction target. |
static boolean | isXMLCharacter(char c) This is a utility function for determining whether a specified character is a character according to production 2 of the XML 1.0 specification. |
static boolean | isXMLCombiningChar(char c) This is a utility function for determining whether a specified character is a combining character according to production 87 of the XML 1.0 specification. |
static boolean | isXMLDigit(char c) This is a utility function for determining whether a specified Unicode character is a digit according to production 88 of the XML 1.0 specification. |
static boolean | isXMLExtender(char c) This is a utility function for determining whether a specified character is an extender according to production 88 of the XML 1.0 specification. |
static boolean | isXMLLetter(char c) This is a utility function for determining whether a specified character is a letter according to production 84 of the XML 1.0 specification. |
static boolean | isXMLLetterOrDigit(char c) This is a utility function for determining whether a specified character is a letter or digit according to productions 84 and 88 of the XML 1.0 specification. |
static boolean | isXMLNameCharacter(char c) This is a utility function for determining whether a specified character is a name character according to production 4 of the XML 1.0 specification. |
static boolean | isXMLNameStartCharacter(char c) This is a utility function for determining whether a specified character is a legal name start character according to production 5 of the XML 1.0 specification. |
static void | main(String[] args) |
Method Detail |
public final static String checkAttributeName(String name)
This will check the supplied name to see if it valid for use as
a JDOM Attribute
name.
String
name to check.String
- reason name is invalid, or
null
if name is OK.public final static String checkCDATASection(String data)
This will ensure that the data for a CDATA
section is appropriate.
String
data to check.String
- reason data is invalid, or
null
is name is OK.public final static String checkCharacterData(String text)
This will check the supplied string to see if it only contains characters allowed by the XML 1.0 specification. The C0 controls (e.g. null, vertical tab, formfeed, etc.) are specifically excluded except for carriage return, linefeed, and the horizontal tab. Surrogates are also excluded.
This method is useful for checking element content and attribute values. Note that characters like " and < are allowed in attribute values and element content. They will simply be escaped as " or < when the value is serialized.
String
value to check.String
- reason name is invalid, or
null
if name is OK.public final static String checkCommentData(String data)
This will ensure that the data for a Comment
is appropriate.
String
data to check.String
- reason data is invalid, or
null
is name is OK.public final static String checkElementName(String name)
This will check the supplied name to see if it valid for use as
a JDOM Element
name.
String
name to check.String
- reason name is invalid, or
null
if name is OK.public final static String checkNamespacePrefix(String prefix)
This will check the supplied name to see if it valid for use as
a JDOM Namespace
prefix.
String
prefix to check.String
- reason name is invalid, or
null
if name is OK.public final static String checkNamespaceURI(String uri)
This will check the supplied name to see if it valid for use as
a JDOM Namespace
URI.
String
URI to check.String
- reason name is invalid, or
null
if name is OK.public final static String checkProcessingInstructionTarget(String target)
This will check the supplied name to see if it valid for use as a JDOM processing instruction target.
String
target to check.String
- reason target is invalid, or
null
if name is OK.public static boolean isXMLCharacter(char c)
This is a utility function for determining whether a specified character is a character according to production 2 of the XML 1.0 specification.
char
to check for XML compliance.boolean
- true if it's a character,
false otherwise.public static boolean isXMLCombiningChar(char c)
This is a utility function for determining whether a specified character is a combining character according to production 87 of the XML 1.0 specification.
char
to check.boolean
- true if it's a combining character,
false otherwise.public static boolean isXMLDigit(char c)
This is a utility function for determining whether a specified Unicode character is a digit according to production 88 of the XML 1.0 specification.
char
to check for XML digit compliance.boolean
- true if it's a digit, false otherwise.public static boolean isXMLExtender(char c)
This is a utility function for determining whether a specified character is an extender according to production 88 of the XML 1.0 specification.
char
to check.String
- true if it's an extender, false otherwise.public static boolean isXMLLetter(char c)
This is a utility function for determining whether a specified character is a letter according to production 84 of the XML 1.0 specification.
char
to check for XML name compliance.String
- true if it's a letter, false otherwise.public static boolean isXMLLetterOrDigit(char c)
This is a utility function for determining whether a specified character is a letter or digit according to productions 84 and 88 of the XML 1.0 specification.
char
to check.boolean
- true if it's letter or digit,
false otherwise.public static boolean isXMLNameCharacter(char c)
This is a utility function for determining whether a specified character is a name character according to production 4 of the XML 1.0 specification.
char
to check for XML name compliance.boolean
- true if it's a name character,
false otherwise.public static boolean isXMLNameStartCharacter(char c)
This is a utility function for determining whether a specified character is a legal name start character according to production 5 of the XML 1.0 specification. This production does allow names to begin with colons which the Namespaces in XML Recommendation disallows.
char
to check for XML name start compliance.boolean
- true if it's a name start character,
false otherwise.public static void main(String[] args)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |