http://ws.apache.org/axis2/0_94/OMTutorial.html Examples are incorrect
----------------------------------------------------------------------
Key: AXIS2-3273
URL: https://issues.apache.org/jira/browse/AXIS2-3273
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: documentation
Affects Versions: 1.3
Environment: documentation
Reporter: Martin Gainty
http://ws.apache.org/axis2/0_94/OMTutorial.html
There is an example for Code Listing 6:
OMFactory factory = OMAbstractFactory.getOMFactory();
OMNamespace ns1 = factory.createOMNamespace("bar","x");
OMElement root = factory.createOMElement("root",ns1);
OMNamespace ns2 = root.declareNamespace("bar1","y");
OMElement elt1 = factory.createOMElement("foo",ns1);
OMElement elt2 = factory.createOMElement("yuck",ns2);
OMText txt1 = factory.createText(elt2,"blah");
elt2.addChild(txt1);
elt1.addChild(elt2);
root.addChild(elt1);
Serilization of the root element produces the following XML
<x:root xmlns:x="bar" xmlns:y="bar1">
<x:foo>
<y:yuck>blah</y:yuck>
</x:foo>
</x:root>
//CORRECT!
then later on
Take the following case where a similar Code Listing to Code Listing 6 is used,
but with two elements having the same namespace. (NOTE: they are differenent
namespaces!)
Note that the newly added items are in bold. (Not in IE 6)
Code Listing 11
OMFactory factory = OMAbstractFactory.getOMFactory();
OMNamespace ns1 = factory.createOMNamespace("bar","x");
OMElement root = factory.createOMElement("root",ns1);
OMNamespace ns2 = root.declareNamespace("bar1","y");
OMElement elt1 = factory.createOMElement("foo",ns1);
OMElement elt2 = factory.createOMElement("yuck",ns2);
OMText txt1 = factory.createText(elt2,"blah");
elt2.addChild(txt1);
elt1.addChild(elt2);
root.addChild(elt1);
Serialization of the root element provides the following XML
<x:root xmlns:x="bar" xmlns:y="bar1">
<x:foo>
<y:yuck>blahblah</y:yuck> //WRONG!
<y:yuck>blah</y:yuck>
</x:foo>
</x:root>
//INCORRECT.. <y:yuck>blahblah</y:yuck> is never produced!
Ie6.0.28 SP1
Martin--
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]