public boolean isValid() {
   return baseType.isValid(buffer.toString(), context);
 }
 public void checkValid() throws DatatypeException {
   baseType.checkValid(buffer.toString(), context);
 }
 public void addCharacters(char[] buf, int start, int len) {
   // append characters to the current buffer.
   buffer.append(buf, start, len);
 }