Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5diff
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
erp5diff
Commits
51c6c3e6
Commit
51c6c3e6
authored
Oct 30, 2009
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Root element was missing in generated Xpath expressions
parent
301152fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ERP5Diff.py
ERP5Diff.py
+8
-6
No files found.
ERP5Diff.py
View file @
51c6c3e6
...
...
@@ -67,7 +67,7 @@ class ERP5Diff:
# Declarative interfaces
zope
.
interface
.
implements
(
IERP5Diff
,)
__version__
=
0.
5
__version__
=
0.
6
def
__init__
(
self
):
"""
...
...
@@ -511,14 +511,16 @@ class ERP5Diff:
self
.
_result
=
etree
.
Element
(
'{%s}modifications'
%
self
.
_ns
,
nsmap
=
{
'xupdate'
:
self
.
_ns
})
self
.
_result
.
set
(
'version'
,
'1.0'
)
if
self
.
_testElements
(
old_root_element
,
new_root_element
):
self
.
_testAttributes
(
old_root_element
,
new_root_element
,
'/'
)
self
.
_compareChildNodes
(
old_root_element
,
new_root_element
,
'/'
)
qname
=
old_root_element
.
xpath
(
'name()'
)
self
.
_testAttributes
(
old_root_element
,
new_root_element
,
'/%s'
%
qname
)
self
.
_compareChildNodes
(
old_root_element
,
new_root_element
,
'/%s'
%
qname
)
else
:
# These XML documents seem to be completely different...
if
old_root_element
.
tag
!=
new_root_element
.
tag
:
self
.
_xupdateRenameElement
(
new_root_element
.
tag
,
'/'
)
self
.
_testAttributes
(
old_root_element
,
new_root_element
,
'/'
)
self
.
_xupdateUpdateElement
(
new_root_element
,
'/'
)
self
.
_xupdateRenameElement
(
new_root_element
.
xpath
(
'name()'
),
'/%s'
%
old_root_element
.
xpath
(
'name()'
))
qname
=
new_root_element
.
xpath
(
'name()'
)
self
.
_testAttributes
(
old_root_element
,
new_root_element
,
'/%s'
%
qname
)
self
.
_compareChildNodes
(
old_root_element
,
new_root_element
,
'/%s'
%
qname
)
finally
:
del
old_doc
del
new_doc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment