GNU bug report logs -
#11916
24.1.50; Making url-dav work
Previous Next
Reported by: David Engster <deng <at> randomsample.de>
Date: Wed, 11 Jul 2012 21:06:02 UTC
Severity: normal
Found in version 24.1.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 11916 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier writes:
>> Just do an M-x occur on "'DAV:"; pretty much every test you see against
>> some symbol 'DAV:foo (about 30) has to be changed to test against
>> '("DAV" . "foo") instead. This also implies that every 'eq' has to be
>> changed to 'equal', 'assq' to 'assoc', 'plist-get' to 'lax-plist-get',
>> and so on. I started doing that and it just felt wrong; the code gets
>> larger, less readable and possibly slower without any real
>> benefit. However, I don't feel terribly strong about this, so if this
>> in-place XML change is considered too hack-ish, I can still finish that
>> rewrite.
>
> What would happen if url-dav.el didn't use namespaces (and just removed
> "DAV:" from all those symbols)?
You might get name clashes; for example, the code might parse a
'collection' although it is actually not a "DAV:collection" but a
"FOOBAR:collection". Granted, it's not very likely, and if this would be
used in a read-only fashion (like parsing atom feeds) I'd drop the
namespaces in a heartbeat. But since url-dav will usually be used to
manipulate actual files on remote servers, I'd rather not risk it.
>> I think namespace-aware parsing was added in 2004 or so, so changing it
>> now would surely break some code out there. Also, I could imagine that
>> under other circumstances you can profit from such a representation; but
>> url-dav simply wants to make sure that everything is in the 'DAV'
>> namespace.
>
> Of course, I was thinking of changing it in a backward compatible way,
> by letting the `parse-ns' argument specify which kind of result you
> want. The changes should be mostly limited to xml-maybe-do-ns.
I could live with that.
-David
This bug report was last modified 12 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.