5.7 StandOff Extension

XML is often used to store annotations (i.e. meta-data, data describing other data). In particular, XML StandOff Annotation, concern annotations that annotate some object that itself is not included in the XML document. Such StandOff annotation often refers to regions in this object. We support a form of XML annotations that denotes these regions as XML node attributes called start and end.

Consider, for example, a video file (documentary) annotated as follows:

<sample>
 <video>
  <scene id="Intro" start="0" end="800"/>
  <scene id="Interview" start="801" end="10400"/>
  <scene id="Outro" start="10401" end="13400"/>
 </video>
 <music>
  <song artist="Beatles" start="0" end="4500"/>
  <song artist="Bach" start="10000" end="13000"/>
 </music>
</sample>

On the above example XML file (multimedia case), one may want to ask which music was played during the interview. In that case, we want song elements whose regions overlap with the Interview shot. Without StandOff extensions, such queries are tedious to express in XQuery, and perform very slowly.

with StandOff extensions, the query can be posed as follows:

doc("example.xml")//scene[@id="Interview"]/select-wide::song
Note the select-wide is an extension of the XPath (and thus XQuery) syntax.

Inside the server, the StandOff steps are implemented efficiently using sophisticated interval-join algorithms, as well as a temporal index. Both are employed automatically by MonetDB/XQuery, without need of user or DBA intervention. The XIME-P 2006 paper from our scientific library gives technical background on these StandOff extensions.