You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Simone Gianni <s....@thebug.it> on 2004/06/23 19:25:48 UTC

XMLWriter big bug in 2.1 M1

Hi all,
i'm working with 2.1M1 client library, and while issuing some PROPPATCH 
methods, i noticed a simple but very annoying bug. If only the namespace 
URI (and not the namespace abbreviation prefix) of the property name is 
specified, it simply does not work, because in XMLWriter there are some 
(apparently) debug strings.

Have a look, while trying to PROPPATCH the "creator" property in 
"http://my.name/space" :

PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
Authorization: Basic blablablabla
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: 192.168.0.9:8081
Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
$Path=/slide
Content-Length: 159

<?xml version="1.0" encoding="utf-8" ?>
  <D:propertyupdate xmlns:D="DAV:">
    <D:set>
      <D:prop>
        <op3creator xmlns="http://my.name/space"></creator>
      </D:prop>
    </D:set>
  </D:propertyupdate>


What's that op3? and what are op4, nc3 and nc4? I think they were added 
while coding to make some tests and have a quick feedback, the code is :

           switch (type) {
            case OPENING:
                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
                    buffer.append("<op3" + name + " xmlns=\"" + 
namespaceInfo
                                  + "\">");
                } else {
                    buffer.append("<op4" + name + ">");
                }
                break;
            case CLOSING:
                buffer.append("</" + name + ">");
                break;
            case NO_CONTENT:
            default:
                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
                    buffer.append("<nc3" + name + " xmlns=\"" + 
namespaceInfo
                                  + "\"/>");
                } else {
                    buffer.append("<nc4" + name + ">");
                }
                break;
            }

In CVS it results this strings are there from 1.3 version of XMLWriter, 
dated 14/04/04 and are still there in version 1.5 dated 22/04/04 tagged 
for 2.1M1. Also, if NO_CONTENT  and no namespace, it misses the final 
slash (near nc4), thus producing an open element instead of a no content 
one.

The version under the 2.1 branch is the 1.2, which does not have this 
problem.

Should I submit a bug report?

Ciao,
Simone Gianni


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
Hi Simone!

Sorry, for messing it up again. Do not know how this happened. I have 
(re-)reverted my accidental checkin.

Oliver

