Data content attributes

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 14:54

The XML representation of data content attributes is an XML element named as the attribute with XML attributes specifying the id, the size, the MIME type, the file extension and the Mac file type of the associated data, e.g.:

 <image id="obj33477" . . .>

   . . .

  <thumbnail id="data11488" size="10649" mime="image/jpeg" 

      nav:mimeExt=".jpg" nav:mimeMacType="JPEG" />

   . . .

 </image>

 

Based on this XML representation, the query

 gn4:image[gn4:thumbnail/@id='data843']

returns the image with a thumbnail with the specified data id (843); the query

 gn4:image[gn4:thumbnail/@size>1024]

returns all images with a thumbnail bigger than 1 Kbyte (1024 bytes); the query

 gn4:image[gn4:thumbnail/@mime='image/jpeg']

returns all images with a JPEG thumbnail.

If a data content attribute is empty the corresponding XML element is missing from the XML representation of the object, so the query

 gn4:image[not(gn4:thumbnail)]

returns all images without a thumbnail.