Description
When doing namespace-aware parsing, the startElement() and endElement() events construct the QName parameter when the value is already available.
I am submitting a proposed patch, which also removes an unecessary cast, an now-unused data member, and narrows the scope of two variables.
One additional point that I did not want to address with this patch is whether or not these two if conditions are exclusive:
if (XMLString::equals(tempAttr->getQName(), nsString))
nsURI = tempAttr->getValue();
if (XMLString::equals(tempAttr->getPrefix(), nsString))
I believe they are, since the QName and the prefix can never be equal, but I was not 100% sure. If the are, then this can be modified to:
if (XMLString::equals(tempAttr->getQName(), nsString))
nsURI = tempAttr->getValue();
else if (XMLString::equals(tempAttr->getPrefix(), nsString))