Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352176

Summary: xml parsing on startElement should be more flexible on using qName or localName
Product: [RT] Jetty Reporter: Jan Bartel <janb>
Component: serverAssignee: Jan Bartel <janb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.4.4   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Bartel CLA 2011-07-15 00:54:16 EDT
On Android 1.6, their xml parser does not seem to be implemented the same way as the default java xml parser.

Specifically:

W/System.err(  281): isValidating: false
W/System.err(  281): isNamespaceAware: true
W/ExpatReader(  281): DTD handlers aren't supported.
W/System.err(  281): StartElement: uri= localName=Configure qName=


Whereas on android 2.2 (which as had some fixes to the xml parser, see http://code.google.com/p/android/issues/detail?id=4286, http://code.google.com/p/android/issues/detail?id=6632, http://code.google.com/p/android/issues/detail?id=990) you get:

W/System.err(  282): isValidating: false
W/System.err(  282): isNamespaceAware: true
W/System.err(  282): StartElement: uri= localName=Configure qName=Configure

Note that on android 2.2, both localName and qName are set.

Currently, jetty decides to use either localName or qName based on the value of the startElement uri parameter.

It would be better to base it in line with the javadoc for ContentHandler, which is independent of whether or not the uri is set:

    localName - the local name (without prefix), or the empty string if Namespace processing is not being performed
    qName - the qualified name (with prefix), or the empty string if qualified names are not available
Comment 1 Jan Bartel CLA 2011-07-15 01:22:57 EDT
Fixed for jetty-7.5.0.