Simone Gianni wrote:
> Hey Oliver,
> Ingo reverted it to 1.2, then you commited  "Cleaned version that does 
> not allow any reads outside of transactions...." which placed spurious 
> strings back in it. I've checked out the 2.1M1 version, including the 
> previous patches by Thomas, removed the problem, compiled, tested, 
> created the bug and attached the patch. I hope having done nothing bad, 
> but I really need this part working, I'm under stressed developing :( .
> 
> Simone
> 
> Oliver Zeigermann wrote:
> 
>> I can not talk to Thomas now, but this seems to be obvious for me. 
>> Thanks for reverting it :)
>>
>> Cheers,
>>
>> Oliver
>>
>> Ingo Brunberg wrote:
>>
>>> I have reverted that change before I read this mail. Perhaps it was
>>> just an oversight as Simone guessed.
>>>
>>> Ingo
>>>
>>>
>>>> I will have a look at it ASAP.
>>>>
>>>> Oliver
>>>>
>>>> Ingo Brunberg wrote:
>>>>
>>>>
>>>>> Yes, this was also the reason for a bug in AclMethod I worked on
>>>>> yesterday. There I ended up with calling another method of XMLPrinter.
>>>>>
>>>>> Nonetheles, as you have noticed the method is needed by other classes,
>>>>> too.
>>>>>
>>>>> Oliver, do you know what that change is good for? The CVS log mentions
>>>>> a patch by Thomas Bernert.
>>>>>
>>>>> Ingo
>>>>>
>>>>>
>>>>>
>>>>>> Hi all,
>>>>>> i'm working with 2.1M1 client library, and while issuing some 
>>>>>> PROPPATCH methods, i noticed a simple but very annoying bug. If 
>>>>>> only the namespace URI (and not the namespace abbreviation prefix) 
>>>>>> of the property name is specified, it simply does not work, 
>>>>>> because in XMLWriter there are some (apparently) debug strings.
>>>>>>
>>>>>> Have a look, while trying to PROPPATCH the "creator" property in 
>>>>>> "http://my.name/space" :
>>>>>>
>>>>>> PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
>>>>>> Authorization: Basic blablablabla
>>>>>> Content-Type: text/xml; charset=utf-8
>>>>>> User-Agent: Jakarta Commons-HttpClient/2.0final
>>>>>> Host: 192.168.0.9:8081
>>>>>> Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
>>>>>> $Path=/slide
>>>>>> Content-Length: 159
>>>>>>
>>>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>>>> <D:propertyupdate xmlns:D="DAV:">
>>>>>>   <D:set>
>>>>>>     <D:prop>
>>>>>>       <op3creator xmlns="http://my.name/space"></creator>
>>>>>>     </D:prop>
>>>>>>   </D:set>
>>>>>> </D:propertyupdate>
>>>>>>
>>>>>>
>>>>>> What's that op3? and what are op4, nc3 and nc4? I think they were 
>>>>>> added while coding to make some tests and have a quick feedback, 
>>>>>> the code is :
>>>>>>
>>>>>>          switch (type) {
>>>>>>           case OPENING:
>>>>>>               if ((namespaceInfo != null) && 
>>>>>> (namespaceInfo.length()>0)) {
>>>>>>                   buffer.append("<op3" + name + " xmlns=\"" + 
>>>>>> namespaceInfo
>>>>>>                                 + "\">");
>>>>>>               } else {
>>>>>>                   buffer.append("<op4" + name + ">");
>>>>>>               }
>>>>>>               break;
>>>>>>           case CLOSING:
>>>>>>               buffer.append("</" + name + ">");
>>>>>>               break;
>>>>>>           case NO_CONTENT:
>>>>>>           default:
>>>>>>               if ((namespaceInfo != null) && 
>>>>>> (namespaceInfo.length()>0)) {
>>>>>>                   buffer.append("<nc3" + name + " xmlns=\"" + 
>>>>>> namespaceInfo
>>>>>>                                 + "\"/>");
>>>>>>               } else {
>>>>>>                   buffer.append("<nc4" + name + ">");
>>>>>>               }
>>>>>>               break;
>>>>>>           }
>>>>>>
>>>>>> In CVS it results this strings are there from 1.3 version of 
>>>>>> XMLWriter, dated 14/04/04 and are still there in version 1.5 dated 
>>>>>> 22/04/04 tagged for 2.1M1. Also, if NO_CONTENT  and no namespace, 
>>>>>> it misses the final slash (near nc4), thus producing an open 
>>>>>> element instead of a no content one.
>>>>>>
>>>>>> The version under the 2.1 branch is the 1.2, which does not have 
>>>>>> this problem.
>>>>>>
>>>>>> Should I submit a bug report?
>>>>>>
>>>>>> Ciao,
>>>>>> Simone Gianni
>>>>>
>>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Simone Gianni <s....@thebug.it>.
Hey Oliver,
Ingo reverted it to 1.2, then you commited  "Cleaned version that does 
not allow any reads outside of transactions...." which placed spurious 
strings back in it. I've checked out the 2.1M1 version, including the 
previous patches by Thomas, removed the problem, compiled, tested, 
created the bug and attached the patch. I hope having done nothing bad, 
but I really need this part working, I'm under stressed developing :( .

Simone

Oliver Zeigermann wrote:

