Database Reference
In-Depth Information
• When a document is copied or moved, the behavior just described is applied to
the destination document (assuming it is also in a versioned collection).
For example, say we have the collection /db/actors for which we have enabled the
VersioningTrigger , and we have a document stored in that collection called
michael-rennie.xml , which looks similar to:
<actor>
<name>
<given> Michael </given>
<family> Rennie </family>
</name>
<born> 1909 </born>
<desceased> 1971 </desceased>
<abstract> The British actor Michael Rennie worked as a car salesman and factory
manager before he turned to acting. </abstract>
</actor>
Ah, but then we realize that we have spelled deceased wrong in our element, and
decide to update the document to fix this. Subsequently, we then see the documents
shown in Figure 16-1 in the collection /db/system/versions/db/actors .
Figure 16-1. Versioning trigger, first revision documents
While the michael-rennie.xml.base document is just a copy of the original XML docu‐
ment, the michael-rennie.xml.1 document is the diff document, whose ordinal suffix
immediately indicates to you that it is the first revision. The content of the document
looks like:
<v:version xmlns:v= "http://exist-db.org/versioning" >
<v:properties>
<v:document> michael-rennie.xml </v:document>
<v:user> admin </v:user>
 
Search WWH ::




Custom Search