What is the Berkeley Web Template CGI script?
The Berkeley Web Template CGI script is a cgi web application that generates a user-defined HTML form template and then generates markup using the values filled in by users. The Template script is generic in that it is not limited to a specific output markup. Output may be in the form of METS, TEI, EAD, XML or SGML, even HTML or PDF. The HTML format of the form is also entirely user-configurable. Although the template script is used here at Berkeley for both TEI and HTML, it has found it's greatest use generating EAD markup from information users type into a web form. The script has been configured to turn blank lines in prose text into multiple paragraphs, automatically encode <controlaccess> headings, even turn plain text chronological lists into <date>/<event> pairs within <chronlist> Please try out the template for yourself here. Simply fill in some values then click Submit: http://sunsite.berkeley.edu/cgi-bin/template/ead/bancroft Note: The web templates are NOT intended to be a complete markup solution, similar to an XMetal or XMLSpy. They augment existing XML editors by automating some of the more tedious and repetitive tasks associated with encoding the non-dsc portion of an EAD-encoded finding aid. They are not intended to replace an XML editor. It is expected that users will begin the encoding process in the web templates, download the partially encoded file, then complete the encoding in the full-featured XML editor of their choice. Not every possible tag or attribute is available in the web templates. Attempting to include everything and the kitchen sink would most likely result in an unusable mess that would more likely confuse users than assist them. It is simply not practical to expect a web application to mimic the functionality of a commercial software product. The web templates have no spell check or grammar check capability, you cannot save a template and return to it later (they must be encoded in one shot then downloaded), and it's even possible to create invalid EAD code. Berkeley Web Template features
Designed specifically to support multiple templates
The template script finds its greatest use in multirepository projects where each institution requires its own unique boilerplate text and variation in encoding output. For a single institution using a single template, this script is actually overkill, carrying with it an unnecessary burden of complexity. But for a large or medium sized multi-instituional project, such as the Online Archive of California, the Template script can vastly streamline the process of encoding and aid the encoder in adhering to standard markup guidelines.
Easy to configure
The Berkeley Web Template script is a generic template engine. While creating an entirely new template or set of templates can be challenging, the script ships with a ready-made set of EAD configuration files designed to make customizing as easy as possible. All "boilerplate" text appears at the top of the configuration file, as
do more complex sections of markup that can be plugged in to the EAD output.
Creating a template for a new markup unit involves editing the boilerplate
and markup sections at the top of the template, then you're ready to go.
The shipping templates are arranged in a modular nature which makes it easy
to include new markup sections not included with the shipped templates
(e.g., <appraisal>).
Extensible
The template engine automatically supports placing form field values filled in by users into "slots" defined by the output template. More complex behaviors are created using "extension" files. Extension files are small perl programs which manipulate form data before plugging the results into the output template. EAD template features such as splitting prose text into multiple paragraphs based on blank lines, converting MARC-display style access points into fully encoded <controlaccess> terms, automatically supplying language and script codes for all languages entered into <langmaterial>, etc., are all supplied through the use of an extension file. Thus the template engine is not limited to generating output conforming to a specific DTD, schema, or markup language. ![]() ![]() Simple CGI solution
Although many new web technologies have grabbed the headlines and the attentions of programmers, the now-quaint CGI standard still has its advantages in modern production servers. Most notably, it just works. While ASP, JSP, and servlet technologies can reduce server strain and streamline complex corporate content management, they can be nightmarish to maintain for individual web programmers working in a smaller environment. With a cgi script you needn't worry about correctly installing the latest server extensions or program language environments. Providing your web server has a version of perl installed (and most do nowdays), simply copy the files to their correct locations and the script works. Reliably, efficiently, and 100% of the time. No need to worry about your exotic extensions and environments "going down" and requiring a programmer to restart. If your server is running then your cgi script will work. Download the Berkeley Web Template program today!
Right-click and select "Save As": template.tar.gz (4/30/2005) Basic tutorial on customizing the EAD template Small document on general template script concepts |