XRX/Dictionary Editor

Motivation
You want a simple application that saves one XML file per form. You want multiple users to each be editing individual records without conflict.

Design
We will put each term in a separate XML file, and the files will be numbered sequentially - 1.xml, 2.xml, and so on. Each file defines a single term, its acronym, and its definition.

Method

 * 1) Create a new eXist collection (aka Folder if you are using a WebDAV tool) called "dictionary"
 * 2) Create three collections called "data", "edit", and "views" within the "dictionary" collection.

data/2.xml
Your XForms application loads the data into an instance:

You pass the ID number to an XQuery "edit.xq" as a parameter in the URI, "id". "edit.xq" uses the ID parameter as a variable, "$id", to build the form.

Contents of edit/edit.xq
--- calling format: edit.xq?id=1 ---

Contents of views/list-terms.xq
As you save more and more terms, you will want to create a list of them. You can create an XQuery that list all terms. For each term you can include a link to view and edit each term.

edit.xq Header
The edit.xq takes parameters from the URI (i.e. in the form "edit.xq?id=2") and either puts a new element in the instance or it puts an existing element in the instance.

xforms.css
The following file can be linked into the form for formatting. [And which file might that be?]

Back: Configuration File Editor • Next: Regular Expression Builder