-
Notifications
You must be signed in to change notification settings - Fork 7
Writing scripts to display XML files
Currently, XSLT
is the only type script that is well-supported by the app. XQuery and others might follow if the need arises.
As the app already provides an HTML frame (by means of eXist’s templating system, see Main-HTML-files), any script generating HTML output does not need to concern itself with the HTML header, the head portion or the display area for annotations and images on the right. Instead, all that needs to be done is generate a (series of) div(s) that will live inside the html:main
displayed on the left.
The script to use is best specified within wdbmeta.xml. It is possible to supply a parameter view
that will be passed to the script as a paramter $view
– this one is supposed to correspond to different views of the text, e.g. different witnesses – and p
(to be passed as $p
) which may take any form.
wdbmeta.xml’s process setting can be used to associate a script with an XML by means of either listing the ID of the file, the ID of a file group, or providing a regex that is matched against the XML’s file name.
From wdb+ 24Q4, these processes can actually be cascading: if a project does not define any processing steps, wdb+ will travel to the parent project if one is defined by means of a meta:struct/meta:import
(and, recursively, upwards as long an import is present). You can thus create global default script to use when displaying files without having to copy them around, thus making code maintenance easier.
- Installation and Configuration
- Basic Usage
- project Specifics
- Tech