Database Reference
In-Depth Information
This chapter is not a comprehensive explanation of XForms itself, but instead is
meant to show how you can use XForms with eXist. For in-depth information about
XForms, check out Micah Dubinko's book XForms Essentials (O'Reilly) and Dan
McCreary's XForms wikibook .
eXist provides facilities for both server-side processing through betterForm , which is
embedded in eXist, and client-side processing through XSLTForms , which is avail‐
able as an EXPath package for eXist. We will take a look at how each of these may be
configured and used shortly.
At this point it is also worth mentioning the excellent Orbeon Forms . Orbeon is an
open source (LGPL v2.1-licensed) server-side XForms processor that ships with an
embedded eXist instance. There is also a commercial and supported version available.
One of the major features of Orbeon is that it provides a pipeline language called XPL
that enables you to easily create XForms, deliver them over the Web, and then save
the results into eXist. It is also possible to configure Orbeon to use a separate eXist
server instead of its own embedded instance. Orbeon is a separate project that
deserves a book in its own right, so it will not be discussed further here; however, if
you are interested in XForms and eXist, it is well worth evaluating.
XForms Instances
An XForm may have one or more instances within its model ; these instances define
the model aspect of the MVC architecture behind XForms. Simply put, each instance
can be considered a standalone XML document that provides data to the form, for
the purposes of display, capture, or influencing behavior. Ultimately, it is usually an
instance (XML document) that is stored into eXist when the user submits the form.
Typically, in a simple XForm the instances are hardcoded as either documents that
have structure but no content, or documents with content that is to be edited; how‐
ever, with eXist, you have several ways to make the instance data available to your
form in a more dynamic manner.
Instances and the REST Server
Each instance within the model of an XForm need not be inlined. Rather, an instance
can be retrieved from an external URI—and what better place to retrieve your XML
instance documents from than a native XML database like eXist?
So, rather than constructing your instance inline like so:
<xf:model>
<xf:instance xmlns= "" >
<company>
<name> eXist Solutions GmbH </name>
<registration> HRB 89454, Amtsgericht Darmstadt </registration>
<vatId> DE273180763 </vatId>
<taxNum> 007 232 51397 </taxNum>
Search WWH ::




Custom Search