Static Public Member Functions | |
static String | checkElementName (String name) |
static String | checkAttributeName (String name) |
static String | checkCharacterData (String text) |
static String | checkCDATASection (String data) |
static String | checkNamespacePrefix (String prefix) |
static String | checkNamespaceURI (String uri) |
static String | checkNamespaceCollision (Namespace namespace, Namespace other) |
static String | checkNamespaceCollision (Attribute attribute, Element element) |
static String | checkNamespaceCollision (Namespace namespace, Element element) |
static String | checkNamespaceCollision (Namespace namespace, Attribute attribute) |
static String | checkNamespaceCollision (Namespace namespace, List list) |
static String | checkProcessingInstructionTarget (String target) |
static String | checkProcessingInstructionData (String data) |
static String | checkCommentData (String data) |
static String | checkPublicID (String publicID) |
static String | checkSystemLiteral (String systemLiteral) |
static String | checkXMLName (String name) |
static boolean | isXMLCharacter (char c) |
static boolean | isXMLNameCharacter (char c) |
static boolean | isXMLNameStartCharacter (char c) |
static boolean | isXMLLetterOrDigit (char c) |
static boolean | isXMLLetter (char c) |
static boolean | isXMLCombiningChar (char c) |
static boolean | isXMLExtender (char c) |
static boolean | isXMLDigit (char c) |
Verifier
handles XML checks on names, data, and other verification tasks for JDOM. The class is final and may not be subclassed.
static String org::jdom::Verifier::checkElementName | ( | String | name | ) | [inline, static] |
This will check the supplied name to see if it is legal for use as a JDOM Element
name.
name | String name to check. |
String
- reason name is illegal, or null
if name is OK. static String org::jdom::Verifier::checkAttributeName | ( | String | name | ) | [inline, static] |
This will check the supplied name to see if it is legal for use as a JDOM Attribute
name.
name | String name to check. |
String
- reason name is illegal, or null
if name is OK. static String org::jdom::Verifier::checkCharacterData | ( | String | text | ) | [inline, static] |
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.
text | String value to check. |
String
- reason name is illegal, or null
if name is OK. static String org::jdom::Verifier::checkCDATASection | ( | String | data | ) | [inline, static] |
This will check the supplied data to see if it is legal for use as JDOM CDATA
.
data | String data to check. |
String
- reason data is illegal, or null
is name is OK. static String org::jdom::Verifier::checkNamespacePrefix | ( | String | prefix | ) | [inline, static] |
This will check the supplied name to see if it is legal for use as a JDOM Namespace
prefix.
prefix | String prefix to check. |
String
- reason name is illegal, or null
if name is OK. static String org::jdom::Verifier::checkNamespaceURI | ( | String | uri | ) | [inline, static] |
This will check the supplied name to see if it is legal for use as a JDOM Namespace
URI.
uri | String URI to check. |
String
- reason name is illegal, or null
if name is OK. static String org::jdom::Verifier::checkNamespaceCollision | ( | Namespace | namespace, | |
List | list | |||
) | [inline, static] |
static String org::jdom::Verifier::checkProcessingInstructionTarget | ( | String | target | ) | [inline, static] |
This will check the supplied data to see if it is legal for use as a JDOM ProcessingInstruction
target.
target | String target to check. |
String
- reason target is illegal, or null
if target is OK. static String org::jdom::Verifier::checkProcessingInstructionData | ( | String | data | ) | [inline, static] |
This will check the supplied data to see if it is legal for use as ProcessingInstruction
data. Besides checking that all the characters are allowed in XML, this also checks that the data does not contain the PI end-string "?>".
data | String data to check. |
String
- reason data is illegal, or null
if data is OK. static String org::jdom::Verifier::checkCommentData | ( | String | data | ) | [inline, static] |
This will check the supplied data to see if it is legal for use as JDOM Comment
data.
data | String data to check. |
String
- reason data is illegal, or null
if data is OK. static String org::jdom::Verifier::checkPublicID | ( | String | publicID | ) | [inline, static] |
This will ensure that the data for a public identifier is legal.
publicID | String public ID to check. |
String
- reason public ID is illegal, or null
if public ID is OK. static String org::jdom::Verifier::checkSystemLiteral | ( | String | systemLiteral | ) | [inline, static] |
This will ensure that the data for a system literal is legal.
systemLiteral | String system literal to check. |
String
- reason system literal is illegal, or null
if system literal is OK. static String org::jdom::Verifier::checkXMLName | ( | String | name | ) | [inline, static] |
This is a utility function for sharing the base process of checking any XML name.
name | String to check for XML name compliance. |
String
- reason the name is illegal, or null
if OK. static boolean org::jdom::Verifier::isXMLCharacter | ( | char | c | ) | [inline, static] |
This is a utility function for determining whether a specified character is a character according to production 2 of the XML 1.0 specification.
c | char to check for XML compliance. |
boolean
- true if it's a character, false otherwise. static boolean org::jdom::Verifier::isXMLNameCharacter | ( | char | c | ) | [inline, static] |
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.
c | char to check for XML name compliance. |
boolean
- true if it's a name character, false otherwise. static boolean org::jdom::Verifier::isXMLNameStartCharacter | ( | char | c | ) | [inline, static] |
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.
c | char to check for XML name start compliance. |
boolean
- true if it's a name start character, false otherwise. static boolean org::jdom::Verifier::isXMLLetterOrDigit | ( | char | c | ) | [inline, static] |
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.
c | char to check. |
boolean
- true if it's letter or digit, false otherwise. static boolean org::jdom::Verifier::isXMLLetter | ( | char | c | ) | [inline, static] |
This is a utility function for determining whether a specified character is a letter according to production 84 of the XML 1.0 specification.
c | char to check for XML name compliance. |
String
- true if it's a letter, false otherwise. static boolean org::jdom::Verifier::isXMLCombiningChar | ( | char | c | ) | [inline, static] |
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.
c | char to check. |
boolean
- true if it's a combining character, false otherwise. static boolean org::jdom::Verifier::isXMLExtender | ( | char | c | ) | [inline, static] |
This is a utility function for determining whether a specified character is an extender according to production 88 of the XML 1.0 specification.
c | char to check. |
String
- true if it's an extender, false otherwise. static boolean org::jdom::Verifier::isXMLDigit | ( | char | c | ) | [inline, static] |
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.
c | char to check for XML digit compliance. |
boolean
- true if it's a digit, false otherwise.