Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Sample MarkLogic rewrite Application

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 css
Octocat-spinner-32 images
Octocat-spinner-32 lib
Octocat-spinner-32 xml
Octocat-spinner-32 bycountry.xqy
Octocat-spinner-32 helper.xqy
Octocat-spinner-32 index.xqy
Octocat-spinner-32 rewrite.xqy
Octocat-spinner-32 search.xqy


This work was done during one of the XQuery Basics Classes where customers asked for a demonstration of REST. None of the files was renamed and no code changes were needed to use rewrite.

It does a lazy loading of files, so they will be loaded the first time you call the application.


Simple create an HTTP App Server pointing to this directory and make rewrite.xqy the rewrite script for that App Server.


Added a route to access countries by name, e.g. http://localhost/country/Argentina for demonstration purposes. It's not linked in the application but you can access it directly by URL.

MarkLogic University

This application was developed as part of MarkLogic University. If you want to learn how it was built register in the XQuery Basics class. This is copyrighted by MarkLogic University and ok to use only for the purposes of this demonstration. Further inquiries can be sent to training at marklogic dot com.

Something went wrong with that request. Please try again.