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

Work on AXIOM-429 started by Andreas Veithen.

> The result of OMContainer#addChild should not depend on the state 
> (completeness) of the parent
> ----------------------------------------------------------------------------------------------
>
>                 Key: AXIOM-429
>                 URL: https://issues.apache.org/jira/browse/AXIOM-429
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>             Fix For: 1.2.14
>
>
> Deferred parsing should be transparent to application code and the result (in 
> terms of the content of the resulting document) of an operation on an Axiom 
> tree should not depend on whether the tree is completely built or not. For 
> OMContainer#addChild, this means that the new child should always be added as 
> the last child. This implies that if the parent is not complete, it must be 
> built first. In Axiom 1.2.13 this is not the case and addChild may insert the 
> new child at an unexpected location. This can be demonstrated with the 
> following simple code:
> OMElement parent = OMXMLBuilderFactory.createOMBuilder(new 
> StringReader("<root><a/><b/></root>")).getDocumentElement();
> parent.addChild(factory.createOMElement("c", null));
> The resulting document would be <root><c/><a/><b/></root> instead of the 
> expected <root><a/><b/><c/></root>.
> Fixing this requires some larger changes because the addChild method is also 
> used (directly or indirectly) by the builder (which expects that the new 
> child is added after the last built child).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]

Reply via email to