|
||||
File indexing completed on 2025-01-18 10:14:57
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_DECLHANDLER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DECLHANDLER_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 /** 0030 * Receive notification of DTD declaration events. 0031 * 0032 * <p>This is an optional extension handler for SAX2 to provide more 0033 * complete information about DTD declarations in an XML document. 0034 * XML readers are not required to recognize this handler, and it is not 0035 * part of core-only SAX2 distributions.</p> 0036 * 0037 * <p>Note that data-related DTD declarations (unparsed entities and 0038 * notations) are already reported through the DTDHandler interface.</p> 0039 * 0040 * <p>If you are using the declaration handler together with a lexical 0041 * handler, all of the events will occur between the startDTD and the endDTD 0042 * events.</p> 0043 * 0044 * @see SAX2XMLReader#setLexicalHandler 0045 * @see SAX2XMLReader#setDeclarationHandler 0046 */ 0047 0048 class SAX2_EXPORT DeclHandler 0049 { 0050 public: 0051 /** @name Constructors and Destructor */ 0052 //@{ 0053 /** Default constructor */ 0054 DeclHandler() 0055 { 0056 } 0057 0058 /** Destructor */ 0059 virtual ~DeclHandler() 0060 { 0061 } 0062 //@} 0063 0064 /** @name The virtual declaration handler interface */ 0065 0066 //@{ 0067 /** 0068 * Report an element type declaration. 0069 * 0070 * <p>The content model will consist of the string "EMPTY", the string 0071 * "ANY", or a parenthesised group, optionally followed by an occurrence 0072 * indicator. The model will be normalized so that all parameter entities 0073 * are fully resolved and all whitespace is removed,and will include the 0074 * enclosing parentheses. Other normalization (such as removing redundant 0075 * parentheses or simplifying occurrence indicators) is at the discretion 0076 * of the parser.</p> 0077 * 0078 * @param name The element type name. 0079 * @param model The content model as a normalized string. 0080 * @exception SAXException Any SAX exception, possibly 0081 * wrapping another exception. 0082 */ 0083 virtual void elementDecl 0084 ( 0085 const XMLCh* const name 0086 , const XMLCh* const model 0087 ) = 0; 0088 0089 /** 0090 * Report an attribute type declaration. 0091 * 0092 * <p>The Parser will call this method to report each occurrence of 0093 * a comment in the XML document.</p> 0094 * 0095 * <p>The application must not attempt to read from the array 0096 * outside of the specified range.</p> 0097 * 0098 * @param eName The name of the associated element. 0099 * @param aName The name of the attribute. 0100 * @param type A string representing the attribute type. 0101 * @param mode A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies. 0102 * @param value A string representing the attribute's default value, or null if there is none. 0103 * @exception SAXException Any SAX exception, possibly 0104 * wrapping another exception. 0105 */ 0106 virtual void attributeDecl 0107 ( 0108 const XMLCh* const eName 0109 , const XMLCh* const aName 0110 , const XMLCh* const type 0111 , const XMLCh* const mode 0112 , const XMLCh* const value 0113 ) = 0; 0114 0115 /** 0116 * Report an internal entity declaration. 0117 * 0118 * <p>Only the effective (first) declaration for each entity will be 0119 * reported. All parameter entities in the value will be expanded, but 0120 * general entities will not.</p> 0121 * 0122 * @param name The name of the entity. If it is a parameter entity, the name will begin with '%'. 0123 * @param value The replacement text of the entity. 0124 * @exception SAXException Any SAX exception, possibly 0125 * wrapping another exception. 0126 */ 0127 virtual void internalEntityDecl 0128 ( 0129 const XMLCh* const name 0130 , const XMLCh* const value 0131 ) = 0; 0132 0133 /** 0134 * Report a parsed external entity declaration. 0135 * 0136 * <p>Only the effective (first) declaration for each entity will 0137 * be reported.</p> 0138 * 0139 * @param name The name of the entity. If it is a parameter entity, the name will begin with '%'. 0140 * @param publicId The The declared public identifier of the entity, or null if none was declared. 0141 * @param systemId The declared system identifier of the entity. 0142 * @exception SAXException Any SAX exception, possibly 0143 * wrapping another exception. 0144 */ 0145 virtual void externalEntityDecl 0146 ( 0147 const XMLCh* const name 0148 , const XMLCh* const publicId 0149 , const XMLCh* const systemId 0150 ) = 0; 0151 0152 //@} 0153 private : 0154 /* Unimplemented Constructors and operators */ 0155 /* Copy constructor */ 0156 DeclHandler(const DeclHandler&); 0157 /** Assignment operator */ 0158 DeclHandler& operator=(const DeclHandler&); 0159 }; 0160 0161 XERCES_CPP_NAMESPACE_END 0162 0163 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |