JDOM 1.0 | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jdom.Verifier
public final class Verifier
extends java.lang.Object
Method Summary | |
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
static boolean |
|
public static String checkAttributeName(String name)
This will check the supplied name to see if it is legal for use as a JDOMname.
Attribute
- Parameters:
name
-String
name to check.
- Returns:
String
reason name is illegal, ornull
if name is OK.
public static String checkCDATASection(String data)
This will check the supplied data to see if it is legal for use as JDOM.
CDATA
- Parameters:
data
-String
data to check.
- Returns:
String
reason data is illegal, ornull
is name is OK.
public 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.
- Parameters:
text
-String
value to check.
- Returns:
String
reason name is illegal, ornull
if name is OK.
public static String checkCommentData(String data)
This will check the supplied data to see if it is legal for use as JDOMdata.
Comment
- Parameters:
data
-String
data to check.
- Returns:
String
reason data is illegal, ornull
if data is OK.
public static String checkElementName(String name)
This will check the supplied name to see if it is legal for use as a JDOMname.
Element
- Parameters:
name
-String
name to check.
- Returns:
String
reason name is illegal, ornull
if name is OK.
public static String checkNamespaceCollision(Attribute attribute, Element element)
- Parameters:
attribute
-Attribute
to check.element
-Element
to check against.
- Returns:
String
reason for collision, ornull
if no collision.
public static String checkNamespaceCollision(Namespace namespace, List list)
Check if acollides with any namespace from a list of objects.
Namespace
- Parameters:
namespace
-Namespace
to check.list
-List
to check against.
- Returns:
String
reason for collision, ornull
if no collision.
public static String checkNamespaceCollision(Namespace namespace, Attribute attribute)
- Parameters:
namespace
-Namespace
to check.attribute
-Attribute
to check against.
- Returns:
String
reason for collision, ornull
if no collision.
public static String checkNamespaceCollision(Namespace namespace, Element element)
- Parameters:
namespace
-Namespace
to check.element
-Element
to check against.
- Returns:
String
reason for collision, ornull
if no collision.
public static String checkNamespaceCollision(Namespace namespace, Namespace other)
Check if two namespaces collide.
- Parameters:
namespace
-Namespace
to check.other
-Namespace
to check against.
- Returns:
String
reason for collision, ornull
if no collision.
public static String checkNamespacePrefix(String prefix)
This will check the supplied name to see if it is legal for use as a JDOMprefix.
Namespace
- Parameters:
prefix
-String
prefix to check.
- Returns:
String
reason name is illegal, ornull
if name is OK.
public static String checkNamespaceURI(String uri)
This will check the supplied name to see if it is legal for use as a JDOMURI.
Namespace
- Parameters:
uri
-String
URI to check.
- Returns:
String
reason name is illegal, ornull
if name is OK.
public static String checkProcessingInstructionData(String data)
This will check the supplied data to see if it is legal for use asdata. Besides checking that all the characters are allowed in XML, this also checks that the data does not contain the PI end-string "?>".
ProcessingInstruction
- Parameters:
data
-String
data to check.
- Returns:
String
reason data is illegal, ornull
if data is OK.
public static String checkProcessingInstructionTarget(String target)
This will check the supplied data to see if it is legal for use as a JDOMtarget.
ProcessingInstruction
- Parameters:
target
-String
target to check.
- Returns:
String
reason target is illegal, ornull
if target is OK.
public static String checkPublicID(String publicID)
This will ensure that the data for a public identifier is legal.
- Parameters:
publicID
-String
public ID to check.
- Returns:
String
reason public ID is illegal, ornull
if public ID is OK.
public static String checkSystemLiteral(String systemLiteral)
This will ensure that the data for a system literal is legal.
- Parameters:
systemLiteral
-String
system literal to check.
- Returns:
String
reason system literal is illegal, ornull
if system literal is OK.
public static String checkURI(String uri)
Checks a string to see if it is a legal RFC 2396 URI. Both absolute and relative URIs are supported.
- Parameters:
uri
-String
to check.
- Returns:
String
reason the URI is illegal, ornull
if OK.
public static String checkXMLName(String name)
This is a utility function for sharing the base process of checking any XML name.
- Parameters:
name
-String
to check for XML name compliance.
- Returns:
String
reason the name is illegal, ornull
if OK.
public static boolean isHexDigit(char c)
This is a utility function for determining whether a specified Unicode character is a hexadecimal digit as defined in RFC 2396; that is, one of the ASCII characters 0-9, a-f, or A-F
- Parameters:
c
- to check for hex digit.
- Returns:
- true if it's allowed, false otherwise.
public static boolean isURICharacter(char c)
This is a utility function for determining whether a specified Unicode character is legal in URI references as determined by RFC 2396.
- Parameters:
c
-char
to check for URI reference compliance.
- Returns:
- true if it's allowed, false otherwise.
public static boolean isXMLCharacter(int 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.
- Parameters:
c
-char
to check for XML compliance
- Returns:
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.
- Parameters:
c
-char
to check.
- Returns:
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.
- Parameters:
c
-char
to check for XML digit compliance
- Returns:
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.
- Parameters:
c
-char
to check.
- Returns:
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.
- Parameters:
c
-char
to check for XML name compliance.
- Returns:
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.
- Parameters:
c
-char
to check.
- Returns:
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.
- Parameters:
c
-char
to check for XML name compliance.
- Returns:
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.
- Parameters:
c
-char
to check for XML name start compliance.
- Returns:
boolean
true if it's a name start character, false otherwise.
public static boolean isXMLPublicIDCharacter(char c)