Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.msv.scanner.dtd
Class XmlChars

    java.lang.Object
      com.sun.msv.scanner.dtd.XmlChars

public class XmlChars
extends java.lang.Object

Methods in this class are used to determine whether characters may appear in certain roles in XML documents. Such methods are used both to parse and to create such documents.

Version:
  1.1, 00/08/05
Author:
  David Brownell

Method Summary
`static boolean` | `isChar(int ucs4char)` Returns true if the argument, a UCS-4 character code, is valid in XML documents.
`static boolean` | `isLetter(char c)` Returns true if the character is an XML "letter".
`static boolean` | `isNameChar(char c)` Returns true if the character is allowed to be a non-initial character in names according to the XML recommendation.
`static boolean` | `isNCNameChar(char c)` Returns true if the character is allowed to be a non-initial character in unscoped names according to the rules of the XML Namespaces proposed recommendation.
`static boolean` | `isSpace(char c)` Returns true if the character is allowed where XML supports whitespace characters, false otherwise.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isChar

    public static boolean isChar(int ucs4char)

  Returns true if the argument, a UCS-4 character code, is valid in XML documents. Unicode characters fit into the low sixteen bits of a UCS-4 character, and pairs of Unicode surrogate characters can be combined to encode UCS-4 characters in documents containing only Unicode. (The `char` datatype in the Java Programming Language represents Unicode characters, including unpaired surrogates.)

  In XML, UCS-4 characters can also be encoded by the use of character references such as &#x12345678;, which happens to refer to a character that is disallowed in XML documents. UCS-4 characters allowed in XML documents can be expressed with one or two Unicode characters.

  Parameters:
    `ucs4char` - The 32-bit UCS-4 character being tested.

### isNameChar

    public static boolean isNameChar(char c)

  Returns true if the character is allowed to be a non-initial character in names according to the XML recommendation.

  See Also:
    `isNCNameChar(char)`, `isLetter(char)`

### isNCNameChar

    public static boolean isNCNameChar(char c)

  Returns true if the character is allowed to be a non-initial character in unscoped names according to the rules of the XML Namespaces proposed recommendation. Except for precluding the colon (used to separate names from their scopes) these characters are just as allowed by the XML recommendation.

  See Also:
    `isNameChar(char)`, `isLetter(char)`

### isSpace

    public static boolean isSpace(char c)

  Returns true if the character is allowed where XML supports whitespace characters, false otherwise.

### isLetter

    public static boolean isLetter(char c)

  Returns true if the character is an XML "letter". XML Names must start with Letters or a few other characters, but other characters in names must only satisfy the isNameChar predicate.

  See Also:
    `isNameChar(char)`, `isNCNameChar(char)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD