public class XML11Char extends Object
A series of convenience methods are supplied to ease the burden
of the developer. Using the character as an index into the XML11CHARS
array and applying the appropriate mask flag (e.g.
MASK_VALID
), yields the same results as calling the
convenience methods. There is one exception: check the comments
for the isValid
method for details.
Modifier and Type | Field and Description |
---|---|
static int |
MASK_XML11_CONTENT
XML 1.1 content for external entities (valid - "special" chars - control chars)
|
static int |
MASK_XML11_CONTENT_INTERNAL
XML 1.1 content for internal entities (valid - "special" chars)
|
static int |
MASK_XML11_CONTROL
XML 1.1 control character mask
|
static int |
MASK_XML11_NAME
XML 1.1 Name character mask.
|
static int |
MASK_XML11_NAME_START
XML 1.1 Name start character mask.
|
static int |
MASK_XML11_NCNAME
XML namespaces 1.1 NCName
|
static int |
MASK_XML11_NCNAME_START
XML namespaces 1.1 NCNameStart
|
static int |
MASK_XML11_SPACE
XML 1.1 Space character mask.
|
static int |
MASK_XML11_VALID
XML 1.1 Valid character mask.
|
Constructor and Description |
---|
XML11Char() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isXML11Content(int c)
Returns true if the specified character can be considered
content in an external parsed entity.
|
static boolean |
isXML11InternalEntityContent(int c)
Returns true if the specified character can be considered
content in an internal parsed entity.
|
static boolean |
isXML11Invalid(int c)
Returns true if the specified character is invalid.
|
static boolean |
isXML11Name(int c)
Returns true if the specified character is a valid name
character as defined by production [4a] in the XML 1.1
specification.
|
static boolean |
isXML11NameHighSurrogate(int c)
Returns whether the given character is a valid
high surrogate for a name character.
|
static boolean |
isXML11NameStart(int c)
Returns true if the specified character is a valid name start
character as defined by production [4] in the XML 1.1
specification.
|
static boolean |
isXML11NCName(int c)
Returns true if the specified character is a valid NCName
character as defined by production [5] in Namespaces in XML
1.1 recommendation.
|
static boolean |
isXML11NCNameStart(int c)
Returns true if the specified character is a valid NCName start
character as defined by production [4] in Namespaces in XML
1.1 recommendation.
|
static boolean |
isXML11Space(int c)
Returns true if the specified character is a space character
as amdended in the XML 1.1 specification.
|
static boolean |
isXML11Valid(int c)
Returns true if the specified character is valid.
|
static boolean |
isXML11ValidLiteral(int c)
Returns true if the specified character is valid and permitted outside
of a character reference.
|
static boolean |
isXML11ValidName(String name)
Check to see if a string is a valid Name according to [5]
in the XML 1.1 Recommendation
|
static boolean |
isXML11ValidNCName(String ncName)
Check to see if a string is a valid NCName according to [4]
from the XML Namespaces 1.1 Recommendation
|
static boolean |
isXML11ValidNmtoken(String nmtoken)
Check to see if a string is a valid Nmtoken according to [7]
in the XML 1.1 Recommendation
|
static boolean |
isXML11ValidQName(String str)
Simple check to determine if qname is legal.
|
public static final int MASK_XML11_VALID
public static final int MASK_XML11_SPACE
public static final int MASK_XML11_NAME_START
public static final int MASK_XML11_NAME
public static final int MASK_XML11_CONTROL
public static final int MASK_XML11_CONTENT
public static final int MASK_XML11_NCNAME_START
public static final int MASK_XML11_NCNAME
public static final int MASK_XML11_CONTENT_INTERNAL
public static boolean isXML11Space(int c)
c
- The character to check.public static boolean isXML11Valid(int c)
If the program chooses to apply the mask directly to the
XML11CHARS
array, then they are responsible for checking
the surrogate character range.
c
- The character to check.public static boolean isXML11Invalid(int c)
c
- The character to check.public static boolean isXML11ValidLiteral(int c)
c
- The character to check.public static boolean isXML11Content(int c)
c
- The character to check.public static boolean isXML11InternalEntityContent(int c)
c
- The character to check.public static boolean isXML11NameStart(int c)
c
- The character to check.public static boolean isXML11Name(int c)
c
- The character to check.public static boolean isXML11NCNameStart(int c)
c
- The character to check.public static boolean isXML11NCName(int c)
c
- The character to check.public static boolean isXML11NameHighSurrogate(int c)
c
- The character to check.public static boolean isXML11ValidName(String name)
name
- string to checkpublic static boolean isXML11ValidNCName(String ncName)
ncName
- string to checkpublic static boolean isXML11ValidNmtoken(String nmtoken)
nmtoken
- string to checkpublic static boolean isXML11ValidQName(String str)
Copyright © 2020 JBoss by Red Hat. All rights reserved.