XRX/XRX Application Server

XRX as an Application Server
XQuery is a transform language in addition to a query language. Its original name was "Quilt" reflecting its ability to knit together different pieces of (XML) content.

This means that it is good at querying XML data from a data store and transforming it into an XHTML web page. Any XQuery-capable XML data store that accepts HTTP requests can talk to your web browser and send it an arbitrarily complex, valid (X)HTML document.

Here is a short example of how XQuery can transform XML database records into valid HTML:

bob Jumbo Can SPAM

can be "transformed" to HTML:

&lt;div id='cust'> &lt;b>bob&lt;/b> Orders: &lt;ul> &lt;li>Jumbo Can SPAM (1)&lt;/li> &lt;/ul> &lt;/div>

with XQuery something like (not tested): let $customer := //customer[name='bob'] return &lt;div id='cust'> &lt;b>{$customer/name/text}&lt;/b> Orders: &lt;ul> {     for $o in $customer/orders/order return &lt;li>{$o/text} ({$o/@qty})&lt;/li> }   &lt;/ul> &lt;/div>

Many free and commercial XQuery-enabled databases are available. They include: BaseX, DB2, eXist, MarkLogic, Oracle, and xHive. BaseX and eXist are free, and MarkLogic (and perhaps others) has a free community edition. Many if not all of them support HTTP requests, and therefore can be used as web/app servers.

BaseX:

BaseX is both a light-weight, high-performance and scalable XML Database and an XQuery 3.1 Processor with full support for the W3C Update and Full Text extensions. It focuses on storing, querying, and visualizing large XML and JSON documents and collections. A visual frontend allows users to interactively explore data and evaluate XQuery expressions in realtime. BaseX is platform-independent and distributed under the free BSD License.(from their website)

It also has a stand-alone mode and a web-server mode.

eXist:

Although the eXist database was originally created to simply store XML data like a traditional database, the rich REST interfaces that have been added to eXist have transformed it into a web server. The eXist database is now able to provide a rich set of functions that are only available in other application servers. What remains is the application development standards that would allow a large number of people developing XRX applications to all work together.

MarkLogic:

MarkLogic is perhaps the most capable XML data management product at this writing. It combines XML/XQuery with text indexing and retreival, geospatial, alerting, and enterprise class scaling and performance.

xHive (or xDB):

xHive is a state-of-the-art native XML database with XQuery support, transaction control, extensive indexing features and top-class scalability.

DB2, Oracle, PostgreSQL:

DB2, Oracle and PostgreSQL support XML by incorporating it as a large CLOB field, and support XQuery on this data. PostgreSQL currently supports only XPath (as a subset of XQuery). It checks the input values for well-formedness, and there are support functions to perform type-safe operations on it.

XRX Application Server Vision
The XRX application server can now be set up to allow a wide variety of applications to be installed that all work together.

Back: Benefits of XRX • Next: Building your First XRX Application