summaryrefslogtreecommitdiff
path: root/caldav/lib/namespace.py
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2017-01-15 11:25:00 +0100
committerTobias Brox <tobias@redpill-linpro.com>2017-01-15 11:25:00 +0100
commit7e933bd6e96440ba791effd6540260fbe92c4157 (patch)
tree81ea900869569198c78e3494394b434e35590b95 /caldav/lib/namespace.py
downloadpython-caldav-7e933bd6e96440ba791effd6540260fbe92c4157.zip
bedework.caldav-servers.tobixen.no is now up and running
Diffstat (limited to 'caldav/lib/namespace.py')
-rw-r--r--caldav/lib/namespace.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/caldav/lib/namespace.py b/caldav/lib/namespace.py
new file mode 100644
index 0000000..d784629
--- /dev/null
+++ b/caldav/lib/namespace.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+
+## nsmap2 is ref https://bitbucket.org/cyrilrbt/caldav/issue/29/centos59-minifix
+## This looks wrong - should think more about it at a later stage.
+## -- Tobias Brox, 2014-02-16
+
+nsmap = {
+ "D": "DAV",
+ "C": "urn:ietf:params:xml:ns:caldav",
+}
+
+nsmap2 = {
+ "D": "DAV:",
+ "C": "urn:ietf:params:xml:ns:caldav",
+}
+
+
+def ns(prefix, tag=None):
+ name = "{%s}" % nsmap2[prefix]
+ if tag is not None:
+ name = "%s%s" % (name, tag)
+ return name