[
https://issues.apache.org/jira/browse/AXIOM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496814#comment-13496814
]
Hudson commented on AXIOM-441:
------------------------------
Integrated in ws-axiom-trunk #1269 (See
[https://builds.apache.org/job/ws-axiom-trunk/1269/])
AXIOM-441: Fixed an IllegalArgumentException that occurs with empty default
namespace attributes if the StAX implementation in OpenJDK 7 is used. Note that
this XML construct is amply covered by the test suites, but right now we don't
have a simple way to execute them against the OpenJDK StAX implementation.
(Revision 1408984)
AXIOM-441: Added some stuff needed to run our test suites with the StAX
implementation in Java 7. (Revision 1408980)
Result = ABORTED
veithen :
Files :
*
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMElementEx.java
*
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
veithen :
Files :
* /webservices/commons/trunk/modules/axiom/modules/axiom-parent/pom.xml
*
/webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/conformance/ConformanceTestFile.java
> Fails to parse XML with empty default namespace attribute value
> ---------------------------------------------------------------
>
> Key: AXIOM-441
> URL: https://issues.apache.org/jira/browse/AXIOM-441
> Project: Axiom
> Issue Type: Bug
> Components: API, LLOM
> Affects Versions: 1.2.13
> Reporter: Paul Millar
> Assignee: Andreas Veithen
> Labels: patch
> Fix For: 1.2.14
>
> Attachments: patch-fix-StAXOMBuilder.diff
>
>
> From:
> http://www.w3.org/TR/2009/REC-xml-names-20091208/
> "The attribute value in a default namespace declaration MAY be empty. This
> has the same effect, within the scope of the declaration, of there being no
> default namespace."
> Here is a document that demonstrates this:
> <?xml version='1.0' encoding='UTF-8'?>
> <foo xmlns='http://example.org/'>
> <bar xmlns=''>value</bar>
> </foo>
> The following code snippet (slightly modified from Axiom documentation) uses
> Axiom to parse a String variable xmlData:
> InputStream in =
> new
> ByteArrayInputStream(xmlData.getBytes(Charset.forName("UTF-8")));
> OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(in);
> OMElement documentElement = builder.getDocumentElement();
> documentElement.serialize(System.out);
> System.out.println();
> When given the above XML example, an IllegalArgumentException is thrown:
> Exception in thread "main" java.lang.IllegalArgumentException: Namespace URI
> may not be null
> at
> org.apache.axiom.om.impl.llom.OMNamespaceImpl.<init>(OMNamespaceImpl.java:38)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.addNamespaceDeclaration(OMElementImpl.java:430)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.processNamespaceData(StAXOMBuilder.java:608)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.populateOMElement(StAXOMBuilder.java:430)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:461)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.createNextOMElement(StAXOMBuilder.java:318)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:709)
> at
> org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:121)
> at
> org.apache.axiom.om.impl.traverse.OMChildrenIterator.getNextNode(OMChildrenIterator.java:36)
> at
> org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:69)
> at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:555)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:846)
> at
> org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:120)
> at
> org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:108)
> at
> org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:127)
> This looks like a bug.
> Cheers,
> Paul.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]