Namespace of properties

Henrik Holst henrik at witsbits.com
Thu Aug 28 10:31:06 EDT 2008


>Hi,
>
>I've been searching the Cadaver manual and the internet on
>how to retrieve the namespace of a property. Is this possible at all?
>If not is there a way to request this feauture?
>
>Regards,
>Aede

I have attached a patch for cadaver 0.23.2 that adds namespace to the
"propget" when performing allprop requests. I have included the patch
as a file also since my mail program makes very strange things with
inline patches...


--- ../../cadaver-0.23.2-orgi/src/commands.c    2008-08-28
16:06:33.644441766 +0200
+++ commands.c  2008-08-28 16:14:54.917115338 +0200
@@ -550,14 +550,16 @@
static int all_iterator(void *userdata, const ne_propname *pname,
                       const char *value, const ne_status *status)
{
+    char *dnspace = utf8_decode(pname->nspace);
   char *dname = utf8_decode(pname->name);
   if (value != NULL) {
      char *dval = utf8_decode(value);
-       printf("%s = %s\n", dname, dval);
+       printf("%s %s = %s\n", dnspace, dname, dval);
      free(dval);
   } else if (status != NULL) {
-       printf(_("%s failed: %s\n"), dname, status->reason_phrase);
+       printf(_("%s %s failed: %s\n"), dnspace, dname, status->reason_phrase);
   }
+    free(dnspace);
   free(dname);
   return 0;
}


/Henrik Holst
Witsbits AB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commands.c.patch
Type: application/octet-stream
Size: 758 bytes
Desc: not available
Url : http://lists.manyfish.co.uk/pipermail/cadaver/attachments/20080828/76eeee53/attachment.obj 


More information about the cadaver mailing list