SchemaAttDef::SchemaAttDef(const SchemaAttDef* other) : XMLAttDef(other->getValue(), other->getType(), other->getDefaultType(), other->getEnumeration(), other->getMemoryManager()) , fElemId(XMLElementDecl::fgInvalidElemId) , fAttName(0) , fDatatypeValidator(other->fDatatypeValidator) , fAnyDatatypeValidator(other->fAnyDatatypeValidator) , fMemberTypeValidator(other->fMemberTypeValidator) , fNamespaceList(0) , fValidity(other->fValidity) , fValidation(other->fValidation) , fPSVIScope(other->fPSVIScope) , fBaseAttDecl(other->fBaseAttDecl) { QName* otherName = other->getAttName(); fAttName = new (getMemoryManager()) QName(otherName->getPrefix(), otherName->getLocalPart(), otherName->getURI(), getMemoryManager()); if (other->fNamespaceList && other->fNamespaceList->size()) { fNamespaceList = new (getMemoryManager()) ValueVectorOf<unsigned int>(*(other->fNamespaceList)); } }
// --------------------------------------------------------------------------- // XercesAttGroupInfo: Getter methods // --------------------------------------------------------------------------- const SchemaAttDef* XercesAttGroupInfo::getAttDef(const XMLCh* const baseName, const int uriId) const { // If no list, then return a null if (!fAttributes) return 0; XMLSize_t attSize = fAttributes->size(); for (XMLSize_t i=0; i<attSize; i++) { const SchemaAttDef* attDef = fAttributes->elementAt(i); QName* attName = attDef->getAttName(); if (uriId == (int) attName->getURI() && XMLString::equals(baseName, attName->getLocalPart())) { return attDef; } } return 0; }
bool XercesAttGroupInfo::containsAttribute(const XMLCh* const name, const unsigned int uri) { if (fAttributes) { XMLSize_t attCount = fAttributes->size(); if (attCount) { for (XMLSize_t i=0; i < attCount; i++) { QName* attName = fAttributes->elementAt(i)->getAttName(); if (attName->getURI() == uri && XMLString::equals(attName->getLocalPart(),name)) { return true; } } } } return false; }