Package com.sun.org.apache.xalan.internal.xsltc.compiler.util

Examples of com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg


    public void parseContents(Parser parser) {

  // Get the required attributes and parser XPath expressions
        final String name = getAttribute("name");
        if (!XML11Char.isXML11ValidQName(name)){
            ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this);
            parser.reportError(Constants.ERROR, err);          
        }
       
        // Parse key name and add to symbol table
        _name = parser.getQNameIgnoreDefaultNs(name);
View Full Code Here


      // Handle xsl:use-attribute-sets. Attribute sets are placed first
      // in the vector or attributes to make sure that later local
      // attributes can override an attributes in the set.
      if (qname == parser.getUseAttributeSets()) {
              if (!Util.isValidQNames(val)) {
                    ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, val, this);
                    parser.reportError(Constants.ERROR, err)
               }
    setFirstAttribute(new UseAttributeSets(val, parser));
      }
      // Handle xsl:extension-element-prefixes
View Full Code Here

    }

    public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  final int argc = argumentCount();
  if (argc > 1) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this);
      throw new TypeCheckError(err);
  }

  if (argc > 0) {
      argument().typeCheck(stable);
View Full Code Here

    public static void printUsage() {
        StringBuffer vers = new StringBuffer("XSLTC version " +
      VERSION_MAJOR + "." + VERSION_MINOR +
      ((VERSION_DELTA > 0) ? ("."+VERSION_DELTA) : ("")));
  System.err.println(vers + "\n" +
    new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR));
  if (_allowExit) System.exit(-1);       
    }
View Full Code Here

      boolean compileOK;

      if (useStdIn) {
    if (!classNameSet) {
        System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
                    if (_allowExit) System.exit(-1);
    }
    compileOK = xsltc.compile(System.in, xsltc.getClassName());
      }
      else {
View Full Code Here

    public void parseContents(Parser parser) {
  // Get the name of these decimal formatting symbols
        final String name = getAttribute("name");
        if (name.length() > 0) {
            if (!XML11Char.isXML11ValidQName(name)){
                ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this);
                parser.reportError(Constants.ERROR, err);          
            }
        }
        _name = parser.getQNameIgnoreDefaultNs(name);
        if (_name == null) {
View Full Code Here

     * @param error The error code (from util/ErrorMsg).
     * @param message Any additional error message.
     */
    protected void reportError(SyntaxTreeNode element, Parser parser,
             String errorCode, String message) {
  final ErrorMsg error = new ErrorMsg(errorCode, message, element);
        parser.reportError(Constants.ERROR, error);
    }
View Full Code Here

     * @param error The error code (from util/ErrorMsg).
     * @param message Any additional error message.
     */
    protected  void reportWarning(SyntaxTreeNode element, Parser parser,
          String errorCode, String message) {
  final ErrorMsg error = new ErrorMsg(errorCode, message, element);
        parser.reportError(Constants.WARNING, error);
    }
View Full Code Here

   
    public void parseContents(Parser parser) {
  final String useSets = getAttribute("use-attribute-sets");
  if (useSets.length() > 0) {
            if (!Util.isValidQNames(useSets)) {
                ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this);
                parser.reportError(Constants.ERROR, err)
            }   
      _useSets = new UseAttributeSets(useSets, parser);
  }
  parseChildren(parser);
View Full Code Here

     */
    public Type typeCheck(SymbolTable stable) throws TypeCheckError {

  // Check that the function was passed exactly two arguments
  if (argumentCount() != 2) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR,
          getName(), this);
      throw new TypeCheckError(err);
  }

  // The first argument must be a String, or cast to a String
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.