IBM MPEG-4 XMT-O Tutorial IBM MPEG-4 Technologies
IBM MPEG-4 Technologies
Overview
Presentation
Images
Text
Definitions
Regions
Animation
Transition
Credits
Transition credits
Video

Use Definitions

This exercise will demonstrate how to use definitions to share object in the presentation.

To share object you need to create a <defs> section in the head of the document. The <defs> section contains a definition for the <fontStyle> and <material> elements. The defined objects can be reused throughout the body of the document. The definitions do not have a duration, but exist the entire lifetime of the presentation. The id is used in order to reference the definition.

<xmt-o ...> 
  <head> 
    ...
    <defs>
      <fontStyle id="fontDef" family="&quot;SANS&quot;" justify="MIDDLE; MIDDLE" size="18" style="BOLD"/>
      <material id="matDef" color="black" filled="true"/>
    </defs>
  </head>
  <body> ... </body>
</xmt-o>

To reuse the defined object specify the <use> element. The xlink:href attribute references the definitions in this document.

<xmt-o ...> 
  <head> ... </head>
  <body> 
    <par>
      ...
      <string ...>
        <use xlink:href="#matDef"/>
        <use xlink:href="#fontDef"/>
        ...
      </string>
      <string ...>
        <use xlink:href="#matDef"/>
        <use xlink:href="#fontDef"/>
        ...
      </string>
      <string ...>
        <use xlink:href="#matDef"/>
        <use xlink:href="#fontDef"/>
        ...
      </string>
      <string ...>
        <use xlink:href="#matDef"/>
        <use xlink:href="#fontDef"/>
        ...
      </string>
    </par>
  </body>
</xmt-o>

The following is the complete XMT-O file used for this exercise:

IBMSlideShow4.xml

Here is a snap shot of the exercise:


In the next exercise, you will use regions to arrange the layout of the pictures and text.

 

  IBM Home | Research Home | MPEG-4 Technologies | alphaWorks | © Copyright IBM Corp. 1998, 2004. All Rights Reserved.