On 10/28/10 12:08 PM, Blake Sullivan wrote:
I was thinking that this was an XHTML ResponseWriter thing. It's
not
like the ResponseWriter doesn't know that nobody has output a prefix
mapping for XHTML yet (ignoring the case where it was sent out through
unescaped text and even then creating a new mapping isn't the end of
the world as long as it doesn't conflict).
Right. I think this would work well for simple use cases - such as
ensuring that the root <html> element ends up with the proper xhtml
namespace.
Should we consider more complex use cases, eg:
In this case, the Facelets compiler has some chance of figuring out that
the SVG namespace needs to be pushed down to the <svg> element. By the
time we get to the ResponseWriter, we have less information available to
us, and thus harder to correct arbitrary missing namespaces.
I don't know how much we care about solving this more generic case. The
xhtml namespace issue is clearly more pressing.
We will eventually have a bigger problem that the ResponseWriter
interface allows no way to specify a namespace. This is lame and I'm
not a big fan of the workaround of abusing the default namespace or
passing the prefixes in with the element names.
Agreed.
Andy
-- Blake Sullivan