delta.py Bug: Production of Output that CWM --patch Can't Use

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

delta.py Bug: Production of Output that CWM --patch Can't Use

Sean B. Palmer

delta.py produces output which cwm --patch can't use.

$ cat foaf01.n3
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
[ foaf:homepage <http://inamidst.com/sbp/>;  foaf:nick "SeanP" ] .

$ cat foaf02.n3
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
[ foaf:homepage <http://inamidst.com/sbp/>; foaf:nick "sbp" ] .

$ delta --from=foaf01.n3 --to=foaf02.n3 > foaf-patch.n3

$ cwm foaf01.n3 --patch=foaf-patch.n3
[...]
      [      <http://xmlns.com/foaf/0.1/homepage> <http://inamidst.com/sbp/>;
             <http://xmlns.com/foaf/0.1/nick> "SeanP" ].

Which is wrong, I think. The patch file that's been produced is as follows:

$ cat foaf-patch.n3
     @prefix : <#> .
    @prefix delta: <http://www.w3.org/2004/delta#> .

     @forAll :_g0,
                :_g1 .
    {
        :_g2     <http://xmlns.com/foaf/0.1/homepage>
<http://inamidst.com/sbp/> .

        }     delta:deletion {:_g2
<http://xmlns.com/foaf/0.1/nick> "SeanP" .
        } .
    {
        :_g3     <http://xmlns.com/foaf/0.1/homepage>
<http://inamidst.com/sbp/> .

        }     delta:insertion {:_g3     <http://xmlns.com/foaf/0.1/nick> "sbp" .
        } .

This appears to be wrong in two respects: first, delta:deletion and
delta:insertion should have the same formula as the subject, in other
words :_g2 and :_g3 should actually be the same; and the combined
:_g2/:_g3 should be a bNode, existentially quantified over its parent
formula, the document root.

Cf. http://chatlogs.planetrdf.com/swig/2007-11-12.html#T15-42-03

Thanks,

--
Sean B. Palmer, http://inamidst.com/sbp/