[Erp5-report] r36985 nicolas - /erp5/trunk/utils/erp5diff/README
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 8 15:57:34 CEST 2010
Author: nicolas
Date: Thu Jul 8 15:57:30 2010
New Revision: 36985
URL: http://svn.erp5.org?rev=36985&view=rev
Log:
Add a test to prove recent modification
- (Comments and PI as sibling)
- New nodes stay orphan.
Modified:
erp5/trunk/utils/erp5diff/README
Modified: erp5/trunk/utils/erp5diff/README
URL: http://svn.erp5.org/erp5/trunk/utils/erp5diff/README?rev=36985&r1=36984&r2=36985&view=diff
==============================================================================
--- erp5/trunk/utils/erp5diff/README [utf8] (original)
+++ erp5/trunk/utils/erp5diff/README [utf8] Thu Jul 8 15:57:30 2010
@@ -1000,5 +1000,44 @@ does not work as bellow example. This is
<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 at nexedi.com>
- 2009-09-15, Tatuya Kamada <tatuya at nexedi.com>
More information about the Erp5-report
mailing list