Commit 063abc89 authored by Nicolas Delaby's avatar Nicolas Delaby

rename constant XUPDATE_EL to XUPDATE_ELEMENT

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29925 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f08182c
......@@ -312,7 +312,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = None
if xml.xpath('name()') not in self.XUPDATE_INSERT_OR_ADD:
for subnode in xml:
if subnode.xpath('name()') in self.XUPDATE_EL:
if subnode.xpath('name()') in self.XUPDATE_ELEMENT:
keyword = subnode.attrib.get('name', None)
data_xml = subnode
else:
......@@ -790,14 +790,14 @@ class ERP5Conduit(XMLSyncUtilsMixin):
"""
Retrieve the list of xupdate:element subnodes
"""
return xml.xpath('|'.join(['.//*[name() = "%s"]' % name for name in self.XUPDATE_EL]))
return xml.xpath('|'.join(['.//*[name() = "%s"]' % name for name in self.XUPDATE_ELEMENT]))
security.declareProtected(Permissions.AccessContentsInformation,'getElementFromXupdate')
def getElementFromXupdate(self, xml):
"""
from a xupdate:element returns the element as xml
"""
if xml.xpath('name()') in self.XUPDATE_EL:
if xml.xpath('name()') in self.XUPDATE_ELEMENT:
result = '<'
tag_name = xml.attrib.get('name')
result += tag_name
......@@ -843,7 +843,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
Return the list of workflow actions
"""
action_list = []
if xml.xpath('name()') in self.XUPDATE_EL:
if xml.xpath('name()') in self.XUPDATE_ELEMENT:
action_list.append(xml)
return action_list
for subnode in xml:
......
......@@ -85,7 +85,7 @@ class SyncCode(Persistent):
XUPDATE_ADD = ('xupdate:append',)
XUPDATE_DEL = ('xupdate:remove',)
XUPDATE_UPDATE = ('xupdate:update',)
XUPDATE_EL = ('xupdate:element',)
XUPDATE_ELEMENT = ('xupdate:element',)
XUPDATE_INSERT_OR_ADD = tuple(XUPDATE_INSERT) + tuple(XUPDATE_ADD)
XUPDATE_TAG = tuple(XUPDATE_INSERT) + tuple(XUPDATE_ADD) + \
tuple(XUPDATE_UPDATE) + tuple(XUPDATE_DEL)
......@@ -110,7 +110,7 @@ class SyncCode(Persistent):
local_group_tag,'/'+local_group_tag)
ADDABLE_PROPERTY = local_role_list + (history_tag,) + local_permission_list
NOT_EDITABLE_PROPERTY = ('id','object','uid','xupdate:attribute') \
+ XUPDATE_EL + ADDABLE_PROPERTY
+ XUPDATE_ELEMENT + ADDABLE_PROPERTY
sub_object_exp = re.compile("/object\[@id='.*'\]/")
object_exp = re.compile("/object\[@id='.*'\]")
attribute_type_exp = re.compile("^.*attribute::type$")
......
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