Skip to main content
100%

Experiments with XQuery, RESTXQ, and MVC in BaseX

✓ Published0🌍 Public
CCliffordAnderson
Last edited May 15, 2015
Created on May 15, 2015

This example demonstrates a model-view-controller (MVC) architecture for serving a web-based corpus of Charles Baudelaire’s poems, with XQuery functions defining RESTful routes. It shows how BaseX’s RESTXQ annotations (`%rest:path`, `%rest:GET`) map URLs like `/`, `/about`, and `/contents` to controller functions, while a separate view module generates XHTML pages with Bootstrap styling. The model module queries the `fleurs-du-mal` collection to extract contributor names and poem titles for dynamic content. The code highlights XQuery’s role in both server-side logic and HTML templating, without any client-side JavaScript or charting libraries.

AI-generated description

Similar vizzes