> I can not talk to Thomas now, but this seems to be obvious for me. 
> Thanks for reverting it :)
>
> Cheers,
>
> Oliver
>
> Ingo Brunberg wrote:
>
>> I have reverted that change before I read this mail. Perhaps it was
>> just an oversight as Simone guessed.
>>
>> Ingo
>>
>>
>>> I will have a look at it ASAP.
>>>
>>> Oliver
>>>
>>> Ingo Brunberg wrote:
>>>
>>>
>>>> Yes, this was also the reason for a bug in AclMethod I worked on
>>>> yesterday. There I ended up with calling another method of XMLPrinter.
>>>>
>>>> Nonetheles, as you have noticed the method is needed by other classes,
>>>> too.
>>>>
>>>> Oliver, do you know what that change is good for? The CVS log mentions
>>>> a patch by Thomas Bernert.
>>>>
>>>> Ingo
>>>>
>>>>
>>>>
>>>>> Hi all,
>>>>> i'm working with 2.1M1 client library, and while issuing some 
>>>>> PROPPATCH methods, i noticed a simple but very annoying bug. If 
>>>>> only the namespace URI (and not the namespace abbreviation prefix) 
>>>>> of the property name is specified, it simply does not work, 
>>>>> because in XMLWriter there are some (apparently) debug strings.
>>>>>
>>>>> Have a look, while trying to PROPPATCH the "creator" property in 
>>>>> "http://my.name/space" :
>>>>>
>>>>> PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
>>>>> Authorization: Basic blablablabla
>>>>> Content-Type: text/xml; charset=utf-8
>>>>> User-Agent: Jakarta Commons-HttpClient/2.0final
>>>>> Host: 192.168.0.9:8081
>>>>> Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
>>>>> $Path=/slide
>>>>> Content-Length: 159
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>>> <D:propertyupdate xmlns:D="DAV:">
>>>>>   <D:set>
>>>>>     <D:prop>
>>>>>       <op3creator xmlns="http://my.name/space"></creator>
>>>>>     </D:prop>
>>>>>   </D:set>
>>>>> </D:propertyupdate>
>>>>>
>>>>>
>>>>> What's that op3? and what are op4, nc3 and nc4? I think they were 
>>>>> added while coding to make some tests and have a quick feedback, 
>>>>> the code is :
>>>>>
>>>>>          switch (type) {
>>>>>           case OPENING:
>>>>>               if ((namespaceInfo != null) && 
>>>>> (namespaceInfo.length()>0)) {
>>>>>                   buffer.append("<op3" + name + " xmlns=\"" + 
>>>>> namespaceInfo
>>>>>                                 + "\">");
>>>>>               } else {
>>>>>                   buffer.append("<op4" + name + ">");
>>>>>               }
>>>>>               break;
>>>>>           case CLOSING:
>>>>>               buffer.append("</" + name + ">");
>>>>>               break;
>>>>>           case NO_CONTENT:
>>>>>           default:
>>>>>               if ((namespaceInfo != null) && 
>>>>> (namespaceInfo.length()>0)) {
>>>>>                   buffer.append("<nc3" + name + " xmlns=\"" + 
>>>>> namespaceInfo
>>>>>                                 + "\"/>");
>>>>>               } else {
>>>>>                   buffer.append("<nc4" + name + ">");
>>>>>               }
>>>>>               break;
>>>>>           }
>>>>>
>>>>> In CVS it results this strings are there from 1.3 version of 
>>>>> XMLWriter, dated 14/04/04 and are still there in version 1.5 dated 
>>>>> 22/04/04 tagged for 2.1M1. Also, if NO_CONTENT  and no namespace, 
>>>>> it misses the final slash (near nc4), thus producing an open 
>>>>> element instead of a no content one.
>>>>>
>>>>> The version under the 2.1 branch is the 1.2, which does not have 
>>>>> this problem.
>>>>>
>>>>> Should I submit a bug report?
>>>>>
>>>>> Ciao,
>>>>> Simone Gianni
>>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
I can not talk to Thomas now, but this seems to be obvious for me. 
Thanks for reverting it :)

Cheers,

Oliver

Ingo Brunberg wrote:

