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 "B.C. Holmes" <bc...@roxton.com> on 2000/12/09 21:09:51 UTC
Revisiting an earlier bug report...
Remy Maucherat wrote:
>
> Jojada wrote:
>
> > While these two methods here collect all the elements of the response
> > document whose tag is <D: href> or <D: prop>, as expressed below:
> >
> > getAllResponseURLs() does:
> >
> > NodeList hrefList = multistatus.getElementsByTagName(
> > getPrefix() + "href");
> > getResponseProperties() does:
> >
> > NodeList list = response.getElementsByTagName(
> > getPrefix() + "prop");
> >
> > ,the received response document does not have those kind of tags.
> > It seems that the response document drops the D: prefix. It has <href> and
> > <prop> instead.
>
> Yes, me. It's fixed now.
Sorry to go back in time, but I was wondering which DAV server
you were seeing this problem with?
I was pretty sure that the only way this problem would manifest
itself was if the response looked something like this:
<multistatus xmlns:="DAV:">
...
</multistatus>
Note colon after "xmlns".
I ask because as I've been trying to revise the property handling
to allow multiple prefixes for "DAV:", I've found that Xerces will
throw an exception if it receives that kind of response and if
namespace support is turned on.
When I look at the namespace specification, it says that the
namespace syntax is defined thusly:
[1] NSAttName ::= PrefixedAttName | DefaultAttName
[2] PrefixedAttName ::= 'xmlns:' NCName
[3] DefaultAttName ::= 'xmlns'
[4] NCName ::= (Letter | '_') (NCNameChar)*
[5] NCNameChar ::= Letter | Digit | '.' | '-' | '_'
| CombiningChar | Extender
Now, I'll admit that I'm not great at reading this syntax, but as
I read it, if there's a colon, there *must* be at least a letter or an
underscore.
Now, I probably would ignore the fact that the server is doing
something wrong if it's a really popular server (like IIS or
mod_dav). I have some code that hasn't been checked in yet that I'd
have to build a work-around for, but I think that's better than
failing to support a really popular DAV server.
But if it was the Slide DAV implementation that produced this
output then I'd rather see the Slide implementation corrected.
BCing you
--
B.C. Holmes \u2625 http://www.bcholmes.org/
"How often has somebody sensed they were needed without being told?
When you have a hurt in your heart you're too proud to disclose
Look over there... look over there... Somebody always knows."
- _La Cage aux Folles_
Re: Revisiting an earlier bug report...
Posted by "B.C. Holmes" <bc...@roxton.com>.
Remy Maucherat wrote:
>
> > I was pretty sure that the only way this problem would manifest
> > itself was if the response looked something like this:
> >
> > <multistatus xmlns:="DAV:">
> > ...
> > </multistatus>
>
> I think originally, the problem was with the default namespace declaration :
>
> <multistatus xmlns="DAV:">
> ...
> </multistatus>
Hmmm... okay, if you say so. I *thought* that the original code
should have handled that case, but maybe I'm wrong. (I could go get
the original code out of CVS, I suppose, but that's probably more
effort than this issue is worth).
At this point, I'm assuming that xmlns:="DAV:" is invalid (and
that Xerces is correct to barf at it).
> At one point, I was doing something like :
> <multistatus xmlns="DAV:" xmlns:D="DAV:">
> ...
> </multistatus>
> The D: prefix was only used on the property names (that was a way to
> harmonize the handling of the properties' namespace).
>
> Do you think it's incorrect ?
No, that looks valid to me. It's a case that the current client
code in CVS doesn't handle, but I'm just about finished my changes to
accommodate that.
BCing you
--
B.C. Holmes \u2625 http://www.bcholmes.org/
"How often has somebody sensed they were needed without being told?
When you have a hurt in your heart you're too proud to disclose
Look over there... look over there... Somebody always knows."
- _La Cage aux Folles_
Re: Revisiting an earlier bug report...
Posted by Remy Maucherat <re...@apache.org>.
> Sorry to go back in time, but I was wondering which DAV server
> you were seeing this problem with?
>
> I was pretty sure that the only way this problem would manifest
> itself was if the response looked something like this:
>
> <multistatus xmlns:="DAV:">
> ...
> </multistatus>
I think originally, the problem was with the default namespace declaration :
<multistatus xmlns="DAV:">
...
</multistatus>
(I'm doing that in TC 4), but it wasn't working properly (if I remember
well).
That's when the prefix was hardcoded, I think, so perhaps any fix I put in
is totally irrelevant now.
> Note colon after "xmlns".
>
> I ask because as I've been trying to revise the property handling
> to allow multiple prefixes for "DAV:", I've found that Xerces will
> throw an exception if it receives that kind of response and if
> namespace support is turned on.
At one point, I was doing something like :
<multistatus xmlns="DAV:" xmlns:D="DAV:">
...
</multistatus>
The D: prefix was only used on the property names (that was a way to
harmonize the handling of the properties' namespace).
Do you think it's incorrect ?
Remy