http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Charter
Release Info

Installation
Download
Build Instructions

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

Source Repository
User Mail Archive
Devel Mail Archive

API Docs for SAX and DOM
 

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  * $Id: XMLContentModel.hpp 191054 2005-06-17 02:56:35Z jberry $
00019  */
00020 
00021 
00022 #if !defined(CONTENTMODEL_HPP)
00023 #define CONTENTMODEL_HPP
00024 
00025 #include <xercesc/util/XMemory.hpp>
00026 #include <xercesc/util/QName.hpp>
00027 
00028 XERCES_CPP_NAMESPACE_BEGIN
00029 
00030 class ContentLeafNameTypeVector;
00031 class GrammarResolver;
00032 class XMLStringPool;
00033 class XMLValidator;
00034 class SchemaGrammar;
00035 
00045 class  XMLContentModel : public XMemory
00046 {
00047 public:
00048     // ---------------------------------------------------------------------------
00049     //  Public static data
00050     //
00051     //  gInvalidTrans
00052     //      This value represents an invalid transition in each line of the
00053     //      transition table.
00054     //
00055     //  gEOCFakeId
00056     //  gEpsilonFakeId
00057     //      We have to put in a couple of special CMLeaf nodes to represent
00058     //      special values, using fake element ids that we know won't conflict
00059     //      with real element ids.
00060     //
00061     //
00062     // ---------------------------------------------------------------------------
00063     static const unsigned int   gInvalidTrans;
00064     static const unsigned int   gEOCFakeId;
00065     static const unsigned int   gEpsilonFakeId;
00066 
00067     // -----------------------------------------------------------------------
00068     //  Constructors are hidden, only the virtual Destructor is exposed
00069     // -----------------------------------------------------------------------
00072     virtual ~XMLContentModel()
00073     {
00074     }
00076 
00077 
00078     // -----------------------------------------------------------------------
00079     //  The virtual content model interface provided by derived classes
00080     // -----------------------------------------------------------------------
00081     virtual int validateContent
00082     (
00083         QName** const         children
00084       , const unsigned int    childCount
00085       , const unsigned int    emptyNamespaceId
00086     ) const = 0;
00087 
00088     virtual int validateContentSpecial
00089     (
00090         QName** const           children
00091       , const unsigned int      childCount
00092       , const unsigned int      emptyNamespaceId
00093       , GrammarResolver*  const pGrammarResolver
00094       , XMLStringPool*    const pStringPool
00095     ) const =0;
00096 
00097     virtual void checkUniqueParticleAttribution
00098     (
00099         SchemaGrammar*    const pGrammar
00100       , GrammarResolver*  const pGrammarResolver
00101       , XMLStringPool*    const pStringPool
00102       , XMLValidator*     const pValidator
00103       , unsigned int*     const pContentSpecOrgURI
00104       , const XMLCh*            pComplexTypeName = 0
00105     ) =0;
00106 
00107     virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
00108       const = 0;
00109 
00110     virtual unsigned int getNextState(const unsigned int currentState,
00111                                       const unsigned int elementIndex) const = 0;
00112 
00113 protected :
00114     // -----------------------------------------------------------------------
00115     //  Hidden Constructors
00116     // -----------------------------------------------------------------------
00117     XMLContentModel()
00118     {
00119     }
00120 
00121 
00122 private :
00123     // -----------------------------------------------------------------------
00124     //  Unimplemented constructors and operators
00125     // -----------------------------------------------------------------------
00126     XMLContentModel(const XMLContentModel&);
00127     XMLContentModel& operator=(const XMLContentModel&);
00128 };
00129 
00130 XERCES_CPP_NAMESPACE_END
00131 
00132 #endif


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