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 "Sanka Samaranayake (JIRA)" <ji...@apache.org> on 2007/08/06 13:34:01 UTC

[jira] Updated: (WSCOMMONS-229) OMNode.insertSiblingBefore(OMNode) fails if the parent of the argument is different

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

Sanka Samaranayake updated WSCOMMONS-229:
-----------------------------------------

    Attachment: WSCOMMONS-229_patch.txt

Following is the suggest fix for the issue described above.

> OMNode.insertSiblingBefore(OMNode) fails if the parent of the argument is different
> -----------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-229
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-229
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS: 
> ----
> Linux version 2.6.17-gentoo (root@highlander) (gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)) 
> JDK
> ----
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
>            Reporter: Sanka Samaranayake
>            Assignee: Sanka Samaranayake
>         Attachments: WSCOMMONS-229_patch.txt
>
>
> Following snippet illustrates the defect:
>         OMFactory fac = OMAbstractFactory.getOMFactory();
>         
>         OMElement root = fac.createOMElement(new QName("urn:root", "root", "root"));
>         fac.createOMElement(new QName("urn:foo", "foo", "foo"), root);
>         
>         OMElement another = fac.createOMElement(new QName("urn:another", "another", "another"));
>         OMElement bar = fac.createOMElement(new QName("urn:bar", "bar", "bar"), another);
>         
>         OMElement firstChild = root.getFirstElement();
>         firstChild.insertSiblingBefore(bar);
>         
>         System.out.println(root);
> Result: 
>          <root:root xmlns:root="urn:root"><bar:bar xmlns:bar="urn:bar"></bar:bar></root:root>
> where it should have yeilded
>          <root:root xmlns:root="urn:root"><bar:bar xmlns:bar="urn:bar"></bar:bar><foo:foo xmlns:foo="urn:foo"></foo:foo></root:root>

-- 
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