Database Reference
In-Depth Information
While XSLTForms is described as a client-side processor and this is
most often how it is deployed, it is entirely possible to process the
XSLT part of XSLTForms server-side with eXist. You can do so
either by using an XSLT transformation function from XQuery
(see “XSLT” on page 238 ), or by using URL rewriting (see http://
www.exist-db.org/exist/apps/doc/xforms.xml#D1.2.5.3 ) . As these
topics are covered elsewhere, they will not be discussed further
here.
To install XSLTForms with eXist, you must install the EXPath package provided for
use with eXist via the eXist dashboard. Visit http://localhost:8080/exist/apps/dash‐
board/ on your machine, and then install XSLTForms by clicking the Package Man‐
ager app and selecting Install for the XSLTForms Files package (see Figure 10-2 ).
Installing the XSLTForms Files package will download and extract the XSLTForms
EXPath package into a new database collection at /db/apps/xsltforms .
Once the XSLTForms Files package is installed into eXist, you may simply store your
XForm host document into the database (typically, if it is an HTML document, you
should use the .xhtml extension to ensure it is delivered to the web browser with an
application/xml Content-Type ) and add the following processing instruction to the
top of it:
<?xml-stylesheet
href="http://localhost:8080/exist/apps/xsltforms/xsltforms.xsl"
type="text/xsl"?>
As opposed to the absolute URI used in the preceding processing instruction, you
may use a relative URI. For example, if you had stored your XForm into a subcollec‐
tion of /db , you might use the following processing instruction:
<?xml-stylesheet href="../apps/xsltforms/xsltforms.xsl" type="text/xsl"?>
Search WWH ::




Custom Search