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 "Pan, Jiantao" <ji...@labbook.com> on 2001/01/22 17:47:21 UTC
Namespace support fix
Morning,
I found out the problem(see the attached email) is in
org.apache.slide.webdav.method.PropPatchMethod.java
at line: 245,
property.namespaceAbbrev = nodeName.substring(0, colon - 1);
Need to be changed to :
property.namespaceAbbrev = nodeName.substring(0, colon );
because of the -1 , the namesapceAbbrev is cut one letter short therefore is
not recognized.
This fix the proppatch problem, however, if I did a propfind for the same
uri. It return me back the xml as the following
where the attribut "author" in a different namespace does not have "xmlns:"
attribute with it. Any suggestion?
Thanks and have a good one!
<response>
<href>/slide/files/abstract.html</href>
<propstat>
<prop><
supportedlock><lockentry><lockscope><exclusive></exclusive></lockscope><lock
type><write></write></locktype></lockentry><lockentry><lockscope><shared></s
hared></lockscope><locktype><write></write></locktype></lockentry></supporte
dlock>
<D:title xmlns:D="DAV:">Test Remote RTF</D:title>
<D:format xmlns:D="DAV:">text/rtf</D:format>
<D:type xmlns:D="DAV:">Document</D:type>
<author>Jiantao Pan</author>
<D:keyword xmlns:D="DAV:">some keyword</D:keyword>
<D:resourcetype xmlns:D="DAV:"></D:resourcetype></prop>
<status>HTTP/1.1 200 OK</status> </propstat> </response>
-----Original Message-----
From: Pan, Jiantao [mailto:jiantao.pan@labbook.com]
Sent: Friday, January 19, 2001 11:31 AM
To: 'slide-user@jakarta.apache.org'
Subject: Name space support question on slide
Hi
I am runing slide mt5 and did a proppatch and propfind on a server
resource
proppatchMethod.addPropertyToSet("author","jpan","Z", "z39.50");
But when I do a propfind on the resource, it put the property in the DAV
namespace.
Any suggestions on this?
Thanks
Re: Namespace support fix
Posted by Remy Maucherat <re...@apache.org>.
> Morning,
> I found out the problem(see the attached email) is in
> org.apache.slide.webdav.method.PropPatchMethod.java
> at line: 245,
>
> property.namespaceAbbrev = nodeName.substring(0, colon - 1);
> Need to be changed to :
> property.namespaceAbbrev = nodeName.substring(0, colon );
>
> because of the -1 , the namesapceAbbrev is cut one letter short therefore
is
> not recognized.
>
> This fix the proppatch problem, however, if I did a propfind for the same
> uri. It return me back the xml as the following
> where the attribut "author" in a different namespace does not have
"xmlns:"
> attribute with it. Any suggestion?
> Thanks and have a good one!
I just posted a fix for it (which includes your fix).
The PROPFIND response now looks like this, which is way better :
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:A="DAV:"
><response><href>/slide/files/</href>
<propstat><prop><supportedlock><lockentry><lockscope><exclusive/></lockscope
><locktype><write/></locktype></lockentry><lockentry><lockscope><shared/></l
ockscope><locktype><write/></locktype></lockentry></supportedlock>
<A:resourcetype xmlns:A="DAV:"><collection/></A:resourcetype>
<ns0:author xmlns:ns0="z39.50">jpan</ns0:author>
<A:author xmlns:A="DAV:">jpan</A:author>
<A:displayname xmlns:A="DAV:"/><A:source xmlns:A="DAV:"/><A:getlastmodified
xmlns:A="DAV:">Mon Jan 22 10:22:30 PST 2001</A:getlastmodified>
<A:creationdate xmlns:A="DAV:">Mon Jan 22 10:22:30 PST 2001</A:creationdate>
<A:getcontentlength xmlns:A="DAV:">0</A:getcontentlength>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
Remy