Xalan-C++ API Reference  1.12.0
ProblemListener.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALAN_PROBLEMLISTENER_HEADER_GUARD)
19 #define XALAN_PROBLEMLISTENER_HEADER_GUARD
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
29 
30 
31 
32 namespace XALAN_CPP_NAMESPACE {
33 
34 
35 
36 class ElemTemplateElement;
37 class XalanNode;
38 class PrintWriter;
39 
40 
41 
42 /**
43  * This is the abstract class that the XSL processor uses when it has a
44  * problem of some kind, that requires a message, an error or a warning. Users
45  * should ask the XSLTProcessor class to setProblemListener if they wish an
46  * object instance to be called when a problem event occurs.
47  */
49 {
50 public:
51 
52  // A typedef for compatibility.
54 
56 
57  virtual
58  ~ProblemListener();
59 
60  // These interfaces are inherited from ProblemListenerBase...
61  virtual void
62  setPrintWriter(PrintWriter* pw) = 0;
63 
64  virtual void
65  problem(
66  eSource source,
67  eClassification classification,
68  const XalanDOMString& msg,
69  const Locator* locator,
70  const XalanNode* sourceNode) = 0;
71 
72  virtual void
73  problem(
74  eSource source,
75  eClassification classification,
76  const XalanDOMString& msg,
77  const XalanNode* sourceNode) = 0;
78 
79 
80  // This interface is new to ProblemListenerBase...
81  /**
82  * Function that is called when a problem event occurs. This function
83  * is deprecated. Use the overload with the Locator parameter instead.
84  * @deprecated
85  *
86  * @param source either eXMLPARSER, eXSLPROCESSOR, or eXPATH
87  * @param classification either eMESSAGE, eERROR or eWARNING
88  * @param sourceNode source tree node where the problem occurred
89  * (may be 0)
90  * @param styleNode style tree node where the problem occurred
91  * (may be 0)
92  * @param msg string message explaining the problem.
93  * @param uri the URI of the document where the problem occurred. May be 0.
94  * @param lineNo line number where the problem occurred.
95  * @param charOffset character offset where the problem.
96  */
97  virtual void
98  problem(
99  eSource source,
100  eClassification classification,
101  const XalanNode* sourceNode,
102  const ElemTemplateElement* styleNode,
103  const XalanDOMString& msg,
104  const XalanDOMChar* uri,
105  XalanFileLoc lineNo,
106  XalanFileLoc charOffset) = 0;
107 };
108 
109 
110 
111 }
112 
113 
114 
115 #endif // XALAN_PROBLEMLISTENER_HEADER_GUARD
xalanc::ProblemListener::eProblemSource
eSource eProblemSource
Definition: ProblemListener.hpp:53
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
xalanc::ElemTemplateElement
Definition: ElemTemplateElement.hpp:79
xalanc::ProblemListenerBase::eSource
eSource
Definition: ProblemListenerBase.hpp:62
xalanc::ProblemListener
This is the abstract class that the XSL processor uses when it has a problem of some kind,...
Definition: ProblemListener.hpp:48
xalanc::PrintWriter
Definition: PrintWriter.hpp:37
xalanc::ProblemListenerBase::eClassification
eClassification
Definition: ProblemListenerBase.hpp:75
XSLTDefinitions.hpp
xalanc::ProblemListenerBase
This is the abstract class that is used when reporting a problem some kind, that requires a message,...
Definition: ProblemListenerBase.hpp:56
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
ProblemListenerBase.hpp