[Zope-CVS] CVS: Packages/Moztop/moztopsupport/dav - propfind.py:1.13 views.py:1.10
Sidnei da Silva
sidnei@x3ng.com.br
Wed, 2 Apr 2003 16:07:14 -0500
Update of /cvs-repository/Packages/Moztop/moztopsupport/dav
In directory cvs.zope.org:/tmp/cvs-serv11272/moztopsupport/dav
Modified Files:
propfind.py views.py
Log Message:
Changing everything to only have one xmlns
=== Packages/Moztop/moztopsupport/dav/propfind.py 1.12 => 1.13 ===
--- Packages/Moztop/moztopsupport/dav/propfind.py:1.12 Wed Apr 2 15:57:50 2003
+++ Packages/Moztop/moztopsupport/dav/propfind.py Wed Apr 2 16:07:13 2003
@@ -130,7 +130,7 @@
ns = props_ns.get(p, None)
el = response.createElement('%s' % p )
- if ns is not None:
+ if ns is not None and ns != default_ns:
el.setAttribute('xmlns', ns)
prop.appendChild(el)
=== Packages/Moztop/moztopsupport/dav/views.py 1.9 => 1.10 ===
--- Packages/Moztop/moztopsupport/dav/views.py:1.9 Wed Apr 2 15:38:19 2003
+++ Packages/Moztop/moztopsupport/dav/views.py Wed Apr 2 16:07:13 2003
@@ -19,19 +19,16 @@
source_url = '%s/@@source.html' % resource_url
xml = minidom.Document()
link = xml.createElement('link')
- link.setAttribute('xmlns', 'DAV:')
xml.appendChild(link)
src = xml.createElement('src')
- src.setAttribute('xmlns', 'DAV:')
link.appendChild(src)
r_url = xml.createTextNode(resource_url)
src.appendChild(r_url)
dst = xml.createElement('dst')
- dst.setAttribute('xmlns', 'DAV:')
link.appendChild(dst)
s_url = xml.createTextNode(source_url)
dst.appendChild(s_url)
- return xml.toxml()
+ return xml.toxml('utf-8')
__call__ = __str__
@@ -43,7 +40,7 @@
value = getAdapter(self.context, IObjectName)()
xml = minidom.Document()
text = xml.createTextNode(value)
- return text.toxml()
+ return text.toxml('utf-8')
__call__ = __str__
@@ -58,7 +55,7 @@
value = value.strftime('%Y-%m-%d %TZ')
xml = minidom.Document()
text = xml.createTextNode(value)
- return text.toxml()
+ return text.toxml('utf-8')
__call__ = __str__
@@ -69,12 +66,11 @@
xml = minidom.Document()
if value is not None:
node = xml.createElement('collection')
- node.setAttribute('xmlns', 'DAV:')
xml.appendChild(node)
doc = xml.documentElement
if doc is None:
return ''
- return xml.toxml()
+ return xml.toxml('utf-8')
__call__ = __str__
@@ -85,7 +81,7 @@
value = str(value)
xml = minidom.Document()
text = xml.createTextNode(value)
- return text.toxml()
+ return text.toxml('utf-8')
__call__ = __str__
@@ -99,7 +95,7 @@
value = value.strftime('%a, %d %b %Y %H:%M:%S GMT')
xml = minidom.Document()
text = xml.createTextNode(value)
- return text.toxml()
+ return text.toxml('utf-8')
__call__ = __str__