boolean parseMarkupDecl()
      throws XMLMiddlewareException, MalformedURLException, IOException, EOFException
   {
      String name;

      // This function returns true if it finds a markup declaration; false
      // if it doesn't.

      if (!isChar('<')) return false;
      if (isString("!--"))
      {
         parseComment();
      }
      else if (isChar('!'))
      {
         name = getName();

         switch (dtdTokens.getToken(name))
         {
            case DTDConst.KEYWD_TOKEN_ELEMENT:
               parseElementDecl();
               break;

            case DTDConst.KEYWD_TOKEN_ATTLIST:
               parseAttlistDecl();
               break;

            case DTDConst.KEYWD_TOKEN_ENTITY:
               parseEntityDecl();
               break;

            case DTDConst.KEYWD_TOKEN_NOTATION:
               parseNotationDecl();
               break;

            default:
               throwXMLMiddlewareException("Invalid markup declaration: <!" + name);
         }
      }
      else if (isChar('?'))
      {
         parsePI();
      }
      else
      {
         return false;
      }
      return true;
   }