DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26319>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26319 Namespaced attributes not correctly serialized ------- Additional Comments From [EMAIL PROTECTED] 2004-02-13 19:03 ------- Hi Brian, I think you are referring to patch http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=10324 where I made count static. Santiago raised the same concern yesterday regarding the need for synchronization and I agreed with him that this was not needed and put in another patch. http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=10341 The patch currently just checks for all the attributes present in a particular element node. And if there is no prefix for any attribute it generates and assigns the prefix associated with the attribute's namespace uri. I have also tested for child elements within that element not having attribute prefixes . In that case too if ns0, ns1 get redeclared though their namespace uri's are different. Attaching the outputs from identity transformation and xml serializers , ------%<------ JAXP/Xalan explicit identity transformation wrote: <?xml version="1.0" encoding="UTF-8"?> <foo xmlns="urn:test1"> <bar xmlns:ns0="urn:test3" ns0:key="val" xmlns:ns1="urn:test4" ns1:key1="val1" xmlns:ns2="urn:test5" ns2:key2="val2"> <bar1 xmlns:ns0="urn:test7" ns0:key7="val" xmlns:ns1="urn:test8" ns1:key8="val1"/> </bar> <baz xmlns="urn:test2"/> <quux1/> <quux2 xmlns=""/> <quux3 xmlns="a:myuri"/> </foo> ------%<------ XMLSerializer wrote: <?xml version="1.0" encoding="UTF-8"?> <foo xmlns="urn:test1"> <bar xmlns:NS1="urn:test3" NS1:key="val" xmlns:NS2="urn:test4" NS2:key1="val1" xmlns:NS3="urn:test5" NS3:key2="val2"> <bar1 xmlns:NS1="urn:test7" NS1:key7="val" xmlns:NS2="urn:test8" NS2:key8="val1"/> </bar> <baz xmlns="urn:test2"/> <quux1/> <quux2 xmlns=""/> <quux3 xmlns="a:myuri"/> </foo> ------%<------ Also you can see in the above case for elements foo, baz there are no prefixes generated and namespace defaulting is takes place. The following is the testcase output compared with xml serializers after the fix. ------%<------ JAXP/Xalan explicit identity transformation wrote: <?xml version="1.0" encoding="UTF-8"?> <foo xmlns="urn:test1"> <bar xmlns:ns0="urn:test3" ns0:key="val" xmlns:t4="urn:test4" t4:key="val"/> <baz xmlns="urn:test2"/> <quux1/> <quux2 xmlns=""/> <quux3 xmlns="a:myuri"/> </foo> ------%<------ XMLSerializer wrote: <?xml version="1.0" encoding="UTF-8"?> <foo xmlns="urn:test1"> <bar xmlns:NS1="urn:test3" NS1:key="val" xmlns:t4="urn:test4" t4:key="val"/> <baz xmlns="urn:test2"/> <quux1/> <quux2 xmlns=""/> <quux3 xmlns="a:myuri"/> </foo> ------%<------ I hope I have answered your question. Please let me know if you need more information. Regards, Bhakti
