|
|
|||
File indexing completed on 2025-12-15 10:32:52
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_DTDHANDLER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DTDHANDLER_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 /** 0030 * Receive notification of basic DTD-related events. 0031 * 0032 * <p>If a SAX application needs information about notations and 0033 * unparsed entities, then the application implements this 0034 * interface and registers an instance with the SAX parser using 0035 * the parser's setDTDHandler method. The parser uses the 0036 * instance to report notation and unparsed entity declarations to 0037 * the application.</p> 0038 * 0039 * <p>The SAX parser may report these events in any order, regardless 0040 * of the order in which the notations and unparsed entities were 0041 * declared; however, all DTD events must be reported after the 0042 * document handler's startDocument event, and before the first 0043 * startElement event.</p> 0044 * 0045 * <p>It is up to the application to store the information for 0046 * future use (perhaps in a hash table or object tree). 0047 * If the application encounters attributes of type "NOTATION", 0048 * "ENTITY", or "ENTITIES", it can use the information that it 0049 * obtained through this interface to find the entity and/or 0050 * notation corresponding with the attribute value.</p> 0051 * 0052 * <p>The HandlerBase class provides a default implementation 0053 * of this interface, which simply ignores the events.</p> 0054 * 0055 * @see Parser#setDTDHandler 0056 * @see HandlerBase#HandlerBase 0057 */ 0058 0059 class SAX_EXPORT DTDHandler 0060 { 0061 public: 0062 /** @name Constructors and Destructor */ 0063 //@{ 0064 /** Default Constructor */ 0065 DTDHandler() 0066 { 0067 } 0068 0069 /** Destructor */ 0070 virtual ~DTDHandler() 0071 { 0072 } 0073 0074 //@} 0075 0076 /** @name The DTD handler interface */ 0077 //@{ 0078 /** 0079 * Receive notification of a notation declaration event. 0080 * 0081 * <p>It is up to the application to record the notation for later 0082 * reference, if necessary.</p> 0083 * 0084 * <p>If a system identifier is present, and it is a URL, the SAX 0085 * parser must resolve it fully before passing it to the 0086 * application.</p> 0087 * 0088 * @param name The notation name. 0089 * @param publicId The notation's public identifier, or null if 0090 * none was given. 0091 * @param systemId The notation's system identifier, or null if 0092 * none was given. 0093 * @exception SAXException Any SAX exception, possibly 0094 * wrapping another exception. 0095 * @see #unparsedEntityDecl 0096 * @see AttributeList#AttributeList 0097 */ 0098 virtual void notationDecl 0099 ( 0100 const XMLCh* const name 0101 , const XMLCh* const publicId 0102 , const XMLCh* const systemId 0103 ) = 0; 0104 0105 /** 0106 * Receive notification of an unparsed entity declaration event. 0107 * 0108 * <p>Note that the notation name corresponds to a notation 0109 * reported by the notationDecl() event. It is up to the 0110 * application to record the entity for later reference, if 0111 * necessary.</p> 0112 * 0113 * <p>If the system identifier is a URL, the parser must resolve it 0114 * fully before passing it to the application.</p> 0115 * 0116 * @exception SAXException Any SAX exception, possibly 0117 * wrapping another exception. 0118 * @param name The unparsed entity's name. 0119 * @param publicId The entity's public identifier, or null if none 0120 * was given. 0121 * @param systemId The entity's system identifier (it must always 0122 * have one). 0123 * @param notationName The name of the associated notation. 0124 * @see #notationDecl 0125 * @see AttributeList#AttributeList 0126 */ 0127 virtual void unparsedEntityDecl 0128 ( 0129 const XMLCh* const name 0130 , const XMLCh* const publicId 0131 , const XMLCh* const systemId 0132 , const XMLCh* const notationName 0133 ) = 0; 0134 0135 /** 0136 * Reset the DocType object on its reuse 0137 * 0138 * <p>This method helps in reseting the DTD object implementation 0139 * defaults each time the DTD is begun.</p> 0140 * 0141 */ 0142 virtual void resetDocType() = 0; 0143 0144 //@} 0145 0146 private : 0147 /* Unimplemented constructors and operators */ 0148 0149 /* Copy constructor */ 0150 DTDHandler(const DTDHandler&); 0151 0152 /* Assignment operator */ 0153 DTDHandler& operator=(const DTDHandler&); 0154 0155 }; 0156 0157 XERCES_CPP_NAMESPACE_END 0158 0159 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|