Improved StAX<->SAX bridge

Improved the SAX to StAX (and vice-versa) bridge exposed via StaxUtils.
The old integration had some issues with namespace declaration
attributes, brought to light in a XMLUnit upgrade.

Issue: SPR-11549
This commit is contained in:
Arjen Poutsma
2014-03-13 15:55:20 +01:00
committed by unknown
parent a2f1169e82
commit f2f355e76c
19 changed files with 850 additions and 625 deletions

View File

@@ -75,6 +75,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests {
*/
private static final String XSI_EXPECTED_STRING = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<objects><castor-object xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xmlns:java=\"http://java.sun.com\""
+ " xsi:type=\"java:org.springframework.oxm.castor.CastorObject\">"
+ "<name>test</name><value>8</value></castor-object></objects>";
@@ -89,6 +90,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests {
*/
private static final String ROOT_WITH_XSI_EXPECTED_STRING = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<objects xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xmlns:java=\"http://java.sun.com\""
+ " xsi:type=\"java:java.util.Arrays$ArrayList\">"
+ "<castor-object xsi:type=\"java:org.springframework.oxm.castor.CastorObject\">"
+ "<name>test</name><value>8</value></castor-object></objects>";
@@ -98,6 +100,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests {
*/
private static final String ROOT_WITHOUT_XSI_EXPECTED_STRING = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<objects><castor-object xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xmlns:java=\"http://java.sun.com\""
+ " xsi:type=\"java:org.springframework.oxm.castor.CastorObject\">"
+ "<name>test</name><value>8</value></castor-object></objects>";