update default namespace


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28227 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f9b0995b
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
############################################################################## ##############################################################################
import smtplib # to send emails import smtplib # to send emails
from Subscription import Subscription,Signature from Subscription import Subscription
from Signature import Signature
from XMLSyncUtils import XMLSyncUtils from XMLSyncUtils import XMLSyncUtils
import commands import commands
from Conduit.ERP5Conduit import ERP5Conduit from Conduit.ERP5Conduit import ERP5Conduit
...@@ -53,7 +54,9 @@ class SubscriptionSynchronization(XMLSyncUtils): ...@@ -53,7 +54,9 @@ class SubscriptionSynchronization(XMLSyncUtils):
subscription.setZopeUser(user) subscription.setZopeUser(user)
subscription.setAuthenticated(True) 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 # syncml header
xml.append(self.SyncMLHeader(subscription.incrementSessionId(), xml.append(self.SyncMLHeader(subscription.incrementSessionId(),
subscription.incrementMessageId(), subscription.getPublicationUrl(), subscription.incrementMessageId(), subscription.getPublicationUrl(),
...@@ -92,7 +95,9 @@ class SubscriptionSynchronization(XMLSyncUtils): ...@@ -92,7 +95,9 @@ class SubscriptionSynchronization(XMLSyncUtils):
This method send crendentials This method send crendentials
""" """
cmd_id = 1 # specifies a SyncML message-unique command identifier 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 # syncml header
data = "%s:%s" % (subscription.getLogin(), subscription.getPassword()) data = "%s:%s" % (subscription.getLogin(), subscription.getPassword())
data = subscription.encode(subscription.getAuthenticationFormat(), data) data = subscription.encode(subscription.getAuthenticationFormat(), data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment