Commit 12b0ff3c authored by Nicolas Delaby's avatar Nicolas Delaby

merge object_exp, sub_object_exp and sub_sub_object_exp

into one regular expression.
A new algorithm will be used in ERPConduit to access
sub_object according xpath expression read from 
xupdate document.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35803 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b810622
......@@ -111,12 +111,19 @@ class SyncCode(Persistent):
ADDABLE_PROPERTY = local_role_list + (history_tag,) + local_permission_list
NOT_EDITABLE_PROPERTY = ('id','object','uid','xupdate:attribute') \
+ XUPDATE_ELEMENT + ADDABLE_PROPERTY
sub_object_exp = re.compile("/object\[@id='.*'\]/")
object_exp = re.compile("/object\[@id='.*'\]")
attribute_type_exp = re.compile("^.*attribute::type$")
sub_sub_object_exp = re.compile("/object\[@id='.*'\]/object\[@id='.*'\]/")
history_exp = re.compile("/%s\[@id='.*'\]" % history_tag)
bad_history_exp = re.compile("/%s\[@id='.*'\]/" % history_tag)
extract_id_from_xpath = re.compile(
"(?P<object_block>(?P<property>[^/]+)\[@"\
"(?P<id_of_id>id|gid)='(?P<object_id>[^']+)'\])")
# Those regular expression are deprecated and keept
# only for backward compatibility
object_exp = re.compile("/object\[@id='.*'\]")
sub_object_exp = re.compile("/object\[@id='.*'\]/")
sub_sub_object_exp = re.compile("/object\[@id='.*'\]/object\[@id='.*'\]/")
#media types :
......
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