org.apache.xalan.xpath.xml
Class ProblemListenerDefault
java.lang.Object
|
+--org.apache.xalan.xpath.xml.ProblemListenerDefault
- public class ProblemListenerDefault
- extends java.lang.Object
- implements ProblemListener
The implementation of the default error handling for
Xalan.
Constructor Summary |
ProblemListenerDefault()
Create a ProblemListenerDefault using the default output stream (System.err) |
Method Summary |
boolean |
message(java.lang.String msg)
Function that is called to issue a message. |
boolean |
problem(short where,
short classification,
java.lang.Object styleNode,
Node sourceNode,
java.lang.String msg,
java.lang.String id,
int lineNo,
int charOffset)
The default problem listener. |
void |
setDiagnosticsOutput(java.io.PrintWriter pw)
Set where diagnostics will be written. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ProblemListenerDefault
public ProblemListenerDefault()
- Create a ProblemListenerDefault using the default output stream (System.err)
problem
public boolean problem(short where,
short classification,
java.lang.Object styleNode,
Node sourceNode,
java.lang.String msg,
java.lang.String id,
int lineNo,
int charOffset)
- The default problem listener.
- Specified by:
- problem in interface ProblemListener
- Tags copied from interface: ProblemListener
- Parameters:
where
- Either and XMLPARSER, XSLPROCESSOR, or QUERYENGINE.classification
- Either ERROR or WARNING.styleNode
- The style tree node where the problem
occurred. May be null.sourceNode
- The source tree node where the problem
occurred. May be null.msg
- A string message explaining the problem.lineNo
- The line number where the problem occurred,
if it is known. May be zero.charOffset
- The character offset where the problem,
occurred if it is known. May be zero.- Returns:
- true if the return is an ERROR, in which case
exception will be thrown. Otherwise the processor will
continue to process.
message
public boolean message(java.lang.String msg)
- Function that is called to issue a message.
- Specified by:
- message in interface ProblemListener
- Parameters:
msg
- A string message to output.
setDiagnosticsOutput
public void setDiagnosticsOutput(java.io.PrintWriter pw)
- Set where diagnostics will be written. If
the value is null, then diagnostics will be turned
off.