diff --git a/src/xercesc/framework/psvi/XSElementDeclaration.cpp b/src/xercesc/framework/psvi/XSElementDeclaration.cpp index 294b2e13daec74acf3f4430b516724f815bf3f7b..a0f2320ddc8ec4c8ea47aea6293876b13fa676bb 100644 --- a/src/xercesc/framework/psvi/XSElementDeclaration.cpp +++ b/src/xercesc/framework/psvi/XSElementDeclaration.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.7 2003/11/23 16:20:16 knoaman + * PSVI: pass scope and enclosing type during construction. + * * Revision 1.6 2003/11/21 17:29:53 knoaman * PSVI update * @@ -100,14 +103,18 @@ XSElementDeclaration::XSElementDeclaration , XSAnnotation* const annot , XSNamedMap<XSIDCDefinition>* const identityConstraints , XSModel* const xsModel + , XSConstants::SCOPE elemScope + , XSComplexTypeDefinition* const enclosingTypeDefinition , MemoryManager* const manager ) : XSObject(XSConstants::ELEMENT_DECLARATION, xsModel, manager) , fDisallowedSubstitutions(0) , fSubstitutionGroupExclusions(0) , fId(0) + , fScope(elemScope) , fSchemaElementDecl(schemaElementDecl) , fTypeDefinition(typeDefinition) + , fEnclosingTypeDefinition(enclosingTypeDefinition) , fSubstitutionGroupAffiliation(substitutionGroupAffiliation) , fIdentityConstraints(identityConstraints) { @@ -171,20 +178,6 @@ unsigned int XSElementDeclaration::getId() const // --------------------------------------------------------------------------- // XSElementDeclaration: access methods // --------------------------------------------------------------------------- -XSConstants::SCOPE XSElementDeclaration::getScope() const -{ - if (fSchemaElementDecl->getEnclosingScope() == Grammar::TOP_LEVEL_SCOPE) - return XSConstants::SCOPE_GLOBAL; - else - return XSConstants::SCOPE_LOCAL; -} - -XSComplexTypeDefinition *XSElementDeclaration::getEnclosingCTDefinition() const -{ - // REVISIT - return 0; -} - XSConstants::VALUE_CONSTRAINT XSElementDeclaration::getConstraintType() const { if (fSchemaElementDecl->getMiscFlags() & SchemaSymbols::XSD_FIXED) diff --git a/src/xercesc/framework/psvi/XSElementDeclaration.hpp b/src/xercesc/framework/psvi/XSElementDeclaration.hpp index 8f67ee80af65fb48f53a7c4cb891f32bda8fead2..22482fcd73eab6eb1961bd8ff2ec30496030ba01 100644 --- a/src/xercesc/framework/psvi/XSElementDeclaration.hpp +++ b/src/xercesc/framework/psvi/XSElementDeclaration.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.6 2003/11/23 16:20:16 knoaman + * PSVI: pass scope and enclosing type during construction. + * * Revision 1.5 2003/11/21 17:29:53 knoaman * PSVI update * @@ -120,6 +123,8 @@ public: , XSAnnotation* const annot , XSNamedMap<XSIDCDefinition>* const identityConstraints , XSModel* const xsModel + , XSConstants::SCOPE elemScope = XSConstants::SCOPE_ABSENT + , XSComplexTypeDefinition* const enclosingTypeDefinition = 0 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager ); @@ -297,8 +302,10 @@ protected: short fDisallowedSubstitutions; short fSubstitutionGroupExclusions; unsigned int fId; + XSConstants::SCOPE fScope; SchemaElementDecl* fSchemaElementDecl; XSTypeDefinition* fTypeDefinition; + XSComplexTypeDefinition* fEnclosingTypeDefinition; XSElementDeclaration* fSubstitutionGroupAffiliation; XSAnnotation* fAnnotation; XSNamedMap<XSIDCDefinition>* fIdentityConstraints; @@ -339,6 +346,16 @@ inline void XSElementDeclaration::setId(unsigned int id) fId = id; } +inline XSConstants::SCOPE XSElementDeclaration::getScope() const +{ + return fScope; +} + +inline XSComplexTypeDefinition *XSElementDeclaration::getEnclosingCTDefinition() const +{ + return fEnclosingTypeDefinition; +} + XERCES_CPP_NAMESPACE_END