Specifications for XML Database Access Tool
Background
The National Library of Australia is leading the working group on Deep Web Archiving for the International Internet Preservation Consortium. There are two deliverables identified as outcomes of this working group which require the development of software for eventual distribution to all members of the consortium. They are: (1) tools for the ingestion of deposited databases and document archives into a long-term preservation format; and (2) the provision of access tools to search and navigate these structured data archives (which are stored as XML) via the web. These specifications describe the requirements and design options for a generic search and browse interface for such an archive which can be automatically derived from its description. The schema for describing a database archive is fully described in the document Database Archive Description Model and understanding this schema is a requirement for following these specifications.
It is proposed that the search and browse interface for an archived database will be generated automatically using an XSLT transformation of the database archive description XML file. This XML file can include a limited set of rules for configuring search and browse access.
The resulting access tool will be based on HTML Forms, Xquery (or Xpath) actions for querying the data and XSLT for rendering responses in the browser. Implementation will require the installation of either a commercial or open-source native XML server which supports these standards and the XML:DB API.
Scope
In order to achieve a usable solution within a limited budget and timeframe it has been necessary to scope the functionality of the search/browse access interface to a limited set of requirements, particularly as this interface is to be automatically generated from the database description and a very simple set of search/browse/display rules.
The design of the schema for describing a database archive and its access rules has been deliberately constrained so that it is possible for cataloguing staff to author this XML file without reference to IT staff and within a limited amount of time. It is not an objective to be able to reproduce the original dynamic web site with complete fidelity.
Although the majority of database-driven web sites that have been selected for archiving by our Digital Archiving Section provide a search of only one item type, some are more complex and required more than one item type to be searchable, with relationships often existing between them. Neither the archive nor the interface assumes that there is only one item (aka object) type described in the original site and it is possible to search for either item type and see the relationship between items if they exist.
For example if the web site being archived was a calendar of events which described both the events and venues and allowed you to search for venues based on certain criteria independently of events then this behaviour can be mimicked in the access interface.
In very broad terms the generated access interface will:
- have a home page which includes a search form allowing the user to search for the same item types using the same criteria as allowed by the original site
- have a search results display page for each item type which includes the same fields as the equivalent page on the original site but uses a default navigation strategy. The default number of results per page can be specified
- have a detailed display page for all the properties of an item linked to from its occurrence in a search results list
- have browse options which mimic the browse options available on the original site but using the display rules of the search results display
- have a default header and footer file which include the name of the publisher and the url of the original site
Example Archive
In order to visualise the requirements, screen shots are included in this specification. For easier interpretation an example database archive has been chosen. This is the Health Education Rural Resources Database published by the Faculty of Medicine Nursing & Health Sciences, Monash University. There are two item types in this archive, Resources and Providers, with a relationship between them ie resources are provided by providers. The full XML description of this archive, including search, browse and display rules can be viewed at herrd_archive-spec.xml. The original site is at http://www.med.monash.edu.au/mrh/resources/herrd/ .
Access Interface
Page Header
- generic header which is not specific to any example and includes navigation links
Page Footer
The page footer is the same for all pages of the access interface and contains the URL of the search/home page, the URL of the original deep web site which this access tool is emulating (from the liveurl element in the admin section of the archive description file, and the Publisher (from the publisher element in the admin section of the archive description file).
Search Form
Screenshots
- Generic - screenshot1 - screenshot2
- Herrd Example - screenshot1 - screenshot2 - screenshot3
Search Rules Specified in Archive Description

Each search element contained in the search_rulesmodule contains the following:
- entity - the contents of this element must match the contents of the name subelement of an item element in the data model section.
- label - this is optional. This label is used in the drop-down select box for the user to choose which type of item they are searching for (in the example Resource or Provider). If it does not exist, the label specified for the item in the data model section is used
- field - to nominate a field which is to be searchable, the contents of this element must match the contents of the name subelement of a property element for this item in the datamodel section.
- subfield - if the field specified matches a property whose composition is either structured or reference, then a subfield needs to be specified to identify which subfield is to be searchable
Page Title
- echoes admin/title element [from archive description XML file] followed by text ": Search"
Text Intro
- echoes admin/title element
- echoes admin/description element
Search Box
The first area of the search form includes a text box for users to enter the keywords they want to search for. The cursor is focused in this box. If there is more than one search rule then each entity label will appear as a radio button so the type of search can be selected.
Pattern Matching
A menu select is also available to specify whether all words in the search box need to be found or just one of them, or whether the exact phrase is to be matched and whether the search is to be case sensitive. It is also possible to use wildcards. The first two options assume that whole words are being matched. Punctuation is ignored in the matching process and hyphens are treated as spaces in the text being searched.
Wildcards
Search Criteria - Text Fields
The second area of the search form contains checkboxes for each free text field that is listed in the search rule. If there is more than one search rule then this section is dynamically regenerated if the user changes the default radio button selection desrived in the previous paragraph. If a search rule field matches a datamodel property of type "text" then the label of this field will appear next to a checkbox which is checked by default. So unless a user unchecks any of these checkboxes the keyword(s) will be searched for in every searchable text field.
Search Criteria - search refinements
The third area of the search form is generated if the entity selected for searching contains fields which match properties of type enumeration, number, realnumber, flag or date. Each criteria will display differently depending on the property type:
- enumeration - if the property element in the datamodel contains a valueset element with a list of possible values then the menu options will be these values. If not, then all discrete values found in the archived data for this field will be displayed in the menu. The option "Any" will always be the default which means this search criteria is not used unless the user selectes a paricular value.
- date - a select menu will be displayed with the following options: Any, Before, After, Between, On with Any as the default. If Before, After or On are selected then dynamic javascript will overlay an input element for a single date. If "Between" is selected then input elements for two dates will be overlayed.
- flag- in this case a checkbox will be displayed next to the property label.
- number, realnumber - a select menu will be displayed with the following options: Any, is greater than, is less than, is between, is equal to with Any as the default. If is greater than, is less than or is equal to are selected then dynamic javascript will overlay an input element for a single value. If "is between" is selected then input elements for numbers will be overlayed
Result Set Size
The fourth area of the search form allows the user to select the number of search results that will be displayed per results page. The default is set to whatever the resultschunk element contains in the display_rules section of the archive description file..
Form Buttons
Two buttons at the base of the form display as "Search" and "Reset". If Search is selected then the query is processed and results returned, if any. If "Reset" is selected then all form input elements return to their defaults. There is also a Search button after the first input area on the form whoich has the same action.
Results Set Page
ScreenShots
- Generic - screenshot1 - screenshot2
- Herrd Example - screenshot1 - screenshot2 - screenshot3
Display Rules Specified in Archive Description File

Each resultsummary element contained in the display_ruleselement contains the following:
- entity - the contents of this element must match the contents of the name subelement of an item element in the data model section.
- results-style - there are two options for styling the results, table - which outputs the results as a HTML Table with one row per item matched and the values for each summary field one per column. The first table row contains the field labels. The first table coumn contains a sequence number for the results.
- field - specifies a field which is to be displayed in the result set summary. The contents of this element must match the contents of the name subelement of a property element for this item in the datamodel section. It can have the optional attributes, sortorder and link
- subfield - if the field specified matches a property whose composition is either structured or reference, then a subfield needs to be specified to identify which subfield is to be displayed in the search results summary
- link - if this attribute is specified with value truefor a field element then the field contents in the archive are sourrounded with a hyperlink whose URL will link to the detailed display of this item - see detailed display page
- sortorder - this attribute for a field element can have the value ascending, descending or none and specifies if the result set will be displayed sorted by the value of that field.
The HERRD example has the following display rules in its archive description tool.
<display_rules> <resultsummary> <entity>resource</entity> <results-style>table</results-style> <field sortorder="ascending" link="true">title</field> <field>provider<subfield>name</subfield></field> <field>provider<subfield>state</subfield></field> </resultsummary> <resultsummary> <entity>provider</entity> <results-style>list</results-style> <field sortorder="ascending" link="true">name</field> <field>state</field> <field>contact</field> <field>phone</field> <field>email</field> </resultsummary> </display_rules>
Page Title
- echoes admin/title element [from archive description XML file] followed by text ": Search Results"
Text Intro
- echoes admin/title element
Search Query Echo
The number of items found in the database matching the search criteria is displayed along with an echo of the query that was submitted eg
20 [entity]s found for [keyword] in [search-field1], [keyword] in [search-field2]
Single Result Display Page
ScreenShots
- Generic - screenshot1
- Herrd Example - screenshot1 - screenshot2
Page Title
- echoes admin/title element [from archive description XML file] followed by colon
- echoes entity/label element
- echoes text Details"
Text Intro
- echoes admin/title element
- echoes entity/label element followed by text Details
Contents
- For each property that is defined in the archive description file for this item description, the contents of the label element is displayed in bold, followed by a colon then followed by the value of this property for this instance of the item in the archive. If no value exists then the label is not displayed either.
- If the property is a reference to an instance of another item type, then the value of the "link" property for that item is displayed, hyperlinked to the detailed display for that item. See example screenshots. The link property is the one that is listed in the resultsummary display rules for that item with the attribute "link="true".
- If the property is a structured property, then the value of each subproperty is displayed, prefixed with its label, separated by a comma. If there is no subproperty value for this particular instance then the label is not displayed either.
- If the property is repeatable then the characters (s) are appended to the label and if there is more than one occurence of the property in the instance then each value is seperated from the previous value using a semi-colon.
Browse Pages
Screenshots
- Herrd Example - screenshot1 - screenshot2 - screenshot3
Search Rules Specified in Archive Description

Each browse element contained in the browse_rulesmodule contains the following:
- entity - the contents of this element must match the contents of the name subelement of an item element in the data model section.
- label - this is optional. This label is used in the link to this browse page. f it does not exist, the label specified for the item in the data model section is used.
- field - to nominate a field whose index is to be browsed, the contents of this element must match the contents of the name subelement of a property element for this item in the datamodel section.
Page Title
- echoes admin/title element [from archive description XML file] followed by text ": Browse"
Text Intro
- echoes admin/title element
- echoes admin/description element
Browse Links
Each browse rule generates a link to a browse page. In the HERRD example archive description file these rules are:
<browse_rules> <browse> <entity>resource</entity> <field>keyword</field> </browse> <browse> <entity>resource</entity> <field>provider</field> </browse> </browse_rules>
So the links are
