You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Eran Chinthaka (JIRA)" <ji...@apache.org> on 2007/07/10 05:00:13 UTC

[jira] Resolved: (WSCOMMONS-175) Serialization: Namespace declarations only output on first iteration

     [ https://issues.apache.org/jira/browse/WSCOMMONS-175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eran Chinthaka resolved WSCOMMONS-175.
--------------------------------------

    Resolution: Cannot Reproduce

I just tested this within Axiom using woodstox 3.0 and sjsxp 1.0 version and the provided test was successful without any issue. 

I added the provided test case in to org.apache.axiom.om.NamespaceTest. Please see the last test method. 

I also tested the namespace declaration issue shown in DeclTest and it was working fine with woodstox (didn't check with sjsxp). We had couple of problems earlier also with sjsxp and we moved to woodstox some time back. The simple reason was there were some holes in JSR173 itself for namespace handling. If this issue is only with sjsxp and works fine with woodstox, I do not consider this as a blocker as our main concern is with woodstox.
If you feel this should be fixed for sjsxp, please re-open this issue, but this won't regarded as a critical or blocker

> Serialization: Namespace declarations only output on first iteration 
> ---------------------------------------------------------------------
>
>                 Key: WSCOMMONS-175
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-175
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: Sun JDK 1.6, Axiom 1.2.2, Linux 2.6 (Fedora Core 5)
> and
> Sun JDK 1.5.0_11, Axiom 1.2.4, STAX (RI) 1.1.2-dev and 1.2.0 (final), Linux 2.6 (Ubuntu)
>            Reporter: Adam Constabaris
>            Assignee: Eran Chinthaka
>            Priority: Blocker
>         Attachments: DeclTest.java, OMElementSerializationTest.java
>
>
> When serializing a document that contains many child nodes using the same namespace that is NOT declared on the root,
> only the first namespace declaration is output, even if multiple elements require it;
> e.g. document contains root element "root" and two children "foo" and "bar", both in the namespace "http://example.com/ns", which is NOT
> declarted on root, should be serialized as:
> <root>
>   <ns:foo xmlns:ns="http://example.com/ns">foo contents</ns:foo>
>   <ns:bar xmlns:ns="http://example.com/ns">bar contents</ns:foo>
> </root>
> but w/AXIOM 1.2.2 and default StAX parser shipped w/Sun JDK 1.6.0 (SJSXP 1.0?), output is:
> <root>
>   <ns:foo xmlns:ns="http://example.com/ns">foo contents</ns:foo>
>   <ns:bar>bar contents</ns:foo>
> </root>
> I have further verified that the problem does not occur if Woodstox 2.0.5 is used as the StAX implementation.  
> I am not able to verify whether this is due to a bug in Sun's StAX implementation, or in the use AXIOM makes of the various classes.  Possible reference issue for SJXSP: https://sjsxp.dev.java.net/issues/show_bug.cgi?id=31

-- 
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: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org