DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26131>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26131 WFXMLScanner fails for two attributes with same local name but different namespaces Summary: WFXMLScanner fails for two attributes with same local name but different namespaces Product: Xerces-C++ Version: 2.4.0 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Non-Validating Parser AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If you parse this document <?xml version="1.0" encoding="iso-8859-1"?> <x xmlns:a="a" xmlns:b="b"> <y a:driss="aaa" b:driss="aaa"/> </x> with WFXMLScanner, it reports the double defined attribute "driss". This is because within WFXMLScanner.cpp ... 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() ); } } ... all "curAtt->getURIId()" and "loopAttr->curAtt->getURIId()" are the same for all prefixed or non prefixed attributes. In my opinion there is missing (the same file, but somewhere above) ... if (attPrefix && *attPrefix) { if (XMLString::equals(attPrefix, XMLUni::fgXMLString)) { curAtt->setURIId(fXMLNamespaceId); } ... else { *** curAtt->setURIId(fElemStack.getPrefixId(attPrefix)); *** fAttrNSList->addElement(curAtt); } ... the "***" marked line. But I am not sure, whether namespace attributes within an element are processed first, and the namespace will be found on the element-stack prefixes. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]