Class StaticError


  • public class StaticError
    extends Object
    The StaticError class contains information about a static error detected during compilation of a stylesheet, query, or XPath expression.
    • Method Detail

      • setWarning

        public void setWarning​(boolean warning)
      • getErrorCode

        public QName getErrorCode()
        The error code, as a QName. May be null if no error code has been assigned
        Returns:
        QName
      • getMessage

        public String getMessage()
        Return the error message associated with this error
        Returns:
        String
      • getModuleUri

        public String getModuleUri()
        The URI of the query or stylesheet module in which the error was detected (as a string) May be null if the location of the error is unknown, or if the error is not localized to a specific module, or if the module in question has no known URI (for example, if it was supplied as an anonymous Stream)
        Returns:
        String
      • getColumnNumber

        public int getColumnNumber()
        The coloumn number locating the error within a query or stylesheet module
        Returns:
        int
      • getLineNumber

        public int getLineNumber()
        The line number locating the error within a query or stylesheet module
        Returns:
        int
      • getInstructionName

        public String getInstructionName()
        Get a name identifying the kind of instruction, in terms meaningful to a user. This method is not used in the case where the instruction name code is a standard name (<1024).
        Returns:
        a name identifying the kind of instruction, in terms meaningful to a user. The name will always be in the form of a lexical XML QName, and should match the name used in explain() output displaying the instruction.
      • isWarning

        public boolean isWarning()
        Indicate whether this error is being reported as a warning condition. If so, applications may ignore the condition, though the results may not be as intended.
        Returns:
        boolean
      • isTypeError

        public boolean isTypeError()
        Indicate whether this condition is a type error.
        Returns:
        boolean
      • getPath

        public String getPath()
        Get the absolute XPath expression that identifies the node within its document where the error occurred, if available
        Returns:
        String - a path expression
      • getUnderlyingException

        public XPathException getUnderlyingException()
        Return the underlying exception. This method may not be stable across Saxon releases.
        Returns:
        XPathException the underlying exception