source: icXML/icXML-devel/src/icxercesc/internal/XSAXMLScanner.hpp @ 2720

Last change on this file since 2720 was 2720, checked in by cameron, 7 years ago

Initial check-in of icXML 0.8 source files

File size: 3.7 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: XSAXMLScanner.hpp 676911 2008-07-15 13:27:32Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XSAXMLSCANNER_HPP)
23#define XERCESC_INCLUDE_GUARD_XSAXMLSCANNER_HPP
24
25#include <xercesc/internal/SGXMLScanner.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29//
30//  This is a scanner class, which processes/validates contents of XML Schema
31//  Annotations. It's intended for internal use only.
32//
33class XMLPARSER_EXPORT XSAXMLScanner : public SGXMLScanner
34{
35public :
36        // -----------------------------------------------------------------------
37        //  Destructor
38        // -----------------------------------------------------------------------
39        virtual ~XSAXMLScanner();
40
41        // -----------------------------------------------------------------------
42        //  XMLScanner public virtual methods
43        // -----------------------------------------------------------------------
44        virtual const XMLCh* getName() const;
45
46protected:
47        // -----------------------------------------------------------------------
48        //  Constructors
49        // -----------------------------------------------------------------------
50        /**
51         * The grammar representing the XML Schema annotation (xsaGrammar) is
52         * passed in by the caller. The scanner will own it and is responsible
53         * for deleting it.
54         */
55        XSAXMLScanner
56        (
57                GrammarResolver* const grammarResolver
58                , XMLStringPool* const   uriStringPool
59                , SchemaGrammar* const   xsaGrammar
60                , MemoryManager* const   manager = XMLPlatformUtils::fgMemoryManager
61        );
62
63        #ifdef TEST_NAMESPACE_RESOLVER
64        XSAXMLScanner
65        (
66                GrammarResolver*                const grammarResolver
67                , XMLNamespaceResolver* const uriResolver
68                , SchemaGrammar*                const xsaGrammar
69                , MemoryManager*                const manager = XMLPlatformUtils::fgMemoryManager
70        );
71        #endif
72
73        friend class TraverseSchema;
74
75        // -----------------------------------------------------------------------
76        //  XMLScanner virtual methods
77        // -----------------------------------------------------------------------
78        virtual void scanReset(const InputSource& src);
79
80        // -----------------------------------------------------------------------
81        //  SGXMLScanner virtual methods
82        // -----------------------------------------------------------------------
83        virtual bool scanStartTag(bool& gotData);
84        virtual void scanEndTag(bool& gotData);
85
86private :
87        // -----------------------------------------------------------------------
88        //  Unimplemented constructors and operators
89        // -----------------------------------------------------------------------
90        XSAXMLScanner();
91        XSAXMLScanner(const XSAXMLScanner&);
92        XSAXMLScanner& operator=(const XSAXMLScanner&);
93
94        // -----------------------------------------------------------------------
95        //  Private helper methods
96        // -----------------------------------------------------------------------
97        void scanRawAttrListforNameSpaces(XMLSize_t attCount);
98        void switchGrammar(const XMLCh* const newGrammarNameSpace, bool laxValidate);
99};
100
101inline const XMLCh* XSAXMLScanner::getName() const
102{
103        return XMLUni::fgXSAXMLScanner;
104}
105
106XERCES_CPP_NAMESPACE_END
107
108#endif
Note: See TracBrowser for help on using the repository browser.