Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.4.0
-
None
-
Operating System: Other
Platform: Other
-
26131
Description
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()))
}
...
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))
...
else
...
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.