The virtual XML used by GNQuery includes also extended referencing informations. They are indentified by an extra extRefs element:
<audio nav:objectType="audio" id="..." name="..." modifiedDate="..." creationDate="..." size="..." rightsStatus="..." eventDate="..." duration="..." sampleRate="..." album="..." xmlns="..." xmlns:nav="http://www.teradp.com/schemas/GN4/1/ObjNav.xsd">
<nav:referencing>
<nav:referencingBy attrName="package.objs">
<nav:extRefs handle="1">
<ref idref="...">
<title/>
<caption>...</caption>
<nav:refObject idref="...">
<story nav:objectType="story" id="..." name="..." modifiedDate="..."
creationDate="..." size="..." rightsStatus="..." nWords="..." nChars="..."/>
</nav:refObject>
</ref>
</nav:refs>
</nav:referencingBy>
</nav:referencing>
</audio>
It is possible to do query like:
Get all the audio referenced by a specific package or story with a caption containing a specific word:
gn4:audio[nav:referencing/nav:referencingBy[@attrName='package.objs']/nav:extRefs/gn4:ref[@idref='obj63942' and contains(gn4:caption,'caption')]]
Get all the users with Delete permissions on a specific folder:
gn4:user[nav:referencing/nav:referencingBy[@attrName='folder.access']/nav:extRefs/gn4:securityAccess[@idref='obj6909' and gn4:grant='Delete']]
Get all categories used by calendar objects with a weight under 50:
gn4:category[nav:referencing/nav:referencingBy[@attrName='calendarObject.cats']/nav:extRefs/gn4:ref[@weight<50]]
Get all pub modes used to publish a specific object (id 44043) on a specific pub dest (id 1595):
gn4:pubMode[nav:referencing/nav:referencingBy[@attrName='pubDest.objs.pubModeRef']/nav:extRefs/gn4:ref[@idref='obj44043' and gn4:pubModeRef/@idref='obj1595']]
Get all users that created a libel tag for a specific object (id 3626) with a description containing a specific word ('libel'):
gn4:user[nav:referencing/nav:referencingBy[@attrName='archiveObject.libelTags.creatorRef']/nav:extRefs/gn4:item[gn4:creatorRef/@idref='obj3626' and contains(gn4:description,'libel')]]