> I have reverted that change before I read this mail. Perhaps it was
> just an oversight as Simone guessed.
> 
> Ingo
> 
> 
>>I will have a look at it ASAP.
>>
>>Oliver
>>
>>Ingo Brunberg wrote:
>>
>>
>>>Yes, this was also the reason for a bug in AclMethod I worked on
>>>yesterday. There I ended up with calling another method of XMLPrinter.
>>>
>>>Nonetheles, as you have noticed the method is needed by other classes,
>>>too.
>>>
>>>Oliver, do you know what that change is good for? The CVS log mentions
>>>a patch by Thomas Bernert.
>>>
>>>Ingo
>>>
>>>
>>>
>>>>Hi all,
>>>>i'm working with 2.1M1 client library, and while issuing some PROPPATCH 
>>>>methods, i noticed a simple but very annoying bug. If only the namespace 
>>>>URI (and not the namespace abbreviation prefix) of the property name is 
>>>>specified, it simply does not work, because in XMLWriter there are some 
>>>>(apparently) debug strings.
>>>>
>>>>Have a look, while trying to PROPPATCH the "creator" property in 
>>>>"http://my.name/space" :
>>>>
>>>>PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
>>>>Authorization: Basic blablablabla
>>>>Content-Type: text/xml; charset=utf-8
>>>>User-Agent: Jakarta Commons-HttpClient/2.0final
>>>>Host: 192.168.0.9:8081
>>>>Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
>>>>$Path=/slide
>>>>Content-Length: 159
>>>>
>>>><?xml version="1.0" encoding="utf-8" ?>
>>>> <D:propertyupdate xmlns:D="DAV:">
>>>>   <D:set>
>>>>     <D:prop>
>>>>       <op3creator xmlns="http://my.name/space"></creator>
>>>>     </D:prop>
>>>>   </D:set>
>>>> </D:propertyupdate>
>>>>
>>>>
>>>>What's that op3? and what are op4, nc3 and nc4? I think they were added 
>>>>while coding to make some tests and have a quick feedback, the code is :
>>>>
>>>>          switch (type) {
>>>>           case OPENING:
>>>>               if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>>>>                   buffer.append("<op3" + name + " xmlns=\"" + 
>>>>namespaceInfo
>>>>                                 + "\">");
>>>>               } else {
>>>>                   buffer.append("<op4" + name + ">");
>>>>               }
>>>>               break;
>>>>           case CLOSING:
>>>>               buffer.append("</" + name + ">");
>>>>               break;
>>>>           case NO_CONTENT:
>>>>           default:
>>>>               if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>>>>                   buffer.append("<nc3" + name + " xmlns=\"" + 
>>>>namespaceInfo
>>>>                                 + "\"/>");
>>>>               } else {
>>>>                   buffer.append("<nc4" + name + ">");
>>>>               }
>>>>               break;
>>>>           }
>>>>
>>>>In CVS it results this strings are there from 1.3 version of XMLWriter, 
>>>>dated 14/04/04 and are still there in version 1.5 dated 22/04/04 tagged 
>>>>for 2.1M1. Also, if NO_CONTENT  and no namespace, it misses the final 
>>>>slash (near nc4), thus producing an open element instead of a no content 
>>>>one.
>>>>
>>>>The version under the 2.1 branch is the 1.2, which does not have this 
>>>>problem.
>>>>
>>>>Should I submit a bug report?
>>>>
>>>>Ciao,
>>>>Simone Gianni
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I have reverted that change before I read this mail. Perhaps it was
just an oversight as Simone guessed.

Ingo

