|
||||
File indexing completed on 2025-01-30 10:27:09
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_LEXICALHANDLER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_LEXICALHANDLER_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 /** 0030 * Receive notification of lexical events. 0031 * 0032 * <p>This is an extension handler for that provides lexical information 0033 * about an XML document. It does not provide information about document 0034 * content. For those events, an application must register an instance of 0035 * a ContentHandler.</p> 0036 * 0037 * <p>The order of events in this interface is very important, and 0038 * mirrors the order of information in the document itself. For 0039 * example, startDTD() and endDTD() events will occur before the 0040 * first element in the document.</p> 0041 * 0042 * @see SAX2XMLReader#setLexicalHandler 0043 * @see SAX2XMLReader#setContentHandler 0044 */ 0045 0046 class SAX2_EXPORT LexicalHandler 0047 { 0048 public: 0049 /** @name Constructors and Destructor */ 0050 //@{ 0051 /** Default constructor */ 0052 LexicalHandler() 0053 { 0054 } 0055 0056 /** Destructor */ 0057 virtual ~LexicalHandler() 0058 { 0059 } 0060 //@} 0061 0062 /** @name The virtual document handler interface */ 0063 0064 //@{ 0065 /** 0066 * Receive notification of comments. 0067 * 0068 * <p>The Parser will call this method to report each occurrence of 0069 * a comment in the XML document.</p> 0070 * 0071 * <p>The application must not attempt to read from the array 0072 * outside of the specified range.</p> 0073 * 0074 * @param chars The characters from the XML document. 0075 * @param length The number of characters to read from the array. 0076 * @exception SAXException Any SAX exception, possibly 0077 * wrapping another exception. 0078 */ 0079 virtual void comment 0080 ( 0081 const XMLCh* const chars 0082 , const XMLSize_t length 0083 ) = 0; 0084 0085 /** 0086 * Receive notification of the end of a CDATA section. 0087 * 0088 * <p>The SAX parser will invoke this method at the end of 0089 * each CDATA parsed.</p> 0090 * 0091 * @exception SAXException Any SAX exception, possibly 0092 * wrapping another exception. 0093 */ 0094 virtual void endCDATA () = 0; 0095 0096 /** 0097 * Receive notification of the end of the DTD declarations. 0098 * 0099 * <p>The SAX parser will invoke this method at the end of the 0100 * DTD</p> 0101 * 0102 * @exception SAXException Any SAX exception, possibly 0103 * wrapping another exception. 0104 */ 0105 virtual void endDTD () = 0; 0106 0107 /** 0108 * Receive notification of the end of an entity. 0109 * 0110 * <p>The SAX parser will invoke this method at the end of an 0111 * entity</p> 0112 * 0113 * @param name The name of the entity that is ending. 0114 * @exception SAXException Any SAX exception, possibly 0115 * wrapping another exception. 0116 */ 0117 virtual void endEntity (const XMLCh* const name) = 0; 0118 0119 /** 0120 * Receive notification of the start of a CDATA section. 0121 * 0122 * <p>The SAX parser will invoke this method at the start of 0123 * each CDATA parsed.</p> 0124 * 0125 * @exception SAXException Any SAX exception, possibly 0126 * wrapping another exception. 0127 */ 0128 virtual void startCDATA () = 0; 0129 0130 /** 0131 * Receive notification of the start of the DTD declarations. 0132 * 0133 * <p>The SAX parser will invoke this method at the start of the 0134 * DTD</p> 0135 * 0136 * @param name The document type name. 0137 * @param publicId The declared public identifier for the external DTD subset, or null if none was declared. 0138 * @param systemId The declared system identifier for the external DTD subset, or null if none was declared. 0139 * @exception SAXException Any SAX exception, possibly 0140 * wrapping another exception. 0141 */ 0142 virtual void startDTD 0143 ( 0144 const XMLCh* const name 0145 , const XMLCh* const publicId 0146 , const XMLCh* const systemId 0147 ) = 0; 0148 0149 /** 0150 * Receive notification of the start of an entity. 0151 * 0152 * <p>The SAX parser will invoke this method at the start of an 0153 * entity</p> 0154 * 0155 * @param name The name of the entity that is starting. 0156 * @exception SAXException Any SAX exception, possibly 0157 * wrapping another exception. 0158 */ 0159 virtual void startEntity (const XMLCh* const name) = 0; 0160 0161 //@} 0162 private : 0163 /* Unimplemented Constructors and operators */ 0164 /* Copy constructor */ 0165 LexicalHandler(const LexicalHandler&); 0166 /** Assignment operator */ 0167 LexicalHandler& operator=(const LexicalHandler&); 0168 }; 0169 0170 XERCES_CPP_NAMESPACE_END 0171 0172 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |