Class StaticError


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

      Constructors 
      Constructor Description
      StaticError​(javax.xml.transform.TransformerException err)  
      StaticError​(javax.xml.transform.TransformerException err, boolean isWarning)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      The coloumn number locating the error within a query or stylesheet module
      QName getErrorCode()
      The error code, as a QName.
      java.lang.String getInstructionName()
      Get a name identifying the kind of instruction, in terms meaningful to a user.
      int getLineNumber()
      The line number locating the error within a query or stylesheet module
      java.lang.String getMessage()
      Return the error message associated with this error
      java.lang.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)
      java.lang.String getPath()
      Get the absolute XPath expression that identifies the node within its document where the error occurred, if available
      XPathException getUnderlyingException()
      Return the underlying exception.
      boolean isTypeError()
      Indicate whether this condition is a type error.
      boolean isWarning()
      Indicate whether this error is being reported as a warning condition.
      void setWarning​(boolean warning)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StaticError

        public StaticError​(javax.xml.transform.TransformerException err,
                           boolean isWarning)
      • StaticError

        public StaticError​(javax.xml.transform.TransformerException err)
    • 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 java.lang.String getMessage()
        Return the error message associated with this error
        Returns:
        String
      • getModuleUri

        public java.lang.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 java.lang.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 java.lang.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