> I will have a look at it ASAP.
> 
> Oliver
> 
> Ingo Brunberg wrote:
> 
> > Yes, this was also the reason for a bug in AclMethod I worked on
> > yesterday. There I ended up with calling another method of XMLPrinter.
> > 
> > Nonetheles, as you have noticed the method is needed by other classes,
> > too.
> > 
> > Oliver, do you know what that change is good for? The CVS log mentions
> > a patch by Thomas Bernert.
> > 
> > Ingo
> > 
> > 
> >>Hi all,
> >>i'm working with 2.1M1 client library, and while issuing some PROPPATCH 
> >>methods, i noticed a simple but very annoying bug. If only the namespace 
> >>URI (and not the namespace abbreviation prefix) of the property name is 
> >>specified, it simply does not work, because in XMLWriter there are some 
> >>(apparently) debug strings.
> >>
> >>Have a look, while trying to PROPPATCH the "creator" property in 
> >>"http://my.name/space" :
> >>
> >>PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
> >>Authorization: Basic blablablabla
> >>Content-Type: text/xml; charset=utf-8
> >>User-Agent: Jakarta Commons-HttpClient/2.0final
> >>Host: 192.168.0.9:8081
> >>Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
> >>$Path=/slide
> >>Content-Length: 159
> >>
> >><?xml version="1.0" encoding="utf-8" ?>
> >>  <D:propertyupdate xmlns:D="DAV:">
> >>    <D:set>
> >>      <D:prop>
> >>        <op3creator xmlns="http://my.name/space"></creator>
> >>      </D:prop>
> >>    </D:set>
> >>  </D:propertyupdate>
> >>
> >>
> >>What's that op3? and what are op4, nc3 and nc4? I think they were added 
> >>while coding to make some tests and have a quick feedback, the code is :
> >>
> >>           switch (type) {
> >>            case OPENING:
> >>                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
> >>                    buffer.append("<op3" + name + " xmlns=\"" + 
> >>namespaceInfo
> >>                                  + "\">");
> >>                } else {
> >>                    buffer.append("<op4" + name + ">");
> >>                }
> >>                break;
> >>            case CLOSING:
> >>                buffer.append("</" + name + ">");
> >>                break;
> >>            case NO_CONTENT:
> >>            default:
> >>                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
> >>                    buffer.append("<nc3" + name + " xmlns=\"" + 
> >>namespaceInfo
> >>                                  + "\"/>");
> >>                } else {
> >>                    buffer.append("<nc4" + name + ">");
> >>                }
> >>                break;
> >>            }
> >>
> >>In CVS it results this strings are there from 1.3 version of XMLWriter, 
> >>dated 14/04/04 and are still there in version 1.5 dated 22/04/04 tagged 
> >>for 2.1M1. Also, if NO_CONTENT  and no namespace, it misses the final 
> >>slash (near nc4), thus producing an open element instead of a no content 
> >>one.
> >>
> >>The version under the 2.1 branch is the 1.2, which does not have this 
> >>problem.
> >>
> >>Should I submit a bug report?
> >>
> >>Ciao,
> >>Simone Gianni


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
I will have a look at it ASAP.

Oliver

Ingo Brunberg wrote:

> Yes, this was also the reason for a bug in AclMethod I worked on
> yesterday. There I ended up with calling another method of XMLPrinter.
> 
> Nonetheles, as you have noticed the method is needed by other classes,
> too.
> 
> Oliver, do you know what that change is good for? The CVS log mentions
> a patch by Thomas Bernert.
> 
> Ingo
> 
> 
>>Hi all,
>>i'm working with 2.1M1 client library, and while issuing some PROPPATCH 
>>methods, i noticed a simple but very annoying bug. If only the namespace 
>>URI (and not the namespace abbreviation prefix) of the property name is 
>>specified, it simply does not work, because in XMLWriter there are some 
>>(apparently) debug strings.
>>
>>Have a look, while trying to PROPPATCH the "creator" property in 
>>"http://my.name/space" :
>>
>>PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
>>Authorization: Basic blablablabla
>>Content-Type: text/xml; charset=utf-8
>>User-Agent: Jakarta Commons-HttpClient/2.0final
>>Host: 192.168.0.9:8081
>>Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
>>$Path=/slide
>>Content-Length: 159
>>
>><?xml version="1.0" encoding="utf-8" ?>
>>  <D:propertyupdate xmlns:D="DAV:">
>>    <D:set>
>>      <D:prop>
>>        <op3creator xmlns="http://my.name/space"></creator>
>>      </D:prop>
>>    </D:set>
>>  </D:propertyupdate>
>>
>>
>>What's that op3? and what are op4, nc3 and nc4? I think they were added 
>>while coding to make some tests and have a quick feedback, the code is :
>>
>>           switch (type) {
>>            case OPENING:
>>                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>>                    buffer.append("<op3" + name + " xmlns=\"" + 
>>namespaceInfo
>>                                  + "\">");
>>                } else {
>>                    buffer.append("<op4" + name + ">");
>>                }
>>                break;
>>            case CLOSING:
>>                buffer.append("</" + name + ">");
>>                break;
>>            case NO_CONTENT:
>>            default:
>>                if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>>                    buffer.append("<nc3" + name + " xmlns=\"" + 
>>namespaceInfo
>>                                  + "\"/>");
>>                } else {
>>                    buffer.append("<nc4" + name + ">");
>>                }
>>                break;
>>            }
>>
>>In CVS it results this strings are there from 1.3 version of XMLWriter, 
>>dated 14/04/04 and are still there in version 1.5 dated 22/04/04 tagged 
>>for 2.1M1. Also, if NO_CONTENT  and no namespace, it misses the final 
>>slash (near nc4), thus producing an open element instead of a no content 
>>one.
>>
>>The version under the 2.1 branch is the 1.2, which does not have this 
>>problem.
>>
>>Should I submit a bug report?
>>
>>Ciao,
>>Simone Gianni
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: XMLWriter big bug in 2.1 M1

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
Yes, this was also the reason for a bug in AclMethod I worked on
yesterday. There I ended up with calling another method of XMLPrinter.

