You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Chris Simmons (JIRA)" <xa...@xml.apache.org> on 2007/10/25 17:08:50 UTC
[jira] Commented: (XALANJ-2409) LSSerializerImpl adds redundant
xmlns:xml namespace bindings.
[ https://issues.apache.org/jira/browse/XALANJ-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537627 ]
Chris Simmons commented on XALANJ-2409:
---------------------------------------
This is worse than I originally thought. The xerces parser explicitly throws away any xmlns:xml bindings presumably since they're implicit.
So if you start with a document that has no xml:xmlns attributes but uses the xml namespace, load it using xerces then serialize it using xalan (making *no changes*) it comes out splattered with xmlns:xml prefix bindings. Our documents contain thousands of elements with xml:lang attributes on them.
> LSSerializerImpl adds redundant xmlns:xml namespace bindings.
> -------------------------------------------------------------
>
> Key: XALANJ-2409
> URL: https://issues.apache.org/jira/browse/XALANJ-2409
> Project: XalanJ2
> Issue Type: Improvement
> Components: Serialization
> Reporter: Chris Simmons
> Priority: Minor
> Attachments: TestSerializer.java
>
>
> Appologies if I'm logging this against the wrong component. I'm using the LSSerializerImpl bundled with xerces 2.9.0 which I believe is actually drawn from the Xalan project nowadays.
> We switched over when the xerces serializers were deprecated but found tha the xalan serializer insists on adding bindings for the xml namespace. I (and the xerces serializer) believe that this is not necessary - the xml namespace is built-in.
> This resulted in our XML being littered with thousands of needless xmlns:xml=... attributes. We've worked around this by making sure we put one on the document root. I'd like to see these attributes not serialized.
> I'll attach a test showing this behviour shortly. It shows that xerces didn't add them but xalan does.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org