cargilld 2004/02/11 04:42:50
Modified: c/src/xercesc/internal WFXMLScanner.cpp
Log:
Fix for bug 26131.
Revision Changes Path
1.20 +22 -18 xml-xerces/c/src/xercesc/internal/WFXMLScanner.cpp
Index: WFXMLScanner.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/WFXMLScanner.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- WFXMLScanner.cpp 29 Jan 2004 11:46:30 -0000 1.19
+++ WFXMLScanner.cpp 11 Feb 2004 12:42:50 -0000 1.20
@@ -1433,23 +1433,6 @@
}
}
- // check for duplicate namespace attributes:
- // by checking for qualified names with the same local part and with
prefixes
- // which have been bound to namespace names that are identical.
- XMLAttr* loopAttr;
- for (unsigned int attrIndex=0; attrIndex < attCount; attrIndex++) {
- loopAttr = fAttrList->elementAt(attrIndex);
- if (curAtt->getURIId() == loopAttr->getURIId() &&
- XMLString::equals(curAtt->getName(), loopAttr->getName())) {
- emitError
- (
- XMLErrs::AttrAlreadyUsedInSTag
- , curAtt->getName()
- , elemDecl->getFullName()
- );
- }
- }
-
// increment attribute count
attCount++;
@@ -1512,6 +1495,27 @@
)
);
}
+
+ // check for duplicate namespace attributes:
+ // by checking for qualified names with the same local part and with prefixes
+ // which have been bound to namespace names that are identical.
+ XMLAttr* loopAttr;
+ XMLAttr* curAtt;
+ for (unsigned int attrIndex=0; attrIndex < attCount-1; attrIndex++) {
+ loopAttr = fAttrList->elementAt(attrIndex);
+ for (unsigned int curAttrIndex = attrIndex+1; curAttrIndex < attCount;
curAttrIndex++) {
+ curAtt = fAttrList->elementAt(curAttrIndex);
+ if (curAtt->getURIId() == loopAttr->getURIId() &&
+ XMLString::equals(curAtt->getName(), loopAttr->getName())) {
+ emitError
+ (
+ XMLErrs::AttrAlreadyUsedInSTag
+ , curAtt->getName()
+ , elemDecl->getFullName()
+ );
+ }
+ }
+ }
// Resolve the qualified name to a URI.
unsigned int uriId = resolvePrefix
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]