|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.jdom.Verifier
Verifier handles XML checks on names, data, and other
verification tasks for JDOM.
| Method Summary | |
static java.lang.String |
checkAttributeName(java.lang.String name)
This will check the supplied name to see if it is legal for use as a JDOM name. |
static java.lang.String |
checkCDATASection(java.lang.String data)
This will check the supplied data to see if it is legal for use as JDOM . |
static java.lang.String |
checkCharacterData(java.lang.String text)
This will check the supplied string to see if it only contains characters allowed by the XML 1.0 specification. |
static java.lang.String |
checkCommentData(java.lang.String data)
This will check the supplied data to see if it is legal for use as JDOM data. |
static java.lang.String |
checkElementName(java.lang.String name)
This will check the supplied name to see if it is legal for use as a JDOM name. |
static java.lang.String |
checkNamespaceCollision(Attribute attribute,
Element element)
Check if 's namespace collides with a
's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Attribute attribute)
Check if a collides with a
's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Element element)
Check if a collides with a
's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
java.util.List list)
Check if a collides with any namespace
from a list of objects. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Namespace other)
Check if two namespaces collide. |
static java.lang.String |
checkNamespacePrefix(java.lang.String prefix)
This will check the supplied name to see if it is legal for use as a JDOM prefix. |
static java.lang.String |
checkNamespaceURI(java.lang.String uri)
This will check the supplied name to see if it is legal for use as a JDOM URI. |
static java.lang.String |
checkProcessingInstructionTarget(java.lang.String target)
This will check the supplied data to see if it is legal for use as a JDOM target. |
static java.lang.String |
checkPublicID(java.lang.String publicID)
This will ensure that the data for a public identifier is legal. |
static java.lang.String |
checkSystemLiteral(java.lang.String systemLiteral)
This will ensure that the data for a system literal is legal. |
static java.lang.String |
checkXMLName(java.lang.String name)
This is a utility function for sharing the base process of checking any XML name. |
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(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final java.lang.String checkElementName(java.lang.String name)
This will check the supplied name to see if it is legal for use as
a JDOM name.
Element
name - String name to check.
String - reason name is illegal, or
null if name is OK.public static final java.lang.String checkAttributeName(java.lang.String name)
This will check the supplied name to see if it is legal for use as
a JDOM name.
Attribute
name - String name to check.
String - reason name is illegal, or
null if name is OK.public static final java.lang.String checkCharacterData(java.lang.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 - reason name is illegal, or
null if name is OK.public static final java.lang.String checkCDATASection(java.lang.String data)
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.public static final java.lang.String checkNamespacePrefix(java.lang.String prefix)
This will check the supplied name to see if it is legal for use as
a JDOM prefix.
Namespace
prefix - String prefix to check.
String - reason name is illegal, or
null if name is OK.public static final java.lang.String checkNamespaceURI(java.lang.String uri)
This will check the supplied name to see if it is legal for use as
a JDOM URI.
Namespace
uri - String URI to check.
String - reason name is illegal, or
null if name is OK.
public static final java.lang.String checkNamespaceCollision(Namespace namespace,
Namespace other)
Check if two namespaces collide.
namespace - Namespace to check.other - Namespace to check agianst.
String - reason for collision, or
null if no collision.
public static final java.lang.String checkNamespaceCollision(Attribute attribute,
Element element)
Check if 's namespace collides with a
Attribute's namespace.
Element
attribute - Attribute to check.element - Element to check agianst.
String - reason for collision, or
null if no collision.
public static final java.lang.String checkNamespaceCollision(Namespace namespace,
Element element)
Check if a collides with a
Namespace's namespace.
Element
namespace - Namespace to check.element - Element to check agianst.
String - reason for collision, or
null if no collision.
public static final java.lang.String checkNamespaceCollision(Namespace namespace,
Attribute attribute)
Check if a collides with a
Namespace's namespace.
Attribute
namespace - Namespace to check.attribute - Attribute to check agianst.
String - reason for collision, or
null if no collision.
public static final java.lang.String checkNamespaceCollision(Namespace namespace,
java.util.List list)
Check if a collides with any namespace
from a list of objects.
Namespace
namespace - Namespace to check.list - List to check agianst.
String - reason for collision, or
null if no collision.public static final java.lang.String checkProcessingInstructionTarget(java.lang.String target)
This will check the supplied data to see if it is legal for use as
a JDOM target.
ProcessingInstruction
target - String target to check.
String - reason target is illegal, or
null if target is OK.public static final java.lang.String checkCommentData(java.lang.String data)
This will check the supplied data to see if it is legal for use as
JDOM data.
Comment
data - String data to check.
String - reason data is illegal, or
null if data is OK.public static final java.lang.String checkPublicID(java.lang.String publicID)
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.public static final java.lang.String checkSystemLiteral(java.lang.String systemLiteral)
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.public static java.lang.String checkXMLName(java.lang.String name)
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.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.
c - char to check for XML compliance.
boolean - true if it's a character,
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.
c - 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.
c - char to check for XML name start compliance.
boolean - true if it's a name start character,
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.
c - char to check.
boolean - true if it's letter or digit,
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.
c - char to check for XML name compliance.
String - true if it's a letter, 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.
c - char to check.
boolean - true if it's a combining character,
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.
c - char to check.
String - true if it's an extender, 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.
c - char to check for XML digit compliance.
boolean - true if it's a digit, false otherwise.public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||