source: exist/trunk/xquery/atomFullPath.xq @ 4239

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/atomFullPath.xq@4326
Revision 4239, 483 bytes checked in by cbyrom, 11 years ago (diff)

Tighten up xpath expressions used for searching for atoms.

Line 
1(: Return a specific atom document when TargetCollection and LocalID are overwritten
2- NB, this adds an extra :)
3declare default element namespace 'http://www.w3.org/2005/Atom';
4declare variable $targetCollection as xs:string := 'TargetCollection';
5declare variable $localIdentifier as xs:string := 'LocalID';
6for $DE in collection($targetCollection)/entry[matches(id, concat('__ATOM__',$localIdentifier,'$'))]
7return
8<collectionPath>{util:collection-name($DE)}</collectionPath>
9
Note: See TracBrowser for help on using the repository browser.