Reordered files in all libs - now all includes are in "libname/include" dir - logical, isn't it? This should break compilation however.
This commit is contained in:
141
project/jni/xerces/include/xercesc/validators/DTD/DTDAttDef.hpp
Normal file
141
project/jni/xerces/include/xercesc/validators/DTD/DTDAttDef.hpp
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDAttDef.hpp 676911 2008-07-15 13:27:32Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDATTDEF_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDATTDEF_HPP
|
||||
|
||||
#include <xercesc/framework/XMLAttDef.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
//
|
||||
// This class is a derivative of the core XMLAttDef class. This class adds
|
||||
// any DTD specific data members and provides DTD specific implementations
|
||||
// of any underlying attribute def virtual methods.
|
||||
//
|
||||
// In the DTD we don't do namespaces, so the attribute names are just the
|
||||
// QName literally from the DTD. This is what we return as the full name,
|
||||
// which is what is used to key these in any name keyed collections.
|
||||
//
|
||||
class VALIDATORS_EXPORT DTDAttDef : public XMLAttDef
|
||||
{
|
||||
public :
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructors
|
||||
// -----------------------------------------------------------------------
|
||||
DTDAttDef(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
||||
DTDAttDef
|
||||
(
|
||||
const XMLCh* const attName
|
||||
, const XMLAttDef::AttTypes type = CData
|
||||
, const XMLAttDef::DefAttTypes defType = Implied
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
DTDAttDef
|
||||
(
|
||||
const XMLCh* const attName
|
||||
, const XMLCh* const attValue
|
||||
, const XMLAttDef::AttTypes type
|
||||
, const XMLAttDef::DefAttTypes defType
|
||||
, const XMLCh* const enumValues = 0
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
~DTDAttDef();
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Implementation of the XMLAttDef interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual const XMLCh* getFullName() const;
|
||||
|
||||
//does nothing currently
|
||||
virtual void reset() {};
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Getter methods
|
||||
// -----------------------------------------------------------------------
|
||||
XMLSize_t getElemId() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
// -----------------------------------------------------------------------
|
||||
void setElemId(const XMLSize_t newId);
|
||||
void setName(const XMLCh* const newName);
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(DTDAttDef)
|
||||
|
||||
private :
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDAttDef(const DTDAttDef &);
|
||||
DTDAttDef& operator = (const DTDAttDef&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fElemId
|
||||
// This is the id of the element (the id is into the element decl
|
||||
// pool) of the element this attribute def said it belonged to.
|
||||
// This is used later to link back to the element, mostly for
|
||||
// validation purposes.
|
||||
//
|
||||
// fName
|
||||
// This is the name of the attribute. Since we don't do namespaces
|
||||
// in the DTD, its just the fully qualified name.
|
||||
// -----------------------------------------------------------------------
|
||||
XMLSize_t fElemId;
|
||||
XMLCh* fName;
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDAttDef: Implementation of the XMLAttDef interface
|
||||
// ---------------------------------------------------------------------------
|
||||
inline const XMLCh* DTDAttDef::getFullName() const
|
||||
{
|
||||
return fName;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDAttDef: Getter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline XMLSize_t DTDAttDef::getElemId() const
|
||||
{
|
||||
return fElemId;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDAttDef: Setter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline void DTDAttDef::setElemId(const XMLSize_t newId)
|
||||
{
|
||||
fElemId = newId;
|
||||
}
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDAttDefList.hpp 932887 2010-04-11 13:04:59Z borisk $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDATTDEFLIST_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDATTDEFLIST_HPP
|
||||
|
||||
#include <xercesc/util/RefHashTableOf.hpp>
|
||||
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
//
|
||||
// This is a derivative of the framework abstract class which defines the
|
||||
// interface to a list of attribute defs that belong to a particular
|
||||
// element. The scanner needs to be able to get a list of the attributes
|
||||
// that an element supports, for use during the validation process and for
|
||||
// fixed/default attribute processing.
|
||||
//
|
||||
// Since each validator can store attributes differently, this abstract
|
||||
// interface allows each validator to provide an implementation of this
|
||||
// data structure that works best for it.
|
||||
//
|
||||
// For us, we just wrap the RefHashTableOf collection that the DTDElementDecl
|
||||
// class uses to store the attributes that belong to it.
|
||||
//
|
||||
// This clss does not adopt the hash table, it just references it. The
|
||||
// hash table is owned by the element decl it is a member of.
|
||||
//
|
||||
class VALIDATORS_EXPORT DTDAttDefList : public XMLAttDefList
|
||||
{
|
||||
public :
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDAttDefList
|
||||
(
|
||||
RefHashTableOf<DTDAttDef>* const listToUse,
|
||||
MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
|
||||
~DTDAttDefList();
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Implementation of the virtual interface
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
virtual XMLAttDef* findAttDef
|
||||
(
|
||||
const unsigned int uriID
|
||||
, const XMLCh* const attName
|
||||
);
|
||||
virtual const XMLAttDef* findAttDef
|
||||
(
|
||||
const unsigned int uriID
|
||||
, const XMLCh* const attName
|
||||
) const;
|
||||
virtual XMLAttDef* findAttDef
|
||||
(
|
||||
const XMLCh* const attURI
|
||||
, const XMLCh* const attName
|
||||
);
|
||||
virtual const XMLAttDef* findAttDef
|
||||
(
|
||||
const XMLCh* const attURI
|
||||
, const XMLCh* const attName
|
||||
) const;
|
||||
|
||||
/**
|
||||
* return total number of attributes in this list
|
||||
*/
|
||||
virtual XMLSize_t getAttDefCount() const ;
|
||||
|
||||
/**
|
||||
* return attribute at the index-th position in the list.
|
||||
*/
|
||||
virtual XMLAttDef &getAttDef(XMLSize_t index) ;
|
||||
|
||||
/**
|
||||
* return attribute at the index-th position in the list.
|
||||
*/
|
||||
virtual const XMLAttDef &getAttDef(XMLSize_t index) const ;
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(DTDAttDefList)
|
||||
|
||||
DTDAttDefList(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
||||
|
||||
private :
|
||||
|
||||
void addAttDef(DTDAttDef *toAdd);
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDAttDefList(const DTDAttDefList &);
|
||||
DTDAttDefList& operator = (const DTDAttDefList&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fEnum
|
||||
// This is an enerator for the list that we use to do the enumerator
|
||||
// type methods of this class.
|
||||
//
|
||||
// fList
|
||||
// The list of DTDAttDef objects that represent the attributes that
|
||||
// a particular element supports.
|
||||
// fArray
|
||||
// vector of pointers to the DTDAttDef objects contained in this list
|
||||
// fSize
|
||||
// size of fArray
|
||||
// fCount
|
||||
// number of DTDAttDef objects currently stored in this list
|
||||
// -----------------------------------------------------------------------
|
||||
RefHashTableOfEnumerator<DTDAttDef>* fEnum;
|
||||
RefHashTableOf<DTDAttDef>* fList;
|
||||
DTDAttDef** fArray;
|
||||
XMLSize_t fSize;
|
||||
XMLSize_t fCount;
|
||||
|
||||
friend class DTDElementDecl;
|
||||
};
|
||||
|
||||
inline void DTDAttDefList::addAttDef(DTDAttDef *toAdd)
|
||||
{
|
||||
if(fCount == fSize)
|
||||
{
|
||||
// need to grow fArray
|
||||
fSize <<= 1;
|
||||
DTDAttDef** newArray = (DTDAttDef **)((getMemoryManager())->allocate( sizeof(DTDAttDef*) * fSize ));
|
||||
memcpy(newArray, fArray, fCount * sizeof(DTDAttDef *));
|
||||
(getMemoryManager())->deallocate(fArray);
|
||||
fArray = newArray;
|
||||
}
|
||||
fArray[fCount++] = toAdd;
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDElementDecl.hpp 932887 2010-04-11 13:04:59Z borisk $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDELEMENTDECL_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDELEMENTDECL_HPP
|
||||
|
||||
#include <xercesc/util/RefHashTableOf.hpp>
|
||||
#include <xercesc/util/QName.hpp>
|
||||
#include <xercesc/framework/XMLElementDecl.hpp>
|
||||
#include <xercesc/framework/XMLContentModel.hpp>
|
||||
#include <xercesc/validators/DTD/DTDAttDef.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
class ContentSpecNode;
|
||||
class DTDAttDefList;
|
||||
|
||||
|
||||
//
|
||||
// This class is a derivative of the basic element decl. This one implements
|
||||
// the virtuals so that they work for a DTD. The big difference is that
|
||||
// they don't live in any URL in the DTD. The names are just stored as full
|
||||
// QNames, so they are not split out and element decls don't live within
|
||||
// URL namespaces or anything like that.
|
||||
//
|
||||
|
||||
class VALIDATORS_EXPORT DTDElementDecl : public XMLElementDecl
|
||||
{
|
||||
public :
|
||||
// -----------------------------------------------------------------------
|
||||
// Class specific types
|
||||
//
|
||||
// ModelTypes
|
||||
// Indicates the type of content model that an element has. This
|
||||
// indicates how the content model is represented and validated.
|
||||
// -----------------------------------------------------------------------
|
||||
enum ModelTypes
|
||||
{
|
||||
Empty
|
||||
, Any
|
||||
, Mixed_Simple
|
||||
, Children
|
||||
|
||||
, ModelTypes_Count
|
||||
};
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDElementDecl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
||||
DTDElementDecl
|
||||
(
|
||||
const XMLCh* const elemRawName
|
||||
, const unsigned int uriId
|
||||
, const ModelTypes modelType
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
DTDElementDecl
|
||||
(
|
||||
QName* const elementName
|
||||
, const ModelTypes modelType = Any
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
|
||||
~DTDElementDecl();
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// The virtual element decl interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual XMLAttDefList& getAttDefList() const;
|
||||
virtual CharDataOpts getCharDataOpts() const;
|
||||
virtual bool hasAttDefs() const;
|
||||
virtual const ContentSpecNode* getContentSpec() const;
|
||||
virtual ContentSpecNode* getContentSpec();
|
||||
virtual void setContentSpec(ContentSpecNode* toAdopt);
|
||||
virtual XMLContentModel* getContentModel();
|
||||
virtual void setContentModel(XMLContentModel* const newModelToAdopt);
|
||||
virtual const XMLCh* getFormattedContentModel () const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Support keyed collections
|
||||
//
|
||||
// This method allows objects of this type be placed into one of the
|
||||
// standard keyed collections. This method will return the full name of
|
||||
// the element, which will vary depending upon the type of the grammar.
|
||||
// -----------------------------------------------------------------------
|
||||
const XMLCh* getKey() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Getter methods
|
||||
// -----------------------------------------------------------------------
|
||||
const DTDAttDef* getAttDef(const XMLCh* const attName) const;
|
||||
DTDAttDef* getAttDef(const XMLCh* const attName);
|
||||
ModelTypes getModelType() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
// -----------------------------------------------------------------------
|
||||
void addAttDef(DTDAttDef* const toAdd);
|
||||
void setModelType(const DTDElementDecl::ModelTypes toSet);
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(DTDElementDecl)
|
||||
|
||||
virtual XMLElementDecl::objectType getObjectType() const;
|
||||
|
||||
private :
|
||||
// -----------------------------------------------------------------------
|
||||
// Private helper methods
|
||||
// -----------------------------------------------------------------------
|
||||
void faultInAttDefList() const;
|
||||
XMLContentModel* createChildModel() ;
|
||||
XMLContentModel* makeContentModel() ;
|
||||
XMLCh* formatContentModel () const ;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDElementDecl(const DTDElementDecl &);
|
||||
DTDElementDecl& operator = (const DTDElementDecl&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fAttDefs
|
||||
// The list of attributes that are defined for this element. Each
|
||||
// element is its own little 'namespace' for attributes, so each
|
||||
// element maintains its own list of owned attribute defs. It is
|
||||
// faulted in when an attribute is actually added.
|
||||
//
|
||||
// fAttList
|
||||
// We have to return a view of our att defs via the abstract view
|
||||
// that the scanner understands. It may or may not ever be asked
|
||||
// for so we fault it in as needed.
|
||||
//
|
||||
// fContentSpec
|
||||
// This is the content spec for the node. It contains the original
|
||||
// content spec that was read from the DTD, as a tree of nodes. This
|
||||
// one is always set up, and is used to build the fContentModel
|
||||
// version if we are validating.
|
||||
//
|
||||
// fModelType
|
||||
// The content model type of this element. This tells us what kind
|
||||
// of content model to create.
|
||||
//
|
||||
// fContentModel
|
||||
// The content model object for this element. It is stored here via
|
||||
// its abstract interface.
|
||||
//
|
||||
// fFormattedModel
|
||||
// This is a faulted in member. When the outside world asks for
|
||||
// our content model as a string, we format it and fault it into
|
||||
// this field (to avoid doing the formatted over and over.)
|
||||
// -----------------------------------------------------------------------
|
||||
ModelTypes fModelType;
|
||||
|
||||
RefHashTableOf<DTDAttDef>* fAttDefs;
|
||||
DTDAttDefList* fAttList;
|
||||
ContentSpecNode* fContentSpec;
|
||||
XMLContentModel* fContentModel;
|
||||
XMLCh* fFormattedModel;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDElementDecl: XMLElementDecl virtual interface implementation
|
||||
// ---------------------------------------------------------------------------
|
||||
inline ContentSpecNode* DTDElementDecl::getContentSpec()
|
||||
{
|
||||
return fContentSpec;
|
||||
}
|
||||
|
||||
inline const ContentSpecNode* DTDElementDecl::getContentSpec() const
|
||||
{
|
||||
return fContentSpec;
|
||||
}
|
||||
|
||||
inline XMLContentModel* DTDElementDecl::getContentModel()
|
||||
{
|
||||
if (!fContentModel)
|
||||
fContentModel = makeContentModel();
|
||||
return fContentModel;
|
||||
}
|
||||
|
||||
inline void
|
||||
DTDElementDecl::setContentModel(XMLContentModel* const newModelToAdopt)
|
||||
{
|
||||
delete fContentModel;
|
||||
fContentModel = newModelToAdopt;
|
||||
|
||||
// reset formattedModel
|
||||
if (fFormattedModel)
|
||||
{
|
||||
getMemoryManager()->deallocate(fFormattedModel);
|
||||
fFormattedModel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDElementDecl: Miscellaneous methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline const XMLCh* DTDElementDecl::getKey() const
|
||||
{
|
||||
return getFullName();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDElementDecl: Getter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline DTDElementDecl::ModelTypes DTDElementDecl::getModelType() const
|
||||
{
|
||||
return fModelType;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDElementDecl: Setter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline void
|
||||
DTDElementDecl::setModelType(const DTDElementDecl::ModelTypes toSet)
|
||||
{
|
||||
fModelType = toSet;
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDEntityDecl.hpp 527149 2007-04-10 14:56:39Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDENTITYDECL_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDENTITYDECL_HPP
|
||||
|
||||
#include <xercesc/framework/XMLEntityDecl.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
//
|
||||
// This is a derivative of the abstract version of an entity decl in the
|
||||
// framework directory. We just need to provide implementation of a couple
|
||||
// of methods.
|
||||
//
|
||||
class VALIDATORS_EXPORT DTDEntityDecl : public XMLEntityDecl
|
||||
{
|
||||
public :
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDEntityDecl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
||||
DTDEntityDecl
|
||||
(
|
||||
const XMLCh* const entName
|
||||
, const bool fromIntSubset = false
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
DTDEntityDecl
|
||||
(
|
||||
const XMLCh* const entName
|
||||
, const XMLCh* const value
|
||||
, const bool fromIntSubset = false
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
DTDEntityDecl
|
||||
(
|
||||
const XMLCh* const entName
|
||||
, const XMLCh value
|
||||
, const bool fromIntSubset = false
|
||||
, const bool specialChar = false
|
||||
);
|
||||
~DTDEntityDecl();
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Implementation of the virtual XMLEntityDecl interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual bool getDeclaredInIntSubset() const;
|
||||
virtual bool getIsParameter() const;
|
||||
virtual bool getIsSpecialChar() const;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
// -----------------------------------------------------------------------
|
||||
void setDeclaredInIntSubset(const bool newValue);
|
||||
void setIsParameter(const bool newValue);
|
||||
void setIsSpecialChar(const bool newValue);
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(DTDEntityDecl)
|
||||
|
||||
private :
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDEntityDecl(const DTDEntityDecl&);
|
||||
DTDEntityDecl& operator=(DTDEntityDecl&);
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fDeclaredInIntSubset
|
||||
// Indicates whether the entity was declared in the internal subset
|
||||
// or not. If not, it cannot be referred to from a standalone
|
||||
// document.
|
||||
//
|
||||
// fIsParameter
|
||||
// Indicates whether this is a parameter entity or a general entity.
|
||||
//
|
||||
// fIsSpecialChar
|
||||
// This indicates that its one of the special character entities,
|
||||
// e.g. lt or gt or amp. We need to know this because there are
|
||||
// places where only a numeric char ref or special char ref is valid
|
||||
// and all others are ignored or illegal.
|
||||
// -----------------------------------------------------------------------
|
||||
bool fDeclaredInIntSubset;
|
||||
bool fIsParameter;
|
||||
bool fIsSpecialChar;
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDEntityDecl: Constructors and Destructor
|
||||
// ---------------------------------------------------------------------------
|
||||
inline DTDEntityDecl::DTDEntityDecl(MemoryManager* const manager) :
|
||||
|
||||
XMLEntityDecl(manager)
|
||||
, fDeclaredInIntSubset(false)
|
||||
, fIsParameter(false)
|
||||
, fIsSpecialChar(false)
|
||||
{
|
||||
}
|
||||
|
||||
inline DTDEntityDecl::DTDEntityDecl( const XMLCh* const entName
|
||||
, const bool fromIntSubset
|
||||
, MemoryManager* const manager) :
|
||||
|
||||
XMLEntityDecl(entName, manager)
|
||||
, fDeclaredInIntSubset(fromIntSubset)
|
||||
, fIsParameter(false)
|
||||
, fIsSpecialChar(false)
|
||||
{
|
||||
}
|
||||
|
||||
inline DTDEntityDecl::DTDEntityDecl( const XMLCh* const entName
|
||||
, const XMLCh* const value
|
||||
, const bool fromIntSubset
|
||||
, MemoryManager* const manager) :
|
||||
XMLEntityDecl(entName, value, manager)
|
||||
, fDeclaredInIntSubset(fromIntSubset)
|
||||
, fIsParameter(false)
|
||||
, fIsSpecialChar(false)
|
||||
{
|
||||
}
|
||||
|
||||
inline DTDEntityDecl::DTDEntityDecl(const XMLCh* const entName
|
||||
, const XMLCh value
|
||||
, const bool fromIntSubset
|
||||
, const bool specialChar) :
|
||||
XMLEntityDecl(entName, value, XMLPlatformUtils::fgMemoryManager)
|
||||
, fDeclaredInIntSubset(fromIntSubset)
|
||||
, fIsParameter(false)
|
||||
, fIsSpecialChar(specialChar)
|
||||
{
|
||||
}
|
||||
|
||||
inline DTDEntityDecl::~DTDEntityDecl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDEntityDecl: Getter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline bool DTDEntityDecl::getDeclaredInIntSubset() const
|
||||
{
|
||||
return fDeclaredInIntSubset;
|
||||
}
|
||||
|
||||
inline bool DTDEntityDecl::getIsParameter() const
|
||||
{
|
||||
return fIsParameter;
|
||||
}
|
||||
|
||||
inline bool DTDEntityDecl::getIsSpecialChar() const
|
||||
{
|
||||
return fIsSpecialChar;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDEntityDecl: Setter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline void DTDEntityDecl::setDeclaredInIntSubset(const bool newValue)
|
||||
{
|
||||
fDeclaredInIntSubset = newValue;
|
||||
}
|
||||
|
||||
inline void DTDEntityDecl::setIsParameter(const bool newValue)
|
||||
{
|
||||
fIsParameter = newValue;
|
||||
}
|
||||
|
||||
inline void DTDEntityDecl::setIsSpecialChar(const bool newValue)
|
||||
{
|
||||
fIsSpecialChar = newValue;
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
391
project/jni/xerces/include/xercesc/validators/DTD/DTDGrammar.hpp
Normal file
391
project/jni/xerces/include/xercesc/validators/DTD/DTDGrammar.hpp
Normal file
@@ -0,0 +1,391 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDGrammar.hpp 883368 2009-11-23 15:28:19Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDGRAMMAR_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDGRAMMAR_HPP
|
||||
|
||||
#include <xercesc/util/RefHashTableOf.hpp>
|
||||
#include <xercesc/util/NameIdPool.hpp>
|
||||
#include <xercesc/util/StringPool.hpp>
|
||||
#include <xercesc/validators/common/Grammar.hpp>
|
||||
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
|
||||
#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
|
||||
#include <xercesc/framework/XMLDTDDescription.hpp>
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
//
|
||||
// This class stores the DTD information
|
||||
// NOTE: DTDs are not namespace aware, so we just use regular NameIdPool
|
||||
// data structures to store element and attribute decls. They are all set
|
||||
// to be in the global namespace and the full QName is used as the base name
|
||||
// of the decl. This means that all the URI parameters below are expected
|
||||
// to be null pointers (and anything else will cause an exception.)
|
||||
//
|
||||
|
||||
class VALIDATORS_EXPORT DTDGrammar : public Grammar
|
||||
{
|
||||
public:
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDGrammar(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
||||
virtual ~DTDGrammar();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Implementation of Virtual Interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual Grammar::GrammarType getGrammarType() const;
|
||||
virtual const XMLCh* getTargetNamespace() const;
|
||||
|
||||
// this method should only be used while the grammar is being
|
||||
// constructed, not while it is being used
|
||||
// in a validation episode!
|
||||
virtual XMLElementDecl* findOrAddElemDecl
|
||||
(
|
||||
const unsigned int uriId
|
||||
, const XMLCh* const baseName
|
||||
, const XMLCh* const prefixName
|
||||
, const XMLCh* const qName
|
||||
, unsigned int scope
|
||||
, bool& wasAdded
|
||||
) ;
|
||||
|
||||
virtual XMLSize_t getElemId
|
||||
(
|
||||
const unsigned int uriId
|
||||
, const XMLCh* const baseName
|
||||
, const XMLCh* const qName
|
||||
, unsigned int scope
|
||||
) const ;
|
||||
|
||||
virtual const XMLElementDecl* getElemDecl
|
||||
(
|
||||
const unsigned int uriId
|
||||
, const XMLCh* const baseName
|
||||
, const XMLCh* const qName
|
||||
, unsigned int scope
|
||||
) const ;
|
||||
|
||||
virtual XMLElementDecl* getElemDecl
|
||||
(
|
||||
const unsigned int uriId
|
||||
, const XMLCh* const baseName
|
||||
, const XMLCh* const qName
|
||||
, unsigned int scope
|
||||
);
|
||||
|
||||
virtual const XMLElementDecl* getElemDecl
|
||||
(
|
||||
const unsigned int elemId
|
||||
) const;
|
||||
|
||||
virtual XMLElementDecl* getElemDecl
|
||||
(
|
||||
const unsigned int elemId
|
||||
);
|
||||
|
||||
virtual const XMLNotationDecl* getNotationDecl
|
||||
(
|
||||
const XMLCh* const notName
|
||||
) const;
|
||||
|
||||
virtual XMLNotationDecl* getNotationDecl
|
||||
(
|
||||
const XMLCh* const notName
|
||||
);
|
||||
|
||||
virtual bool getValidated() const;
|
||||
|
||||
virtual XMLElementDecl* putElemDecl
|
||||
(
|
||||
const unsigned int uriId
|
||||
, const XMLCh* const baseName
|
||||
, const XMLCh* const prefixName
|
||||
, const XMLCh* const qName
|
||||
, unsigned int scope
|
||||
, const bool notDeclared = false
|
||||
);
|
||||
|
||||
virtual XMLSize_t putElemDecl
|
||||
(
|
||||
XMLElementDecl* const elemDecl
|
||||
, const bool notDeclared = false
|
||||
) ;
|
||||
|
||||
virtual XMLSize_t putNotationDecl
|
||||
(
|
||||
XMLNotationDecl* const notationDecl
|
||||
) const;
|
||||
|
||||
virtual void setValidated(const bool newState);
|
||||
|
||||
virtual void reset();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Getter methods
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
const DTDEntityDecl* getEntityDecl(const XMLCh* const entName) const;
|
||||
DTDEntityDecl* getEntityDecl(const XMLCh* const entName);
|
||||
NameIdPool<DTDEntityDecl>* getEntityDeclPool();
|
||||
const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
|
||||
NameIdPoolEnumerator<DTDElementDecl> getElemEnumerator() const;
|
||||
NameIdPoolEnumerator<DTDEntityDecl> getEntityEnumerator() const;
|
||||
NameIdPoolEnumerator<XMLNotationDecl> getNotationEnumerator() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
virtual void setGrammarDescription( XMLGrammarDescription*);
|
||||
virtual XMLGrammarDescription* getGrammarDescription() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Content management methods
|
||||
// -----------------------------------------------------------------------
|
||||
XMLSize_t putEntityDecl(DTDEntityDecl* const entityDecl) const;
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(DTDGrammar)
|
||||
|
||||
private:
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDGrammar(const DTDGrammar &);
|
||||
DTDGrammar& operator = (const DTDGrammar&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fElemDeclPool
|
||||
// This is the element decl pool. It contains all of the elements
|
||||
// declared in the DTD (and their associated attributes.)
|
||||
//
|
||||
// fElemNonDeclPool
|
||||
// This is the element decl pool that is is populated as new elements
|
||||
// are seen in the XML document (not declared in the DTD), and they
|
||||
// are given default characteristics.
|
||||
//
|
||||
// fEntityDeclPool
|
||||
// This is a pool of EntityDecl objects, which contains all of the
|
||||
// general entities that are declared in the DTD subsets, plus the
|
||||
// default entities (such as > < ...) defined by the XML Standard.
|
||||
//
|
||||
// fNotationDeclPool
|
||||
// This is a pool of NotationDecl objects, which contains all of the
|
||||
// notations declared in the DTD subsets.
|
||||
//
|
||||
// fValidated
|
||||
// Indicates if the content of the Grammar has been pre-validated
|
||||
// or not. When using a cached grammar, no need for pre content
|
||||
// validation.
|
||||
//
|
||||
// fGramDesc: adopted
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
static NameIdPool<DTDEntityDecl>* fDefaultEntities;
|
||||
MemoryManager* fMemoryManager;
|
||||
NameIdPool<DTDElementDecl>* fElemDeclPool;
|
||||
NameIdPool<DTDElementDecl>* fElemNonDeclPool;
|
||||
NameIdPool<DTDEntityDecl>* fEntityDeclPool;
|
||||
NameIdPool<XMLNotationDecl>* fNotationDeclPool;
|
||||
XMLDTDDescription* fGramDesc;
|
||||
|
||||
bool fValidated;
|
||||
|
||||
friend class XMLInitializer;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDGrammar: Getter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline NameIdPoolEnumerator<DTDElementDecl>
|
||||
DTDGrammar::getElemEnumerator() const
|
||||
{
|
||||
return NameIdPoolEnumerator<DTDElementDecl>(fElemDeclPool, fMemoryManager);
|
||||
}
|
||||
|
||||
inline NameIdPoolEnumerator<DTDEntityDecl>
|
||||
DTDGrammar::getEntityEnumerator() const
|
||||
{
|
||||
return NameIdPoolEnumerator<DTDEntityDecl>(fEntityDeclPool, fMemoryManager);
|
||||
}
|
||||
|
||||
inline NameIdPoolEnumerator<XMLNotationDecl>
|
||||
DTDGrammar::getNotationEnumerator() const
|
||||
{
|
||||
return NameIdPoolEnumerator<XMLNotationDecl>(fNotationDeclPool, fMemoryManager);
|
||||
}
|
||||
|
||||
inline const DTDEntityDecl*
|
||||
DTDGrammar::getEntityDecl(const XMLCh* const entName) const
|
||||
{
|
||||
DTDEntityDecl* decl = fDefaultEntities->getByKey(entName);
|
||||
|
||||
if (!decl)
|
||||
return fEntityDeclPool->getByKey(entName);
|
||||
|
||||
return decl;
|
||||
}
|
||||
|
||||
inline DTDEntityDecl* DTDGrammar::getEntityDecl(const XMLCh* const entName)
|
||||
{
|
||||
DTDEntityDecl* decl = fDefaultEntities->getByKey(entName);
|
||||
|
||||
if (!decl)
|
||||
return fEntityDeclPool->getByKey(entName);
|
||||
|
||||
return decl;
|
||||
}
|
||||
|
||||
|
||||
inline NameIdPool<DTDEntityDecl>* DTDGrammar::getEntityDeclPool()
|
||||
{
|
||||
return fEntityDeclPool;
|
||||
}
|
||||
|
||||
inline const NameIdPool<DTDEntityDecl>* DTDGrammar::getEntityDeclPool() const
|
||||
{
|
||||
return fEntityDeclPool;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
// -----------------------------------------------------------------------
|
||||
inline XMLSize_t DTDGrammar::putEntityDecl(DTDEntityDecl* const entityDecl) const
|
||||
{
|
||||
return fEntityDeclPool->put(entityDecl);
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDGrammar: Virtual methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline Grammar::GrammarType DTDGrammar::getGrammarType() const {
|
||||
return Grammar::DTDGrammarType;
|
||||
}
|
||||
|
||||
inline const XMLCh* DTDGrammar::getTargetNamespace() const {
|
||||
return XMLUni::fgZeroLenString;
|
||||
}
|
||||
|
||||
// Element Decl
|
||||
inline XMLSize_t DTDGrammar::getElemId (const unsigned int
|
||||
, const XMLCh* const
|
||||
, const XMLCh* const qName
|
||||
, unsigned int) const
|
||||
{
|
||||
//
|
||||
// In this case, we don't return zero to mean 'not found', so we have to
|
||||
// map it to the official not found value if we don't find it.
|
||||
//
|
||||
const DTDElementDecl* decl = fElemDeclPool->getByKey(qName);
|
||||
if (!decl)
|
||||
return XMLElementDecl::fgInvalidElemId;
|
||||
return decl->getId();
|
||||
}
|
||||
|
||||
inline const XMLElementDecl* DTDGrammar::getElemDecl( const unsigned int
|
||||
, const XMLCh* const
|
||||
, const XMLCh* const qName
|
||||
, unsigned int) const
|
||||
{
|
||||
const XMLElementDecl* elemDecl = fElemDeclPool->getByKey(qName);
|
||||
|
||||
if (!elemDecl && fElemNonDeclPool)
|
||||
elemDecl = fElemNonDeclPool->getByKey(qName);
|
||||
|
||||
return elemDecl;
|
||||
}
|
||||
|
||||
inline XMLElementDecl* DTDGrammar::getElemDecl (const unsigned int
|
||||
, const XMLCh* const
|
||||
, const XMLCh* const qName
|
||||
, unsigned int)
|
||||
{
|
||||
XMLElementDecl* elemDecl = fElemDeclPool->getByKey(qName);
|
||||
|
||||
if (!elemDecl && fElemNonDeclPool)
|
||||
elemDecl = fElemNonDeclPool->getByKey(qName);
|
||||
|
||||
return elemDecl;
|
||||
}
|
||||
|
||||
inline const XMLElementDecl* DTDGrammar::getElemDecl(const unsigned int elemId) const
|
||||
{
|
||||
// Look up this element decl by id
|
||||
return fElemDeclPool->getById(elemId);
|
||||
}
|
||||
|
||||
inline XMLElementDecl* DTDGrammar::getElemDecl(const unsigned int elemId)
|
||||
{
|
||||
// Look up this element decl by id
|
||||
return fElemDeclPool->getById(elemId);
|
||||
}
|
||||
|
||||
inline XMLSize_t
|
||||
DTDGrammar::putElemDecl(XMLElementDecl* const elemDecl,
|
||||
const bool notDeclared)
|
||||
{
|
||||
if (notDeclared)
|
||||
{
|
||||
if(!fElemNonDeclPool)
|
||||
fElemNonDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(29, 128, fMemoryManager);
|
||||
return fElemNonDeclPool->put((DTDElementDecl*) elemDecl);
|
||||
}
|
||||
|
||||
return fElemDeclPool->put((DTDElementDecl*) elemDecl);
|
||||
}
|
||||
|
||||
// Notation Decl
|
||||
inline const XMLNotationDecl* DTDGrammar::getNotationDecl(const XMLCh* const notName) const
|
||||
{
|
||||
return fNotationDeclPool->getByKey(notName);
|
||||
}
|
||||
|
||||
inline XMLNotationDecl* DTDGrammar::getNotationDecl(const XMLCh* const notName)
|
||||
{
|
||||
return fNotationDeclPool->getByKey(notName);
|
||||
}
|
||||
|
||||
inline XMLSize_t DTDGrammar::putNotationDecl(XMLNotationDecl* const notationDecl) const
|
||||
{
|
||||
return fNotationDeclPool->put(notationDecl);
|
||||
}
|
||||
|
||||
inline bool DTDGrammar::getValidated() const
|
||||
{
|
||||
return fValidated;
|
||||
}
|
||||
|
||||
inline void DTDGrammar::setValidated(const bool newState)
|
||||
{
|
||||
fValidated = newState;
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
277
project/jni/xerces/include/xercesc/validators/DTD/DTDScanner.hpp
Normal file
277
project/jni/xerces/include/xercesc/validators/DTD/DTDScanner.hpp
Normal file
@@ -0,0 +1,277 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDScanner.hpp 676911 2008-07-15 13:27:32Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDSCANNER_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDSCANNER_HPP
|
||||
|
||||
#include <xercesc/validators/DTD/DTDGrammar.hpp>
|
||||
#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
class XMLScanner;
|
||||
|
||||
/*
|
||||
* Default implementation of an XML DTD scanner.
|
||||
*/
|
||||
class DocTypeHandler;
|
||||
|
||||
class VALIDATORS_EXPORT DTDScanner : public XMemory
|
||||
{
|
||||
public:
|
||||
// -----------------------------------------------------------------------
|
||||
// Class specific types
|
||||
//
|
||||
// EntityExpRes
|
||||
// Returned from scanEntityRef() to indicate how the expanded text
|
||||
// was treated.
|
||||
//
|
||||
// IDTypes
|
||||
// Type of the ID
|
||||
// -----------------------------------------------------------------------
|
||||
enum EntityExpRes
|
||||
{
|
||||
EntityExp_Failed
|
||||
, EntityExp_Pushed
|
||||
, EntityExp_Returned
|
||||
};
|
||||
|
||||
enum IDTypes
|
||||
{
|
||||
IDType_Public
|
||||
, IDType_External
|
||||
, IDType_Either
|
||||
};
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDScanner
|
||||
(
|
||||
DTDGrammar* dtdGrammar
|
||||
, DocTypeHandler* const docTypeHandler
|
||||
, MemoryManager* const grammarPoolMemoryManager
|
||||
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
||||
);
|
||||
virtual ~DTDScanner();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Getter methods
|
||||
// -----------------------------------------------------------------------
|
||||
DocTypeHandler* getDocTypeHandler();
|
||||
const DocTypeHandler* getDocTypeHandler() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Setter methods
|
||||
//
|
||||
// setScannerInfo() is called by the scanner to tell the DTDScanner
|
||||
// about the stuff it needs to have access to.
|
||||
// -----------------------------------------------------------------------
|
||||
void setScannerInfo
|
||||
(
|
||||
XMLScanner* const owningScanner
|
||||
, ReaderMgr* const readerMgr
|
||||
, XMLBufferMgr* const bufMgr
|
||||
);
|
||||
|
||||
void setDocTypeHandler
|
||||
(
|
||||
DocTypeHandler* const handlerToSet
|
||||
);
|
||||
|
||||
void scanExtSubsetDecl(const bool inIncludeSect, const bool isDTD);
|
||||
bool scanInternalSubset();
|
||||
bool scanId
|
||||
(
|
||||
XMLBuffer& pubIdToFill
|
||||
, XMLBuffer& sysIdToFill
|
||||
, const IDTypes whatKind
|
||||
);
|
||||
|
||||
private:
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDScanner(const DTDScanner &);
|
||||
DTDScanner& operator = (const DTDScanner&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private DTD scanning methods. These are all in XMLValidator2.cpp
|
||||
// -----------------------------------------------------------------------
|
||||
bool checkForPERef
|
||||
(
|
||||
const bool inLiteral
|
||||
, const bool inMarkup
|
||||
);
|
||||
bool expandPERef
|
||||
(
|
||||
const bool scanExternal
|
||||
, const bool inLiteral
|
||||
, const bool inMarkup
|
||||
, const bool throwEndOfExt = false
|
||||
);
|
||||
bool getQuotedString(XMLBuffer& toFill);
|
||||
XMLAttDef* scanAttDef(DTDElementDecl& elemDecl, XMLBuffer& bufToUse);
|
||||
bool scanAttValue
|
||||
(
|
||||
const XMLCh* const attrName
|
||||
, XMLBuffer& toFill
|
||||
, const XMLAttDef::AttTypes type
|
||||
);
|
||||
void scanAttListDecl();
|
||||
ContentSpecNode* scanChildren
|
||||
(
|
||||
const DTDElementDecl& elemDecl
|
||||
, XMLBuffer& bufToUse
|
||||
);
|
||||
bool scanCharRef(XMLCh& toFill, XMLCh& second);
|
||||
void scanComment();
|
||||
bool scanContentSpec(DTDElementDecl& toFill);
|
||||
void scanDefaultDecl(DTDAttDef& toFill);
|
||||
void scanElementDecl();
|
||||
void scanEntityDecl();
|
||||
bool scanEntityDef();
|
||||
bool scanEntityLiteral(XMLBuffer& toFill);
|
||||
bool scanEntityDef(DTDEntityDecl& decl, const bool isPEDecl);
|
||||
EntityExpRes scanEntityRef(XMLCh& firstCh, XMLCh& secondCh, bool& escaped);
|
||||
bool scanEnumeration
|
||||
(
|
||||
const DTDAttDef& attDef
|
||||
, XMLBuffer& toFill
|
||||
, const bool notation
|
||||
);
|
||||
bool scanEq();
|
||||
void scanIgnoredSection();
|
||||
void scanMarkupDecl(const bool parseTextDecl);
|
||||
bool scanMixed(DTDElementDecl& toFill);
|
||||
void scanNotationDecl();
|
||||
void scanPI();
|
||||
bool scanPublicLiteral(XMLBuffer& toFill);
|
||||
bool scanSystemLiteral(XMLBuffer& toFill);
|
||||
void scanTextDecl();
|
||||
bool isReadingExternalEntity();
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fDocTypeHandler
|
||||
// This holds the optional doc type handler that can be installed
|
||||
// and used to call back for all markup events. It is DTD specific.
|
||||
//
|
||||
// fDumAttDef
|
||||
// fDumElemDecl
|
||||
// fDumEntityDecl
|
||||
// These are dummy objects into which mark decls are parsed when
|
||||
// they are just overrides of previously declared markup decls. In
|
||||
// such situations, the first one wins but we need to have somewhere
|
||||
// to parse them into. So these are lazily created and used as needed
|
||||
// when such markup decls are seen.
|
||||
//
|
||||
// fInternalSubset
|
||||
// This is used to track whether we are in the internal subset or not,
|
||||
// in which case we are in the external subset.
|
||||
//
|
||||
// fNextAttrId
|
||||
// Since att defs are per-element, we don't have a validator wide
|
||||
// attribute def pool. So we use a simpler data structure in each
|
||||
// element decl to store its att defs, and we use this simple counter
|
||||
// to apply a unique id to each new attribute.
|
||||
//
|
||||
// fDTDGrammar
|
||||
// The DTD information we scanned like element decl, attribute decl
|
||||
// are stored in this Grammar.
|
||||
//
|
||||
// fBufMgr
|
||||
// This is the buffer manager of the scanner. This is provided as a
|
||||
// convenience so that the DTDScanner doesn't have to create its own
|
||||
// buffer manager during the parse process.
|
||||
//
|
||||
// fReaderMgr
|
||||
// This is a pointer to the reader manager that is being used by the scanner.
|
||||
//
|
||||
// fScanner
|
||||
// The pointer to the scanner to which this DTDScanner belongs
|
||||
//
|
||||
// fPEntityDeclPool
|
||||
// This is a pool of EntityDecl objects, which contains all of the
|
||||
// parameter entities that are declared in the DTD subsets.
|
||||
//
|
||||
// fEmptyNamespaceId
|
||||
// The uri for all DTD decls
|
||||
//
|
||||
// fDocTypeReaderId
|
||||
// The original reader in the fReaderMgr - to be compared against the
|
||||
// current reader to decide whether we are processing an external/internal
|
||||
// declaration
|
||||
// -----------------------------------------------------------------------
|
||||
MemoryManager* fMemoryManager;
|
||||
MemoryManager* fGrammarPoolMemoryManager;
|
||||
DocTypeHandler* fDocTypeHandler;
|
||||
DTDAttDef* fDumAttDef;
|
||||
DTDElementDecl* fDumElemDecl;
|
||||
DTDEntityDecl* fDumEntityDecl;
|
||||
bool fInternalSubset;
|
||||
unsigned int fNextAttrId;
|
||||
DTDGrammar* fDTDGrammar;
|
||||
XMLBufferMgr* fBufMgr;
|
||||
ReaderMgr* fReaderMgr;
|
||||
XMLScanner* fScanner;
|
||||
NameIdPool<DTDEntityDecl>* fPEntityDeclPool;
|
||||
unsigned int fEmptyNamespaceId;
|
||||
XMLSize_t fDocTypeReaderId;
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDScanner: Getter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline DocTypeHandler* DTDScanner::getDocTypeHandler()
|
||||
{
|
||||
return fDocTypeHandler;
|
||||
}
|
||||
|
||||
inline const DocTypeHandler* DTDScanner::getDocTypeHandler() const
|
||||
{
|
||||
return fDocTypeHandler;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDScanner: Setter methods
|
||||
// ---------------------------------------------------------------------------
|
||||
inline void DTDScanner::setDocTypeHandler(DocTypeHandler* const handlerToSet)
|
||||
{
|
||||
fDocTypeHandler = handlerToSet;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Helper methods
|
||||
// -----------------------------------------------------------------------
|
||||
inline bool DTDScanner::isReadingExternalEntity() {
|
||||
return (fDocTypeReaderId != fReaderMgr->getCurrentReaderNum());
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DTDValidator.hpp 676911 2008-07-15 13:27:32Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DTDVALIDATOR_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DTDVALIDATOR_HPP
|
||||
|
||||
#include <xercesc/util/NameIdPool.hpp>
|
||||
#include <xercesc/framework/XMLValidator.hpp>
|
||||
#include <xercesc/validators/DTD/DTDGrammar.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
class XMLMsgLoader;
|
||||
|
||||
|
||||
//
|
||||
// This is a derivative of the abstract validator interface. This class
|
||||
// implements a validator that supports standard XML 1.0 DTD semantics.
|
||||
// This class handles scanning the internal and external subsets of the
|
||||
// DTD, and provides the standard validation services against the DTD info
|
||||
// it found.
|
||||
//
|
||||
class VALIDATORS_EXPORT DTDValidator : public XMLValidator
|
||||
{
|
||||
public:
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DTDValidator(XMLErrorReporter* const errReporter = 0);
|
||||
virtual ~DTDValidator();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Implementation of the XMLValidator interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual bool checkContent
|
||||
(
|
||||
XMLElementDecl* const elemDecl
|
||||
, QName** const children
|
||||
, XMLSize_t childCount
|
||||
, XMLSize_t* indexFailingChild
|
||||
);
|
||||
|
||||
virtual void faultInAttr
|
||||
(
|
||||
XMLAttr& toFill
|
||||
, const XMLAttDef& attDef
|
||||
) const;
|
||||
|
||||
virtual void preContentValidation(bool reuseGrammar,
|
||||
bool validateDefAttr = false);
|
||||
|
||||
virtual void postParseValidation();
|
||||
|
||||
virtual void reset();
|
||||
|
||||
virtual bool requiresNamespaces() const;
|
||||
|
||||
virtual void validateAttrValue
|
||||
(
|
||||
const XMLAttDef* attDef
|
||||
, const XMLCh* const attrValue
|
||||
, bool preValidation = false
|
||||
, const XMLElementDecl* elemDecl = 0
|
||||
);
|
||||
virtual void validateElement
|
||||
(
|
||||
const XMLElementDecl* elemDef
|
||||
);
|
||||
virtual Grammar* getGrammar() const;
|
||||
virtual void setGrammar(Grammar* aGrammar);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Virtual DTD handler interface.
|
||||
// -----------------------------------------------------------------------
|
||||
virtual bool handlesDTD() const;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Virtual Schema handler interface. handlesSchema() always return false.
|
||||
// -----------------------------------------------------------------------
|
||||
virtual bool handlesSchema() const;
|
||||
|
||||
private:
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DTDValidator(const DTDValidator &);
|
||||
DTDValidator& operator = (const DTDValidator&);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Helper
|
||||
// -----------------------------------------------------------------------
|
||||
void checkTokenList(const XMLAttDef& attDef
|
||||
, bool toValidateNotation);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Private data members
|
||||
//
|
||||
// fDTDGrammar
|
||||
// The DTD information stored.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
DTDGrammar* fDTDGrammar;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Virtual interface
|
||||
// ---------------------------------------------------------------------------
|
||||
inline Grammar* DTDValidator::getGrammar() const {
|
||||
return fDTDGrammar;
|
||||
}
|
||||
|
||||
inline void DTDValidator::setGrammar(Grammar* aGrammar) {
|
||||
fDTDGrammar = (DTDGrammar*) aGrammar;
|
||||
}
|
||||
|
||||
inline void DTDValidator::validateElement (const XMLElementDecl*) {
|
||||
// no special DTD Element validation
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDValidator: DTD handler interface
|
||||
// ---------------------------------------------------------------------------
|
||||
inline bool DTDValidator::handlesDTD() const
|
||||
{
|
||||
// We definitely want to handle DTD scanning
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// DTDValidator: Schema handler interface
|
||||
// ---------------------------------------------------------------------------
|
||||
inline bool DTDValidator::handlesSchema() const
|
||||
{
|
||||
// No Schema scanning
|
||||
return false;
|
||||
}
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: DocTypeHandler.hpp 557282 2007-07-18 14:54:15Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_DOCTYPEHANDLER_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_DOCTYPEHANDLER_HPP
|
||||
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
#include <xercesc/framework/XMLNotationDecl.hpp>
|
||||
#include <xercesc/validators/DTD/DTDAttDef.hpp>
|
||||
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
|
||||
#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
//
|
||||
// This abstract class defines the document type handler API's which can be
|
||||
// used to process the DTD events generated by the DTDScanner as it scans the
|
||||
// internal and external subset.
|
||||
|
||||
class VALIDATORS_EXPORT DocTypeHandler
|
||||
{
|
||||
public:
|
||||
// -----------------------------------------------------------------------
|
||||
// Constructors and Destructor
|
||||
// -----------------------------------------------------------------------
|
||||
DocTypeHandler()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DocTypeHandler()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// The document type handler virtual handler interface
|
||||
// -----------------------------------------------------------------------
|
||||
virtual void attDef
|
||||
(
|
||||
const DTDElementDecl& elemDecl
|
||||
, const DTDAttDef& attDef
|
||||
, const bool ignoring
|
||||
) = 0;
|
||||
|
||||
virtual void doctypeComment
|
||||
(
|
||||
const XMLCh* const comment
|
||||
) = 0;
|
||||
|
||||
virtual void doctypeDecl
|
||||
(
|
||||
const DTDElementDecl& elemDecl
|
||||
, const XMLCh* const publicId
|
||||
, const XMLCh* const systemId
|
||||
, const bool hasIntSubset
|
||||
, const bool hasExtSubset = false
|
||||
) = 0;
|
||||
|
||||
virtual void doctypePI
|
||||
(
|
||||
const XMLCh* const target
|
||||
, const XMLCh* const data
|
||||
) = 0;
|
||||
|
||||
virtual void doctypeWhitespace
|
||||
(
|
||||
const XMLCh* const chars
|
||||
, const XMLSize_t length
|
||||
) = 0;
|
||||
|
||||
virtual void elementDecl
|
||||
(
|
||||
const DTDElementDecl& decl
|
||||
, const bool isIgnored
|
||||
) = 0;
|
||||
|
||||
virtual void endAttList
|
||||
(
|
||||
const DTDElementDecl& elemDecl
|
||||
) = 0;
|
||||
|
||||
virtual void endIntSubset() = 0;
|
||||
|
||||
virtual void endExtSubset() = 0;
|
||||
|
||||
virtual void entityDecl
|
||||
(
|
||||
const DTDEntityDecl& entityDecl
|
||||
, const bool isPEDecl
|
||||
, const bool isIgnored
|
||||
) = 0;
|
||||
|
||||
virtual void resetDocType() = 0;
|
||||
|
||||
virtual void notationDecl
|
||||
(
|
||||
const XMLNotationDecl& notDecl
|
||||
, const bool isIgnored
|
||||
) = 0;
|
||||
|
||||
virtual void startAttList
|
||||
(
|
||||
const DTDElementDecl& elemDecl
|
||||
) = 0;
|
||||
|
||||
virtual void startIntSubset() = 0;
|
||||
|
||||
virtual void startExtSubset() = 0;
|
||||
|
||||
virtual void TextDecl
|
||||
(
|
||||
const XMLCh* const versionStr
|
||||
, const XMLCh* const encodingStr
|
||||
) = 0;
|
||||
|
||||
|
||||
private:
|
||||
// -----------------------------------------------------------------------
|
||||
// Unimplemented constructors and operators
|
||||
// -----------------------------------------------------------------------
|
||||
DocTypeHandler(const DocTypeHandler&);
|
||||
DocTypeHandler& operator=(const DocTypeHandler&);
|
||||
};
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: XMLDTDDescriptionImpl.hpp 527149 2007-04-10 14:56:39Z amassari $
|
||||
*/
|
||||
|
||||
#if !defined(XERCESC_INCLUDE_GUARD_XMLDTDDESCRIPTIONIMPL_HPP)
|
||||
#define XERCESC_INCLUDE_GUARD_XMLDTDDESCRIPTIONIMPL_HPP
|
||||
|
||||
#include <xercesc/framework/XMLDTDDescription.hpp>
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
class XMLPARSER_EXPORT XMLDTDDescriptionImpl : public XMLDTDDescription
|
||||
{
|
||||
public :
|
||||
// -----------------------------------------------------------------------
|
||||
/** @name constructor and destructor */
|
||||
// -----------------------------------------------------------------------
|
||||
//@{
|
||||
XMLDTDDescriptionImpl(
|
||||
const XMLCh* const systemId
|
||||
, MemoryManager* const memMgr
|
||||
);
|
||||
|
||||
~XMLDTDDescriptionImpl();
|
||||
//@}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
/** @name Implementation of GrammarDescription Interface */
|
||||
// -----------------------------------------------------------------------
|
||||
//@{
|
||||
/**
|
||||
* getGrammarKey
|
||||
*
|
||||
*/
|
||||
virtual const XMLCh* getGrammarKey() const ;
|
||||
//@}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
/** @name Implementation of DTDDescription Interface */
|
||||
// -----------------------------------------------------------------------
|
||||
//@{
|
||||
/**
|
||||
* Getter
|
||||
*
|
||||
*/
|
||||
virtual const XMLCh* getRootName() const;
|
||||
virtual const XMLCh* getSystemId() const;
|
||||
|
||||
/**
|
||||
* Setter
|
||||
*
|
||||
*/
|
||||
virtual void setRootName(const XMLCh* const);
|
||||
virtual void setSystemId(const XMLCh* const);
|
||||
//@}
|
||||
|
||||
/***
|
||||
* Support for Serialization/De-serialization
|
||||
***/
|
||||
DECL_XSERIALIZABLE(XMLDTDDescriptionImpl)
|
||||
|
||||
XMLDTDDescriptionImpl(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager);
|
||||
|
||||
private :
|
||||
// -----------------------------------------------------------------------
|
||||
/** name Unimplemented copy constructor and operator= */
|
||||
// -----------------------------------------------------------------------
|
||||
//@{
|
||||
XMLDTDDescriptionImpl(const XMLDTDDescriptionImpl& );
|
||||
XMLDTDDescriptionImpl& operator=(const XMLDTDDescriptionImpl& );
|
||||
//@}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
//
|
||||
// fSystemId:
|
||||
// SYSTEM ID of the grammar
|
||||
//
|
||||
// fRootName:
|
||||
// root name of the grammar
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
const XMLCh* fSystemId;
|
||||
const XMLCh* fRootName;
|
||||
|
||||
};
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user