| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XMLContentModel.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Log: XMLContentModel.hpp,v $
    00019  * Revision 1.6  2004/09/16 13:32:05  amassari
    00020  * Updated error message for UPA to also state the complex type that is failing the test
    00021  *
    00022  * Revision 1.5  2004/09/08 13:55:58  peiyongz
    00023  * Apache License Version 2.0
    00024  *
    00025  * Revision 1.4  2003/05/15 18:26:07  knoaman
    00026  * Partial implementation of the configurable memory manager.
    00027  *
    00028  * Revision 1.3  2003/03/07 18:08:10  tng
    00029  * Return a reference instead of void for operator=
    00030  *
    00031  * Revision 1.2  2002/11/04 15:00:21  tng
    00032  * C++ Namespace Support.
    00033  *
    00034  * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
    00035  * sane_include
    00036  *
    00037  * Revision 1.14  2001/11/21 14:30:13  knoaman
    00038  * Fix for UPA checking.
    00039  *
    00040  * Revision 1.13  2001/08/21 16:06:10  tng
    00041  * Schema: Unique Particle Attribution Constraint Checking.
    00042  *
    00043  * Revision 1.12  2001/08/13 15:06:38  knoaman
    00044  * update <any> validation.
    00045  *
    00046  * Revision 1.11  2001/05/28 20:53:35  tng
    00047  * Schema: move static data gInvalidTrans, gEOCFakeId, gEpsilonFakeId to XMLContentModel for others to access
    00048  *
    00049  * Revision 1.10  2001/05/11 13:25:31  tng
    00050  * Copyright update.
    00051  *
    00052  * Revision 1.9  2001/05/03 21:02:23  tng
    00053  * Schema: Add SubstitutionGroupComparator and update exception messages.  By Pei Yong Zhang.
    00054  *
    00055  * Revision 1.8  2001/04/19 18:16:50  tng
    00056  * Schema: SchemaValidator update, and use QName in Content Model
    00057  *
    00058  * Revision 1.7  2001/03/21 21:56:01  tng
    00059  * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
    00060  *
    00061  * Revision 1.6  2001/02/27 14:48:30  tng
    00062  * Schema: Add CMAny and ContentLeafNameTypeVector, by Pei Yong Zhang
    00063  *
    00064  * Revision 1.5  2000/03/02 19:54:24  roddey
    00065  * This checkin includes many changes done while waiting for the
    00066  * 1.1.0 code to be finished. I can't list them all here, but a list is
    00067  * available elsewhere.
    00068  *
    00069  * Revision 1.4  2000/02/24 20:00:23  abagchi
    00070  * Swat for removing Log from API docs
    00071  *
    00072  * Revision 1.3  2000/02/15 01:21:30  roddey
    00073  * Some initial documentation improvements. More to come...
    00074  *
    00075  * Revision 1.2  2000/02/06 07:47:48  rahulj
    00076  * Year 2K copyright swat.
    00077  *
    00078  * Revision 1.1.1.1  1999/11/09 01:08:30  twl
    00079  * Initial checkin
    00080  *
    00081  * Revision 1.2  1999/11/08 20:44:37  rahul
    00082  * Swat for adding in Product name and CVS comment log variable.
    00083  *
    00084  */
    00085
    00086
    00087 #if !defined(CONTENTMODEL_HPP)
    00088 #define CONTENTMODEL_HPP
    00089
    00090 #include <xercesc/util/XMemory.hpp>
    00091 #include <xercesc/util/QName.hpp>
    00092
    00093 XERCES_CPP_NAMESPACE_BEGIN
    00094
    00095 class ContentLeafNameTypeVector;
    00096 class GrammarResolver;
    00097 class XMLStringPool;
    00098 class XMLValidator;
    00099 class SchemaGrammar;
    00100
    00110 class  XMLContentModel : public XMemory
    00111 {
    00112 public:
    00113     // ---------------------------------------------------------------------------
    00114     //  Public static data
    00115     //
    00116     //  gInvalidTrans
    00117     //      This value represents an invalid transition in each line of the
    00118     //      transition table.
    00119     //
    00120     //  gEOCFakeId
    00121     //  gEpsilonFakeId
    00122     //      We have to put in a couple of special CMLeaf nodes to represent
    00123     //      special values, using fake element ids that we know won't conflict
    00124     //      with real element ids.
    00125     //
    00126     //
    00127     // ---------------------------------------------------------------------------
    00128     static const unsigned int   gInvalidTrans;
    00129     static const unsigned int   gEOCFakeId;
    00130     static const unsigned int   gEpsilonFakeId;
    00131
    00132     // -----------------------------------------------------------------------
    00133     //  Constructors are hidden, only the virtual Destructor is exposed
    00134     // -----------------------------------------------------------------------
    00137     virtual ~XMLContentModel()
    00138     {
    00139     }
    00141
    00142
    00143     // -----------------------------------------------------------------------
    00144     //  The virtual content model interface provided by derived classes
    00145     // -----------------------------------------------------------------------
    00146     virtual int validateContent
    00147     (
    00148         QName** const         children
    00149       , const unsigned int    childCount
    00150       , const unsigned int    emptyNamespaceId
    00151     ) const = 0;
    00152
    00153     virtual int validateContentSpecial
    00154     (
    00155         QName** const           children
    00156       , const unsigned int      childCount
    00157       , const unsigned int      emptyNamespaceId
    00158       , GrammarResolver*  const pGrammarResolver
    00159       , XMLStringPool*    const pStringPool
    00160     ) const =0;
    00161
    00162     virtual void checkUniqueParticleAttribution
    00163     (
    00164         SchemaGrammar*    const pGrammar
    00165       , GrammarResolver*  const pGrammarResolver
    00166       , XMLStringPool*    const pStringPool
    00167       , XMLValidator*     const pValidator
    00168       , unsigned int*     const pContentSpecOrgURI
    00169       , const XMLCh*            pComplexTypeName = 0
    00170     ) =0;
    00171
    00172     virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
    00173       const = 0;
    00174
    00175     virtual unsigned int getNextState(const unsigned int currentState,
    00176                                       const unsigned int elementIndex) const = 0;
    00177
    00178 protected :
    00179     // -----------------------------------------------------------------------
    00180     //  Hidden Constructors
    00181     // -----------------------------------------------------------------------
    00182     XMLContentModel()
    00183     {
    00184     }
    00185
    00186
    00187 private :
    00188     // -----------------------------------------------------------------------
    00189     //  Unimplemented constructors and operators
    00190     // -----------------------------------------------------------------------
    00191     XMLContentModel(const XMLContentModel&);
    00192     XMLContentModel& operator=(const XMLContentModel&);
    00193 };
    00194
    00195 XERCES_CPP_NAMESPACE_END
    00196
    00197 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.