Joerg Heinicke wrote:

Carsten Ziegeler wrote:
Sylvain Wallez wrote:
Bruno Dumon wrote:

Ok, convinced. I will revert it and add it to the other mentioned generators.

Furthermore, the ContentHandler.startElement() doc says (see [1]) that
xmlns:* attributes are only added if the
http://xml.org/sax/features/namespaces-prefixes feature is true.


This refers only to the /global/ namespace declarations. The namespaced elements will be also correct, if they have a qname consisting of prefix and local name and the namespace uri set. If I now interpret it correctly the prefix mapping will avoid the namespace declaration on every element.


The qname is also optional and related to the same "namespace-prefixes" feature to be true, meaning in most cases, you may only have namespace URI and local name.

Most of the code in AbstractTextSerializer is related to an old Xalan bug (may have been fixed now) which _required_ the qname to be present to correctly serialize.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to