-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxhive-exts.xqy
35 lines (29 loc) · 902 Bytes
/
xhive-exts.xqy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
xquery version "1.0";
(:
: Module Name: XHive Extensions
: Module Version: 1.0
: Date: September, 2007
: Copyright: Michael J. Giarlo
: XQuery Specification: November 2005
: Module Overview: X-Hive-specific hooks
:)
(:~
: X-Hive extensions
:
: @author Michael J. Giarlo
: @since September, 2007
: @version 1.0
:)
module namespace xhive-exts = 'http://diglib.princeton.edu/ns/xquery/xhive-exts';
declare default function namespace 'http://diglib.princeton.edu/ns/xquery/xhive-exts';
declare namespace xhive = 'http://www.x-hive.com/2001/08/xquery-functions';
declare namespace mods = 'http://www.loc.gov/mods/v3';
(:~
: Get last modified date from X-Hive/DB
:
: @param $_record an XML doc
: @return xs:dateTime
:)
declare function xhive-exts:last-update($_record) {
xhive:java('edu.princeton.diglib.xhive.XQGetDocDateFunction', fn:root($_record)) cast as xs:dateTime
};