WebExp2 Experimenter's Manual - School of Informatics - University ...
WebExp2 Experimenter's Manual - School of Informatics - University ...
WebExp2 Experimenter's Manual - School of Informatics - University ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
• comments can be written like this: <br />
• attribute values must always be quoted<br />
A fuller description <strong>of</strong> XML and the precise rules that govern its use can be found in the excellent tutorial at<br />
http://www.w3schools.com/xml<br />
4.2.2 Reading XML<br />
As every property or object must be defined within these matching opening and closing tags, XML results in<br />
a rather verbose experimental description. However it is straightforwardly legible with a little practise, and<br />
particularly with indentation and a code-colouring text editor which will show you the distinction between your<br />
property tags and their values.<br />
An excellent and versatile editor which will colour XML for you is Scite, available for free from http://www.<br />
scintilla.org.<br />
Using XML also means that it is simple to validate and transform both experimental designs and results, and<br />
makes it relatively legible to a non-technical user.<br />
4.3 How to write an experiment in XML<br />
To implement an experiment you must write an XML file describing the sequence <strong>of</strong> the experiment, and<br />
optionally one or more resource files which describe your stimuli. An experiment is described by a Timeline<br />
which consists <strong>of</strong> one or more Stages, each <strong>of</strong> which contains one or more Slides. The Timeline therefore is<br />
the root element <strong>of</strong> the XML document. The next section describes the function and behaviour <strong>of</strong> the elements<br />
(stages, slides, components) which you define within the timeline.<br />
Observing the XML ‘well-formedness’ rules (section 4.2.1), you define your stages and slides along with their<br />
properties; filling the slides with components, which act as stimuli and collect responses for you. Then you can<br />
run the experiment, and your sequence <strong>of</strong> slides gets displayed.<br />
If you describe an unknown or inapplicable property within your XML, it will be ignored during the experiment.<br />
However the document must be a ‘well-formed’ XML document. Some information is output to the logs about<br />
illegal properties and values, so you can clear up anything that may be providing unexpected behaviour.<br />
Note: In 2005/6 we should be developing a front-end for <strong>WebExp2</strong> which will simplify the process <strong>of</strong> designing<br />
slides, shielding the user from the repetitive task <strong>of</strong> defining the XML by hand.<br />
4.4 Description <strong>of</strong> the Slide<br />
The slide is the area where you display the components (stimuli and responses) that you want to present in<br />
each step <strong>of</strong> your experiment. Think <strong>of</strong> it as a point in the sequence <strong>of</strong> your experiment, and as the page where<br />
you will present the stimulus to the subject, whether that is a picture, some text, an audio clip, or an animated<br />
image; and where you will also present components for collecting responses and input.<br />
Components are arranged on the screen by defining a layout for your slide, specifying row and column sizes<br />
and positioning components within the resulting grid. You can specify the visual properties <strong>of</strong> font and color<br />
when describing a slide, which will provide defaults for any visual components you place onto the slide.<br />
Each slide is used to present stimuli to the subject. These stimuli can be defined within the slide description,<br />
but it is more sensible to separate the changeable content <strong>of</strong> your experiment from the form. You can do this<br />
by writing separate files which describe your stimulus resources, and importing these into your slides. This is<br />
described in a later section.<br />
21