Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:18

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_DOCTYPEHANDLER_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOCTYPEHANDLER_HPP
0024 
0025 #include <xercesc/util/XercesDefs.hpp>
0026 #include <xercesc/framework/XMLNotationDecl.hpp>
0027 #include <xercesc/validators/DTD/DTDAttDef.hpp>
0028 #include <xercesc/validators/DTD/DTDElementDecl.hpp>
0029 #include <xercesc/validators/DTD/DTDEntityDecl.hpp>
0030 
0031 XERCES_CPP_NAMESPACE_BEGIN
0032 
0033 //
0034 //  This abstract class defines the document type handler API's which can be
0035 //  used to process the DTD events generated by the DTDScanner as it scans the
0036 //  internal and external subset.
0037 
0038 class VALIDATORS_EXPORT DocTypeHandler
0039 {
0040 public:
0041     // -----------------------------------------------------------------------
0042     //  Constructors and Destructor
0043     // -----------------------------------------------------------------------
0044     DocTypeHandler()
0045     {
0046     }
0047 
0048     virtual ~DocTypeHandler()
0049     {
0050     }
0051 
0052 
0053     // -----------------------------------------------------------------------
0054     //  The document type handler virtual handler interface
0055     // -----------------------------------------------------------------------
0056     virtual void attDef
0057     (
0058         const   DTDElementDecl&     elemDecl
0059         , const DTDAttDef&          attDef
0060         , const bool                ignoring
0061     ) = 0;
0062 
0063     virtual void doctypeComment
0064     (
0065         const   XMLCh* const    comment
0066     ) = 0;
0067 
0068     virtual void doctypeDecl
0069     (
0070         const   DTDElementDecl& elemDecl
0071         , const XMLCh* const    publicId
0072         , const XMLCh* const    systemId
0073         , const bool            hasIntSubset
0074         , const bool            hasExtSubset = false
0075     ) = 0;
0076 
0077     virtual void doctypePI
0078     (
0079         const   XMLCh* const    target
0080         , const XMLCh* const    data
0081     ) = 0;
0082 
0083     virtual void doctypeWhitespace
0084     (
0085         const   XMLCh* const    chars
0086         , const XMLSize_t       length
0087     ) = 0;
0088 
0089     virtual void elementDecl
0090     (
0091         const   DTDElementDecl& decl
0092         , const bool            isIgnored
0093     ) = 0;
0094 
0095     virtual void endAttList
0096     (
0097         const   DTDElementDecl& elemDecl
0098     ) = 0;
0099 
0100     virtual void endIntSubset() = 0;
0101 
0102     virtual void endExtSubset() = 0;
0103 
0104     virtual void entityDecl
0105     (
0106         const   DTDEntityDecl&  entityDecl
0107         , const bool            isPEDecl
0108         , const bool            isIgnored
0109     ) = 0;
0110 
0111     virtual void resetDocType() = 0;
0112 
0113     virtual void notationDecl
0114     (
0115         const   XMLNotationDecl&    notDecl
0116         , const bool                isIgnored
0117     ) = 0;
0118 
0119     virtual void startAttList
0120     (
0121         const   DTDElementDecl& elemDecl
0122     ) = 0;
0123 
0124     virtual void startIntSubset() = 0;
0125 
0126     virtual void startExtSubset() = 0;
0127 
0128     virtual void TextDecl
0129     (
0130         const   XMLCh* const    versionStr
0131         , const XMLCh* const    encodingStr
0132     ) = 0;
0133 
0134 
0135 private:
0136     // -----------------------------------------------------------------------
0137     //  Unimplemented constructors and operators
0138     // -----------------------------------------------------------------------
0139     DocTypeHandler(const DocTypeHandler&);
0140     DocTypeHandler& operator=(const DocTypeHandler&);
0141 };
0142 
0143 XERCES_CPP_NAMESPACE_END
0144 
0145 #endif