Package org.apache.xalan.xsltc.compiler.util

Examples of org.apache.xalan.xsltc.compiler.util.ErrorMsg


        node.setLineNumber(line);
// System.out.println("e = " + text + " " + node);
        return node;
    }
      }
      reportError(ERROR, new ErrorMsg(ErrorMsg.XPATH_PARSER_ERR,
              expression, parent));
  }
  catch (Exception e) {
      if (_xsltc.debug()) e.printStackTrace();
      reportError(ERROR, new ErrorMsg(ErrorMsg.XPATH_PARSER_ERR,
              expression, parent));
  }

  // Return a dummy pattern (which is an expression)
  SyntaxTreeNode.Dummy.setParser(this);
View Full Code Here


     * Prints all compile-time errors
     */
    public void printErrors() {
  final int size = _errors.size();
  if (size > 0) {
      System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));
      for (int i = 0; i < size; i++) {
    System.err.println("  " + _errors.elementAt(i));
      }
  }
    }
View Full Code Here

     * Prints all compile-time warnings
     */
    public void printWarnings() {
  final int size = _warnings.size();
  if (size > 0) {
      System.err.println(new ErrorMsg(ErrorMsg.COMPILER_WARNING_KEY));
      for (int i = 0; i < size; i++) {
    System.err.println("  " + _warnings.elementAt(i));
      }
  }
    }
View Full Code Here

  final String prefix = (col == -1) ? null : qname.substring(0, col);

  SyntaxTreeNode element = makeInstance(uri, prefix,
          localname, attributes);
  if (element == null) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR,
          prefix+':'+localname);
      throw new SAXException(err.toString());
  }

  // If this is the root element of the XML document we need to make sure
  // that it contains a definition of the XSL namespace URI
  if (_root == null) {
View Full Code Here

     */
    public void setErrorListener(ErrorListener listener)
  throws IllegalArgumentException
    {
  if (listener == null) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
          "TransformerFactory");
            throw new IllegalArgumentException(err.toString());
  }
  _errorListener = listener;
    }
View Full Code Here

      else
        return Boolean.FALSE;
  }

  // Throw an exception for all other attributes
  ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
  throw new IllegalArgumentException(err.toString());
    }
View Full Code Here

    return;
      }
  }

  // Throw an exception for all other attributes
  final ErrorMsg err
      = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
  throw new IllegalArgumentException(err.toString());
    }
View Full Code Here

    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

     return _type;
  }
  if (_arg instanceof LiteralExpr) {
      return _type = Type.Boolean;
  }
  ErrorMsg err = new ErrorMsg(ErrorMsg.NEED_LITERAL_ERR,
      "function-available", this);
  throw new TypeCheckError(err);
    }
View Full Code Here

  // Report and error if more than one stylesheet defined
  final Stylesheet sheet = stable.addStylesheet(_name, this);
  if (sheet != null) {
      // Error: more that one stylesheet defined
      ErrorMsg err = new ErrorMsg(ErrorMsg.MULTIPLE_STYLESHEET_ERR,this);
      parser.reportError(Constants.ERROR, err);
  }

  // If this is a simplified stylesheet we must create a template that
  // grabs the root node of the input doc ( <xsl:template match="/"/> ).
View Full Code Here

TOP

Related Classes of org.apache.xalan.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.