Create a XMT-O Presentation
This exercise will demonstrate how to create a simple presentation
with an image. The image is the background picture frame and area
for a text description of the picture.
The basic elements of a XMT-O document are the <xmt-o> element
containing a <head> and <body> element. The <xmt-o>
contains the namespace information for the schema, which is used
for validating the XMT-O document. The <head> contains the
overall description of the document. The <body> contains the
objects which make up the presentation.
<xmt-o ...>
<head> ... </head>
<body> ... </body>
</xmt-o>
Create the <head> section to the document.
The coordinate system is pixel metrics. The units are measured
in pixels, thus a height of 18 would be 18 pixels. In the meter
metric coordinate system, units are measured based on the presentation
width. In meter metrics a unit is specified as 1/2 the width of
the presentation. Thus 0.1 would be 1/20 the width of the presentation.
Meter metrics allows generating the presentation such that it scales
based on the presentation size.
The size and background color for the presentation are defined
in the <topLayout> element. The color is given in as a hexadecimal
RGB color, a light shade of blue green which matches the outside
border of the image.
<xmt-o ...>
<head> ...
<layout metrics="pixel" type="xmt/xmt-basic-layout">
<topLayout width="400" height="300" backgroundColor="#99CCCD"/>
</layout>
</head>
<body> ... </body>
</xmt-o>
In the <body> section, add a <par> element. The <par>
element enables all of its children elements to run at the same
time, in parallel. For the initial presentation add an image to
the <par>. The image is the background picture frame and area
for a text description of the picture.
The duration of the image is set to indefinite. This will enable
the image to be displayed the entire length of the presentation.
By default images have a duration of 0 seconds as do other graphic
objects. Thus it is a good idea to give them an explicit duration.
Another good idea is to give all the media objects an id. The ids
are used to provide references in the document and are helpful in
tracking down problems.
<xmt-o ...>
<head> ... </head>
<body>
<par>
<img id="backdrop" src="../multimedia/BackDrop.jpg" dur="indefinite"/>
</par>
</body>
</xmt-o>
The following is the complete XMT-O file used for this exercise:
IBMSlideShow1.xml
Here is a snap shot of the exercise:
In the next exercise, you will add
a sequence of pictures to the picture frame.
|