David Megginson wrote: > Wrong. There's no such thing as a backwards-compatible change to an > API: either you break the drivers or you break the clients. In this > case, clients that expect the old behaviour will probably be OK > (they're unlikely to rely on the Namespace URI being null), but > clients that expect the new behaviour will break on SAX drivers that > implement the old behaviour. This will be a typical bug report: > > I'm using the ACME Java game development kit, and it requires a SAX2 > parser. I installed the FooBar parser, which says it is > SAX2-conformant, and now I get a NullPointerException. Can anyone help?
David, as far as I know SAX specifies that namespace URI must be an empty string if there is no URI. Thus, no user should receive NPE (unless SAX driver does not comply with the SAX specification). So the example you give above should not break anybody. In addition, I believe the new code should still rely on xmlns prefix to recognize the namespace attributes (see http://www.w3.org/2000/xmlns/) [[ Note that you must use the reserved prefix xmlns: when declaring namespaces. It does not work to declare another prefix with this namespace name and then try to use it for namespace declarations. ]] Thank you, -- Elena Litani / IBM Toronto --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
