This example shows how a history of changes can be maintained using the precedingChangeSet property. We start with the resource description below:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://example.com/res#thing"/>
<dc:title>Original Title</dc:title>
<dc:description>A short description of this resource</dc:description>
</rdf:Description>
</rdf:RDF>
A change to the title of the resource is then made:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://example.com/res#thing"/>
<dc:title>New Title</dc:title>
<dc:description>A short description of this resource</dc:description>
</rdf:Description>
</rdf:RDF>
This change is modelled by a ChangeSet describing the removal of the existing dc:title triple and the addition of a new triple with a new value:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cs="http://purl.org/vocab/changeset/schema#">
<cs:ChangeSet rdf:about="http://example.com/res#change1">
<cs:subjectOfChange rdf:resource="http://example.com/res#thing"/>
<cs:createdDate>2006-01-01T00:00:00Z</cs:createdDate>
<cs:creatorName>Anne Onymous</cs:creatorName>
<cs:changeReason>Change of title</cs:changeReason>
<cs:removal>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/title"/>
<rdf:object>Original Title</rdf:object>
</rdf:Statement>
</cs:removal>
<cs:addition>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/title"/>
<rdf:object>New Title</rdf:object>
</rdf:Statement>
</cs:addition>
</cs:ChangeSet>
</rdf:RDF>
Subsequently a dc:identifier property is added to the description:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://example.com/res#thing"/>
<dc:title>New Title</dc:title>
<dc:description>A short description of this resource</dc:description>
<dc:identifier>Z875331</dc:identifier>
</rdf:Description>
</rdf:RDF>
The ChangeSet describes only the addition of the new statement. However this new ChangeSet uses the precedingChangeSet property to reference the first ChangeSet:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cs="http://purl.org/vocab/changeset/schema#">
<cs:ChangeSet rdf:about="http://example.com/res#change2">
<cs:precedingChangeSet rdf:resource="http://example.com/res#change1"/>
<cs:subjectOfChange rdf:resource="http://example.com/res#thing"/>
<cs:createdDate>2006-01-02T00:00:00Z</cs:createdDate>
<cs:creatorName>Anne Onymous</cs:creatorName>
<cs:changeReason>Addition of identifier</cs:changeReason>
<cs:addition>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/identifier"/>
<rdf:object>Z875331</rdf:object>
</rdf:Statement>
</cs:addition>
</cs:ChangeSet>
</rdf:RDF>
Later on the description is removed and a new ChangeSet is created to represent this change:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://example.com/res#thing"/>
<dc:title>New Title</dc:title>
<dc:identifier>Z875331</dc:identifier>
</rdf:Description>
</rdf:RDF>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cs="http://purl.org/vocab/changeset/schema#">
<cs:ChangeSet rdf:about="http://example.com/res#change3">
<cs:precedingChangeSet rdf:resource="http://example.com/res#change2"/>
<cs:subjectOfChange rdf:resource="http://example.com/res#thing"/>
<cs:createdDate>2006-01-03T00:00:00Z</cs:createdDate>
<cs:creatorName>Anne Onymous</cs:creatorName>
<cs:changeReason>Removal of description</cs:changeReason>
<cs:removal>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/description"/>
<rdf:object>A short description of this resource</rdf:object>
</rdf:Statement>
</cs:removal>
</cs:ChangeSet>
</rdf:RDF>