You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/03/22 22:49:41 UTC
[jira] [Resolved] (CXF-5733) StaxSource doesn't produce correct SAX
events with default namespace
[ https://issues.apache.org/jira/browse/CXF-5733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-5733.
------------------------------
Resolution: Fixed
Assignee: Daniel Kulp
Fix Version/s: 3.0.1
Resolved a long time ago with patch from Grzegorz
> StaxSource doesn't produce correct SAX events with default namespace
> --------------------------------------------------------------------
>
> Key: CXF-5733
> URL: https://issues.apache.org/jira/browse/CXF-5733
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.0.0
> Reporter: Grzegorz Grzybek
> Assignee: Daniel Kulp
> Fix For: 3.0.1
>
>
> There's idiomatic XSLT copy transformation:
> {code:xml}
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="@*|node()">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()" />
> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
> {code}
> Using current {{org.apache.cxf.staxutils.StaxSource}} for such transformation applied on this input document:
> {code:xml}
> <root xmlns="urn:org.apache.cxf:test">Text</root>
> {code}
> produces the following result with Xalan 2.7.1:
> {code:xml}
> < xmlns="urn:org.apache.cxf:test">Text</>
> {code}
> After getting rid of the hack commented with:
> {code:java}
> // Adding namespace declaration as attributes is necessary because
> // the xalan implementation that ships with SUN JDK 1.4 is bugged
> // and does not handle the startPrefixMapping method
> {code}
> And using correct order of events:
> # start prefix mapping
> # start element
> # end element
> # end prefix mapping
> The result was correct on both:
> * Xalan 2.7.1
> * JDK 1.6.0_04 (and laters)
> JDK 1.6.0_04 is the first JDK that ships with JAX-WS 2.1 which seem to be required by CXF.
> regards
> Grzegorz Grzybek
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)