Demo XML Reference

The XML format for the demo files (see "Creating a New Demo") is described in this document.

Element hierarchy

    <demo>
       <description>
       <activity>
          <engine_settings>
          <sample_document>

<demo>

The <demo> tag is the toplevel element.

Attributes

Attribute
Value
Obligatory?
Description
name string
yes The name of the demo. This name will be used for the title and heading of the demo page.

Children

Element
Obligatory?
Repeatable?
Description
<description> yes no The description of the demo. This description can be arbitrary HTML. If you use HTML tags, you should use the XML <![CDATA[...]]> construction to block the interpretation of the contents by the XML parser.

This element has no attributes or element children; its value is the text it delimits.
<activity> yes yes The activities the user can undertake in the demo.

<activity> (of <demo>)

Each <activity> bundles together a common set of MATEngine settings with a set of documents that those settings can be applied to.

Attributes

Attribute
Value
Obligatory?
Description
name a string
yes The name of the activity. If there is more than one activity defined, this name will be used in the drop-down menu to select an activity.
enable_blank_document "yes"
no By default, the demo will not allow the user to type into a blank pane so that arbitrary text can be processed. Use this attribute to enable this option.

Children

Element
Obligatory?
Repeatable?
Description
<description> yes no The description of the activity. This element has no attributes or element children; its value is the text it delimits.
<engine_settings> yes no The MATEngine settings which are used to process the sample documents.
<sample_document> no yes A sample document.

<engine_settings> (of <activity>)

When a document is processed under a chosen activity, MATEngine is invoked.

Attributes

Attribute
Value
Obligatory?
Description
task a string
yes The name of a task. Identical to the --task argument of MATEngine.
steps a comma-separated string of steps
yes The steps to apply. Identical to the --steps argument of MATEngine.
workflow a string
yes The name of a workflow. Identical to the --workflow argument of MATEngine.
<attr>
no In addition to the three attributes above, the <engine_settings> attribute supports passing most other MATEngine flags. You should not specify flags for the type or location of the input or output. In almost all cases, you won't need to specify anything additional using this option, but it's available if necessary (e.g., if you want to change the recall/precision bias).

<sample_document> (of <activity>)

A sample document that the user can choose to be processed for this activity.

Attributes

Attribute
Value
Obligatory?
Description
relative_location a relative pathname
yes The location of the sample document inside the task directory.
description a string
yes A description of the sample document, to be used in the drop-down menu to select the document to process.
file_type "raw" or "mat-json"
yes Identical to the --input_file_type argument of MATEngine.
encoding a string
no A character encoding, if not ASCII. Identical to the --input_encoding argument of MATEngine.
editable "yes"
no By default, the input pane in the demo is not editable if the document isn't blank. If you want the user to be able to edit the document before processing it, use this attribute.