org.basex.util
Class XMLToken

java.lang.Object
  extended by org.basex.util.XMLToken

public final class XMLToken
extends java.lang.Object

This class provides convenience operations for XML-specific character operations.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Method Summary
static boolean isChar(int ch)
          Checks if the specified character is an XML letter.
static boolean isName(byte[] v)
          Checks if the specified token is a valid name.
static boolean isNCChar(int ch)
          Checks if the specified character is an XML letter.
static boolean isNCName(byte[] v)
          Checks if the specified token is a valid NCName.
static boolean isNCStartChar(int ch)
          Checks if the specified character is a name start character, as required e.g.
static boolean isNMToken(byte[] v)
          Checks if the specified token is a valid NMToken.
static boolean isQName(byte[] val)
          Checks if the specified token is a valid QName.
static boolean isStartChar(int ch)
          Checks if the specified character is an XML first-letter.
static boolean valid(int ch)
          Checks if the specified character is a valid XML 1.0 character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

valid

public static boolean valid(int ch)
Checks if the specified character is a valid XML 1.0 character.

Parameters:
ch - the letter to be checked
Returns:
result of check

isNCStartChar

public static boolean isNCStartChar(int ch)
Checks if the specified character is a name start character, as required e.g. by QName and NCName.

Parameters:
ch - character
Returns:
result of check

isNCChar

public static boolean isNCChar(int ch)
Checks if the specified character is an XML letter.

Parameters:
ch - character
Returns:
result of check

isStartChar

public static boolean isStartChar(int ch)
Checks if the specified character is an XML first-letter.

Parameters:
ch - the letter to be checked
Returns:
result of check

isChar

public static boolean isChar(int ch)
Checks if the specified character is an XML letter.

Parameters:
ch - the letter to be checked
Returns:
result of check

isNCName

public static boolean isNCName(byte[] v)
Checks if the specified token is a valid NCName.

Parameters:
v - value to be checked
Returns:
result of check

isName

public static boolean isName(byte[] v)
Checks if the specified token is a valid name.

Parameters:
v - value to be checked
Returns:
result of check

isNMToken

public static boolean isNMToken(byte[] v)
Checks if the specified token is a valid NMToken.

Parameters:
v - value to be checked
Returns:
result of check

isQName

public static boolean isQName(byte[] val)
Checks if the specified token is a valid QName.

Parameters:
val - value to be checked
Returns:
result of check