Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352176 - xml parsing on startElement should be more flexible on using qName or localName
Summary: xml parsing on startElement should be more flexible on using qName or localName
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.5.x   Edit
Assignee: Jan Bartel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 00:54 EDT by Jan Bartel CLA
Modified: 2011-07-15 01:22 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.