/xquery/get-next-media-id.xql

http://transcriptstudio4isha.googlecode.com/ · Unknown · 16 lines · 12 code · 4 blank · 0 comment · 0 complexity · 77c7a927f5bf4cffa143deaa607765b0 MD5 · raw file

  1. xquery version "1.0";
  2. declare option exist:serialize "media-type=text/plain";
  3. import module namespace media-fns = "http://www.ishafoundation.org/ts4isha/xquery/media-fns" at "media-fns.xqm";
  4. let $domain := request:get-parameter("domain", ())
  5. let $eventType := request:get-parameter("eventType", ())
  6. return
  7. if (empty($domain)) then
  8. error(xs:QName('illegal-argument-exception'), 'no domain specified')
  9. else if (empty($eventType)) then
  10. error(xs:QName('illegal-argument-exception'), 'no eventType specified')
  11. else
  12. media-fns:get-next-media-id($domain, $eventType)