Database Reference
In-Depth Information
<v:date>
2014-03-09T14:59:18.954Z
</v:date>
<v:revision>
1
</v:revision>
</v:properties>
<v:diff>
<v:delete
event=
"start"
ref=
"1.3"
/>
<v:append
ref=
"1.3"
>
<v:end
name=
"deceased"
/>
</v:append>
<v:delete
event=
"end"
ref=
"1.3"
/>
<v:insert
ref=
"1.3"
>
<v:start
name=
"deceased"
/>
</v:insert>
</v:diff>
</v:version>
As expected, the diff document clearly shows the rename as a process of deleting the
element with the incorrect name and then replacing it with a new one with the cor‐
rect name.
Finally, let's update the document by adding some extra information to the
abstract
element. Following the update, we then see the documents shown in
Figure 16-2
in
the collection
/db/system/versions/db/actors
.
Figure 16-2. Versioning trigger, second revision documents
There is now a second diff document (
michael-rennie.xml.2
), and if we examine it, its
content should look something like this:
<v:version
xmlns:v=
"http://exist-db.org/versioning"
>
<v:properties>
<v:document>
michael-rennie.xml
</v:document>
<v:user>
admin
</v:user>
<v:date>
2014-03-09T15:15:28.342Z
</v:date>
<v:revision>
2
</v:revision>
Search WWH ::
Custom Search