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
e345147a
Commit
e345147a
authored
Jul 08, 2010
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test to prove recent modification
- (Comments and PI as sibling) - New nodes stay orphan.
parent
3cc702ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
README
README
+39
-0
No files found.
README
View file @
e345147a
...
...
@@ -1000,5 +1000,44 @@ does not work as bellow example. This is a known bug.
<xupdate:remove xmlns:marshal="http://www.erp5.org/namespaces/marshaller" select="/object/local_permission[@id='View']/marshal:marshal/marshal:tuple/marshal:string[2]"/>
</xupdate:modifications>
30. Replace a node by another one following by a modification
>>> old_xml = """
... <resource reference="Product Ballon de Plage a5962z">
... <title>Ballon de Plage</title>
... <reference>a5962z</reference>
... <sale_price>200.250000</sale_price>
... <purchase_price>100.250000</purchase_price>
... <category>ball_size/s4</category>
... <category>ball_size/s5</category>
... <category>colour/black</category>
... <category>colour/white</category>
... <category>type/product</category>
... </resource>
... """
>>> new_xml = """
... <resource reference="Product Ballon de Plage a5962z">
... <title>Ballon de Plage</title>
... <reference>a5962z</reference>
... <sale_price>120.000000</sale_price>
... <ean13>1357913579130</ean13><!--replace purchase_price -->
... <category>ball_size/s4</category>
... <category>ball_size/s6</category><!--first modification to trig the bug -->
... <category>colour/red</category>
... <category>colour/white</category>
... <category>type/product</category>
... </resource>
... """
>>> erp5diff.compare(old_xml, new_xml)
>>> erp5diff.output()
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:update select="/resource/sale_price">120.000000</xupdate:update>
<xupdate:remove select="/resource/purchase_price"/>
<xupdate:update select="/resource/category[2]">ball_size/s6</xupdate:update>
<xupdate:update select="/resource/category[3]">colour/red</xupdate:update>
<xupdate:insert-before select="/resource/category[0]">
<xupdate:element name="ean13">1357913579130</xupdate:element>
</xupdate:insert-before>
</xupdate:modifications>
- 2003-12-04, Yoshinori OKUJI <yo@nexedi.com>
- 2009-09-15, Tatuya Kamada <tatuya@nexedi.com>
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