|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.xml.XMLCharTok
public class XMLCharTok
The XMLCharTok class provides identity functions for some of the fundamental character and token XML Productions, as described in the XML 1.0 2nd Edition W3C Recommendation. Please see Appendix B for detailed notes about character classes and other Unicode-related issues.
NOTE: This class has been amended to reflect changes to name character and whitespace handling found in the XML 1.1 Working Draft (as of 25 April 2002). Methods affected include isNameStartChar(char), isNameChar(char), and isSpace(char), as well as any methods affected by these changes. New methods include isLineBreakChar(char), isLineBreakSequence(char,char), isNameStartChar10(char) and isNameChar10(String). Not all changes are marked, so unless "10" appears in the method name it should be assumed that (a) the method is not affected, or (b) it incorporates XML 1.1 changes.
Changed methods are marked CHANGED.
New methods are marked NEW.
| Constructor Summary | |
|---|---|
XMLCharTok()
|
|
| Method Summary | |
|---|---|
static boolean |
containsMarkup(String s)
Returns true if the String s contains any XML markup characters, including <, >, &, or the String "]]>". |
static boolean |
isBaseChar(char c)
Returns true if char c is a member of BaseChar [XML 1.0 production 85]. |
static boolean |
isChar(char c)
Returns true if char c is a member of Char [XML 1.0 production 2]. |
static boolean |
isCombiningChar(char c)
Returns true if char c is a member of CombiningChar [XML 1.0 production 87]. |
static boolean |
isDigit(char c)
Returns true if char c is a member of Digit [XML 1.0 production 88]. |
static boolean |
isExtender(char c)
Returns true if char c is a member of Extender [XML 1.0 production 89]. |
static boolean |
isHexChar(char c)
Returns true if the character is a hexidecimal character [0-9A-F]. |
static boolean |
isIdeographic(char c)
Returns true if char c is a member of Ideographic [XML 1.0 production 86]. |
static boolean |
isLetter(char c)
Returns true if char c is a member of Letter [XML 1.0 production 84]. |
static boolean |
isLineBreakChar(char c)
Returns true if char c is a recognized line break character, as described in the XML 1.1 Working Draft. |
static boolean |
isLineBreakSequence(char thisChar,
char nextChar)
Returns true if the current char thisChar and the next character after it nextChar follow certain patterns considered as a line break sequence, as described in the XML 1.1 Working Draft. |
static boolean |
isName(String s)
Returns true if String s conforms to Name [XML 1.1 production 5]. |
static boolean |
isName10(String s)
Returns true if String s conforms to Name [XML 1.0 production 5]. |
static boolean |
isNameChar(char c)
Returns true if char c is a member of NameChar [XML 1.1 production 4a]. |
static boolean |
isNameChar10(char c)
Returns true if char c is a member of NameChar [XML 1.0 production 4]. |
static boolean |
isNames(String s)
Returns true if String s conforms to Names [XML 1.0 production 6], a whitespace-delimited list of XML Names. |
static boolean |
isNameStartChar(char c)
Returns true if char c is an allowed first character of an XML 1.1 Name [XML 1.1 production 4]. |
static boolean |
isNameStartChar10(char c)
Returns true if char c is an allowed first character of an XML Name [XML 1.0 production 4]. |
static boolean |
isNmtoken(String s)
Returns true if String s conforms to Nmtoken [XML 1.0 production 7]. |
static boolean |
isNmtokens(String s)
Returns true if String s conforms to Names [XML 1.0 production 8], a whitespace-delimited list of XML Nmtokens (Name tokens). |
static boolean |
isPubidChar(char c)
Returns true if char c is a PubidChar [XML 1.0 production 13]. |
static boolean |
isPubidLiteral(String s)
Returns true if the String s conforms to PubidLiteral [XML Production 12], including the single- or double-quote delimiters. |
static boolean |
isSpace(char c)
Returns true if char c is a member of S (space) [XML 1.1 production 3]. |
static boolean |
isSpace(String s)
Returns true if the String s is completely composed of whitespace. |
static boolean |
isSpace10(char c)
Returns true if char c is a member of S (space) [XML 1.0 production 3]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLCharTok()
| Method Detail |
|---|
public static boolean containsMarkup(String s)
public static boolean isChar(char c)
public static boolean isSpace(char c)
public static boolean isSpace10(char c)
public static boolean isLineBreakChar(char c)
public static boolean isLineBreakSequence(char thisChar,
char nextChar)
NOTE: This is substantially the same as XML 1.0 except
for changes from Unicode and for use of XML on IBM mainframes.
Any sequence of characters that fulfills this method (i.e.,
returning true) is to be normalized to a single 0x0A (linefeed)
character. Because this method returns true in cases where
nextChar is part of the line break sequence, this next
character must be tested and removed when it is a 0x0A or 0x85.
NEW.
See note on XML 1.1 changes.
public static boolean isNameChar(char c)
public static boolean isNameChar10(char c)
public static boolean isNameStartChar10(char c)
public static boolean isNameStartChar(char c)
public static boolean isName(String s)
public static boolean isName10(String s)
public static boolean isNames(String s)
public static boolean isNmtoken(String s)
public static boolean isNmtokens(String s)
public static boolean isSpace(String s)
public static boolean isLetter(char c)
public static boolean isBaseChar(char c)
public static boolean isIdeographic(char c)
public static boolean isCombiningChar(char c)
public static boolean isDigit(char c)
public static boolean isExtender(char c)
public static boolean isPubidChar(char c)
public static boolean isPubidLiteral(String s)
public static boolean isHexChar(char c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||