When XMLDocumentFragmentScannerImpl scans elements it doesn't pass on any
localName or namespaceURI values, but for attributes it contains following
lines...
protected void scanAttribute(XMLAttributes attributes) throws
IOException, XNIException {
...
if (fNamespaces) {
fEntityScanner.scanQName(fAttributeQName);
}
else {
String name = fEntityScanner.scanName();
fAttributeQName.setValues(null, name, name, null);
}
The latter one kicks in and name is applied to both qName and localName.
According to <http://www.saxproject.org/namespaces.html> in my opinion the
localName should be empty.
I've trusted so far localName being empty to imply that namespace awareness
is turned off. Luckily I can work around this problem in SAX relying on
element localName being empty instead.
--
Tuomas
--
View this message in context:
http://www.nabble.com/Why-does-attribute-localName-exist-when-namespace-awareness-is-turned-off--tp25394586p25394586.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]