Skip to content

Instantly share code, notes, and snippets.

@wsalesky
Created June 18, 2014 18:03
Show Gist options
  • Save wsalesky/eb9d39478182c79ed3c2 to your computer and use it in GitHub Desktop.
Save wsalesky/eb9d39478182c79ed3c2 to your computer and use it in GitHub Desktop.
Main search xquery. imports @andersoncliffb's render.xqm module
xquery version "3.0";
import module namespace search = "http://xqueryinstitute.org/search" at "search.xqm";
import module namespace render = "http://xqueryinstitute.org/render" at "render.xqm";
declare variable $q {request:get-parameter('q','')};
declare variable $rows {request:get-parameter('rows',5) cast as xs:integer};
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
{render:render(search:search($q,$rows))}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment