You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2005/09/01 13:32:00 UTC
Re: [stax_builders] Re: [axis2] Writing an empty element?
Aleksander Slominski wrote:
>Dennis Sosnoski wrote:
>
>
>
>>Aleksander Slominski wrote:
>>
>>
>>
>>>please pull StAX RI from SVN (http://stax.codehaus.org/Home) and
>>>build jar file (ant).
>>>
>>>then if you run test program (below) it should be producing this:
>>>
>>>Created not using repairing :-
>>><?xml version='1.0' encoding='utf-8'?><env:Envelope
>>>xmlns:env="http://www.w3.org/2003/05/soap-envelope"
>>>xmlns:test="http://someTestUri"><env:Body><test foo="bar"/><test
>>>foo="bar"></test><test foo="bar"> </test></env:Body></env:Envelope>
>>>Created using repairing :-
>>><?xml version='1.0' encoding='utf-8'?><env:Envelope
>>>xmlns:env="http://www.w3.org/2003/05/soap-envelope"
>>>xmlns:test="http://someTestUri" xmlns:test="http://someTestUri"
>>>xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><test
>>>foo="bar"/><test foo="bar"></test><test foo="bar">
>>></test></env:Body></env:Envelope>
>>>
>>>
>>>
>>Maybe I missed something in this exchange, Alex, but the second
>>(repairing) version appears to be bad XML - the xmlns:test
>>attribute/namespace declaration appears twice on the env:Envelope
>>start tag.
>>
>>
>
>there is a long standing bug in a way StAX under-specified "namespace
>repairing" feature is implemented in RI (it is amazing how
>complex/incomplete this feature is considering how simple and
>essentially bullet-proof XmlPull::XmlSerializer is - it looked good on
>paper to have "repairing namespace", oh well ...) - and fixing it is
>not fun as XMLWriterBase is anything but simple - i just wasted some
>time trying to grasp inner working of XMLWriterBase ...
>
>
>
for now it is fixed:
http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=208
after i run test program i get:
Created not using repairing :-
<?xml version='1.0' encoding='utf-8'?><env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:test="http://someTestUri"/>
Created using repairing :-
<?xml version='1.0' encoding='utf-8'?><env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:test="http://someTestUri"/>
and for empty elem:
Created not using repairing :-
<?xml version='1.0' encoding='utf-8'?><env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:test="http://someTestUri"><env:Body><test foo="bar"/><test
foo="bar"></test><test foo="bar"> </test></env:Body></env:Envelope>
Created using repairing :-
<?xml version='1.0' encoding='utf-8'?><env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:test="http://someTestUri"><env:Body><test foo="bar"/><test
foo="bar"></test><test foo="bar"> </test></env:Body></env:Envelope>
so far so good ..
alek
--
The best way to predict the future is to invent it - Alan Kay