>       handler.startPrefixMapping(prefix,urlspace);
>       base.toXML(handler);

SAX expects namespaces to be issued _BOTH_ as prefix mappings and as
attributes. Many applications rely on that and use just one or the other,
whichever is most convenient, rather than burning cycles redundantly
checking both. In fact, the SAX spec notes that start/endPrefixMapping is
mostly there for streaming applications which need the namespaces defined
before the attributes are processed.

I believe our code currently responds to the attr rather than the prefix
mapping, which would explain why your attempt to pre-establish a namespace
wasn't being honored. I believe we do generate both events on output,
though; if not, that's a genuine bug and we should fix it.

We've discussed changing the input side of things to accept
startPrefixMapping() and deal with the possible redundancy. I'm not sure
what the current state of that debate is.


Meanwhile, have you considered simply modifying your stylesheet to generate
the proper namespace declaration on output? Or do you really need to set
that programmatically on the _input_ to the processor?



Reply via email to