From 5b97acd09b77bcbc273e6e34711cfa7a8e29a73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=A8le=20Vanbaelinghem?= <daniele@nexedi.com> Date: Thu, 30 Jul 2009 12:28:31 +0000 Subject: [PATCH] update default namespace git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28227 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5SyncML/SubscriptionSynchronization.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/product/ERP5SyncML/SubscriptionSynchronization.py b/product/ERP5SyncML/SubscriptionSynchronization.py index f82d606ea4..d4dc933298 100644 --- a/product/ERP5SyncML/SubscriptionSynchronization.py +++ b/product/ERP5SyncML/SubscriptionSynchronization.py @@ -27,7 +27,8 @@ ############################################################################## import smtplib # to send emails -from Subscription import Subscription,Signature +from Subscription import Subscription +from Signature import Signature from XMLSyncUtils import XMLSyncUtils import commands from Conduit.ERP5Conduit import ERP5Conduit @@ -53,7 +54,9 @@ class SubscriptionSynchronization(XMLSyncUtils): subscription.setZopeUser(user) subscription.setAuthenticated(True) - xml = Element('SyncML') + #create element 'SyncML' with a default namespace + nsmap = {None : self.XHTML_NAMESPACE} + xml = Element('SyncML',nsmap=nsmap) # syncml header xml.append(self.SyncMLHeader(subscription.incrementSessionId(), subscription.incrementMessageId(), subscription.getPublicationUrl(), @@ -92,7 +95,9 @@ class SubscriptionSynchronization(XMLSyncUtils): This method send crendentials """ cmd_id = 1 # specifies a SyncML message-unique command identifier - xml = Element('SyncML') + #create element 'SyncML' with a default namespace + nsmap = {None : self.XHTML_NAMESPACE} + xml = Element('SyncML',nsmap=nsmap) # syncml header data = "%s:%s" % (subscription.getLogin(), subscription.getPassword()) data = subscription.encode(subscription.getAuthenticationFormat(), data) -- 2.30.9