diff:replacement

Two further notes on this subject:

--------------
concerning the two versions of diff proposed by TimBL at 
http://www.w3.org/DesignIssues/Diff, namely diff:replacement or the 
pair diff:deletion and diff:insertion, I feel that the first make a lot 
more sense to me. With diff:replacement it is very clear that one thing 
has to be replaced with another.

With diff:deletion and diff:insertion, it is not clear what the role of 
the Object of the statements are.

{ ?x  bank:accountNo "1234578"}
	  diff:deletion  { ?x  bank:balance 4000};
	  diff:insertion { ?x  bank:balance 3575}.

Well in the example it is clear that the first part is there in order 
to allow the variable ?x to be bound. But what if the node that is to 
be deleted does not contain a variable node, as here:

{} diff:deletion { uri://something created 1948 }

This would be the base case. And here one has to wonder what the role 
of the Object is. In any case I had such a situation and was not able 
to get cwm to work with this. I kept wondering what should go into the 
Object position.

----------------

As my understanding of cwm improves I think I can now more clearly 
state the thought I tried clumsily to express in the original post. I 
now agree that a diff as stated says what it is meant to say. If one 
wanted to be more specific and specify what the diff was about one 
could do it this way, assuming one has the facility to name graphs, as 
proposed by the Trix folks:

(graph://OriginalGraph,graph://DiffedGraph) diff:transform
		( {originalObject  relatesTo originalValue}
				diff:replace {originalObject  relatesTo differentValeu},
		  {OriginalObject2 relatesTo orgiginalValue}
			    diff:replace {originalObject  relatesDifferentlyTo 
differentValue}
		)		

Ie one could use a new predicate diff:transform that would relate a 
pair of graphs to some (all?) of the differences between them.

Received on Friday, 14 May 2004 09:40:42 UTC