Nonetheles, as you have noticed the method is needed by other classes,
too.

Oliver, do you know what that change is good for? The CVS log mentions
a patch by Thomas Bernert.

Ingo

> Hi all,
> i'm working with 2.1M1 client library, and while issuing some PROPPATCH 
> methods, i noticed a simple but very annoying bug. If only the namespace 
> URI (and not the namespace abbreviation prefix) of the property name is 
> specified, it simply does not work, because in XMLWriter there are some 
> (apparently) debug strings.
> 
> Have a look, while trying to PROPPATCH the "creator" property in 
> "http://my.name/space" :
> 
> PROPPATCH /slide/files/prova/prova.gif HTTP/1.1
> Authorization: Basic blablablabla
> Content-Type: text/xml; charset=utf-8
> User-Agent: Jakarta Commons-HttpClient/2.0final
> Host: 192.168.0.9:8081
> Cookie: $Version=0; JSESSIONID=DF25CA151315F5F8538CE91AD904F554; 
> $Path=/slide
> Content-Length: 159
> 
> <?xml version="1.0" encoding="utf-8" ?>
>   <D:propertyupdate xmlns:D="DAV:">
>     <D:set>
>       <D:prop>
>         <op3creator xmlns="http://my.name/space"></creator>
>       </D:prop>
>     </D:set>
>   </D:propertyupdate>
> 
> 
> What's that op3? and what are op4, nc3 and nc4? I think they were added 
> while coding to make some tests and have a quick feedback, the code is :
> 
>            switch (type) {
>             case OPENING:
>                 if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>                     buffer.append("<op3" + name + " xmlns=\"" + 
> namespaceInfo
>                                   + "\">");
>                 } else {
>                     buffer.append("<op4" + name + ">");
>                 }
>                 break;
>             case CLOSING:
>                 buffer.append("</" + name + ">");
>                 break;
>             case NO_CONTENT:
>             default:
>                 if ((namespaceInfo != null) && (namespaceInfo.length()>0)) {
>                     buffer.append("<nc3" + name + " xmlns=\"" + 
> namespaceInfo
>                                   + "\"/>");
>                 } else {
>                     buffer.append("<nc4" + name + ">");
>                 }
>                 break;
>             }
> 
> In CVS it results this strings are there from 1.3 version of XMLWriter, 
> dated 14/04/04 and are still there in version 1.5 dated 22/04/04 tagged 
> for 2.1M1. Also, if NO_CONTENT  and no namespace, it misses the final 
> slash (near nc4), thus producing an open element instead of a no content 
> one.
> 
> The version under the 2.1 branch is the 1.2, which does not have this 
> problem.
> 
> Should I submit a bug report?
> 
> Ciao,
> Simone Gianni


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org