Including proper prefixes and qualified names in the Expat parser.
Also changing our SAX codepath to always include values for optional parameters.

In testing Xalan's javax.xml.transform packages with the Expat source code, the
emitted documents were malformed. The underlying problem was that Xalan was
expecting optional parameters to be populated, but Expat was not populating them.

The spec says,
  "Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:
  * the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
  * the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

Although Xalan is technically at fault here, it may take forever to find all of
the places where these optional parameters are assumed to be present. Instead,
I'll just supply them which adds little overhead anyway.

See http://code.google.com/p/android/issues/detail?id=990
2 files changed