previous   next   contents  

17. SMIL 3.0 Language Profile

Editor for SMIL 3.0:
Sjoerd Mullender, CWI
Editors for Earlier Versions of SMIL:
Nabil Layaïda, INRIA

Table of contents

17.1 Overview and Summary of Changes for SMIL 3.0

This section is informative.

The SMIL 3.0 Language profile extends the SMIL 2.1 Language profile with new functionalities introduced in SMIL 3.0 Modules. Specifically, the following modules have been added to the list of modules:

The following modules were changed for SMIL 3.0:

In addition to new and changed modules, this version of SMIL also has a new requirement about the media formats that are to be supported by user agents, and the readIndex attribute was added to the Core collection, meaning it can occur on many more elements.

17.2 Abstract

This section is normative.

The SMIL 3.0 Language profile describes the SMIL 3.0 modules that are included in the SMIL 3.0 Language and details how these modules are integrated. It contains support for all of the major SMIL 3.0 features including animation, content control, layout, linking, media object, meta-information, structure, timing and transition effects. It is designed for Web clients that support direct playback from SMIL 3.0 markup.

17.3 Introduction to the SMIL 3.0 Language Profile

This section is normative.

This section is informative.

The SMIL 3.0 Language profile is defined as a markup language. The syntax of this language is formally described with a document type definition (DTD) or an XML Schema which is based on the SMIL modules as defined in "The SMIL 3.0 Modules".

The SMIL 3.0 Language profile design requirements are:

  1. Ensure that the profile is completely backward compatible with SMIL 1.0.
  2. Ensure that the profile is completely backward compatible with SMIL 2.1.
  3. Ensure that all the modules' semantics maintain compatibility with SMIL semantics (this includes content and timing).
  4. Adopt new W3C Recommendations when appropriate without conflicting with other requirements.

Note that all sections in this document are normative, unless explicitly marked informative.

17.4 Normative Definition of the SMIL 3.0 Language Profile

This section is normative.

17.4.1 SMIL 3.0 Language Profile Conformance

The definition of document conformance for SMIL 3.0 Language profile documents is given in the Conformance of SMIL 3.0 Documents section of the SMIL 3.0 Scalability Framework. Within the referenced section, the following definitions should be used:

  1. DOCTYPE: the DOCTYPE for SMIL 3.0 Language profile documents is:
    <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0//EN"
                          "http://www.w3.org/2007/07/SMIL30/SMIL30.dtd">  
  2. Default namespace: the default namespace for SMIL 3.0 Language profile documents is:
    xmlns="http://www.w3.org/ns/SMIL"
  3. DTD: the normative DTD for SMIL 3.0 Language profile documents is:
    http://www.w3.org/TR/2007/WD-SMIL3-20070713/smil30DTD/SMIL30.dtd
    (@@ to be updated at REC publication with final URI)

This version of SMIL provides a definition of strictly conforming SMIL 3.0 documents, which are restricted to tags and attributes from the SMIL 3.0 namespace. The Section "Extending a SMIL 3.0 Profile" provides information on using the SMIL 3.0 Language profile with other namespaces, for instance, on including new tags within SMIL 3.0 documents.

17.4.2 SMIL 3.0 Language profile User Agent Conformance

The definition of user agent conformance for SMIL 3.0 Language profile documents is given in the Conformance of SMIL 3.0 User Agents section of the SMIL 3.0 Scalability Framework.

17.4.3 The SMIL 3.0 Language Profile

The SMIL 3.0 Language profile supports the structured-timeline-centric multimedia features found in the SMIL 3.0 modules. It uses only modules from the SMIL 3.0 recommendation. As the language profile includes the mandatory modules, it is a SMIL Host Language conforming language profile. This language profile includes the following SMIL 3.0 modules:

  1. Structure functionality
    1. Structure Module
    2. Identity Module
  2. Metainformation functionality
    1. Metainformation Module
  3. Timing functionality
    1. AccessKeyTiming Module
    2. BasicInlineTiming Module
    3. BasicTimeContainers Module
    4. BasicExclTimeContainers Module
    5. BasicPriorityClassContainers Module
    6. EventTiming Module
    7. FillDefault Module
    8. MediaMarkerTiming Module
    9. MinMaxTiming Module
    10. MultiArcTiming Module
    11. RepeatTiming Module
    12. RepeatValueTiming Module
    13. RestartDefault Module
    14. RestartTiming Module
    15. SyncbaseTiming Module
    16. SyncBehavior Module
    17. SyncBehaviorDefault Module
    18. WallclockTiming Module
  4. Animation functionality
    1. BasicAnimation Module
  5. Content Control functionality
    1. BasicContentControl Module
    2. CustomTestAttributes Module
    3. PrefetchControl Module
    4. RequiredContentControl Module
    5. SkipContentControl Module
  6. Layout functionality
    1. AlignmentLayout Module
    2. AudioLayout Module
    3. BackgroundTilingLayout Module
    4. BasicLayout Module
    5. MultiWindowLayout Module
    6. OverrideLayout Module
    7. StructureLayout Module
    8. SubRegionLayout Module
  7. Linking functionality
    1. BasicLinking Module
    2. LinkingAttributes Module
    3. ObjectLinking Module
  8. Transition Effects functionality
    1. BasicTransitions Module
    2. TransitionModifiers Module
    3. FullScreenTransitions Module
  9. State functionality
    1. StateTest Module
    2. UserState Module
    3. StateSubmission Module
    4. StateInterpolation Module
  10. Media functionality
    1. BasicMedia Module
    2. BrushMedia Module
    3. MediaAccessibility Module
    4. MediaClipping Module
    5. MediaClipMarkers Module
    6. MediaDescription Module
    7. MediaOpacity Module
    8. MediaPanZoom Module
    9. MediaParam Module
    10. MediaRenderAttributes Module
  11. smilText functionality
    1. BasicText Module
    2. TextStyling Module
    3. TextMotion Module

The collection names contained in the following table define the SMIL 3.0 Language profile vocabulary.

SMIL 3.0 Language Profile
Collection Name Elements in Collection
Animation animate, set, animateMotion, animateColor
ContentControl switch, prefetch
Layout region, root-layout, layout, regPoint, topLayout
LinkAnchor a, area (anchor)
MediaContent text, img, audio, video, ref, animation, textstream, brush, smilText, param
Metainformation meta,
State newvalue, setvalue, delvalue, send
Structure smil, head, body
Schedule par, seq, excl
TextContent tev, clear, br, span, p, div, textStyle, textStyling
Transition transition
Other customAttributes, customTest, paramGroup, priorityClass

In the following sections, we define the set of elements and attributes used in each of the modules included in the SMIL 3.0 Language profile. The content model for each element is described. The content model of an element is a description of elements which can appear as its direct children. The special content model "EMPTY" means that a given element may not have children.

Collection Name Attributes in Collection
Core alt (CDATA), class (NMTOKEN), xml:id (ID), id (ID), label (CDATA), longdesc (CDATA), readIndex (CDATA), title (CDATA), xml:base (CDATA)
I18n xml:lang (NMTOKEN)

The xml:id and id attributes are used to assign a unique XML identifier to every element in a SMIL document. The xml:id and id attributes are equivalent and must not both be used on an element. The xml:id should be used in preference to the id attribute. When the document uses the SMIL 3.0 Language Profile DOCTYPE, only xml:id must be used.

The xml:id (id), class and title attributes in the collection Core are defined for all the elements of the SMIL 3.0 Language profile.

In this document, equivalent but deprecated attributes and elements are in parentheses.

17.4.4 Animation Module

The Animation Module provides a framework for incorporating animation into a timing framework, and a mechanism for composing the effects of multiple animations. The Animation Module uses the timing modules included in this profile for the underlying model of time. The SMIL 3.0 Language profile includes the animation functionality of the BasicAnimation module. The BasicAnimation Module defines the semantics for the animate, set, animateMotion and animateColor elements.

In the SMIL 3.0 Language profile, Animation elements can have the following attributes and content model :

Animation Module
Elements Attributes Content model
animate Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
set Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, to, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
animateMotion Core, I18n, basicTiming, Test, targetElement, origin, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
animateColor Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY

This profile adds the animate, set, animateMotion and animateColor elements to the content model of the par, seq, excl and priorityClass elements of the Timing and Synchronization Modules. It also adds these elements to the content model of the body element of the Structure Module.

Specifying the target element of the animation

The animation target elements supported in the SMIL 3.0 Language profile are the region element defined in the Layout Modules, the area (anchor) element defined in the Linking Modules and the text, img, audio, animation, video, ref, textstream and the brush elements defined in the Media Objects modules.

The SMIL 3.0 Language profile uses the targetElement attribute to identify the element to be affected by animation elements. As recommended in the BasicAnimation Module when the targetElement attribute is supported, this profile excludes the XLink attributes href, type, actuate and show from the animate, set, animateMotion and animateColor elements.

Specifying the target attribute of the animation

The target attributes of the animations are a subset of those of the region, area (anchor), and media elements. The animatable attributes of the region, area (anchor), and media elements are listed in the table below.

The area (anchor) element has the coords attribute which can be subject to animation. The attribute coords is considered of type string in this profile. This means that only discrete non-additive animation is supported on this attribute.

The media elements have the following sub-region attributes which can be subject to animation: left, right, top, bottom, width, height, z-index and backgroundColor.

Elements Target Element Target Attributes
animate region soundLevel, left, right, top, bottom, width, height, z-index, backgroundColor (background-color), panZoom, regionName
area (anchor) coords (string)
text, img, audio, animation, video, ref, textstream left, right, top, bottom, width, height, z-index, backgroundColor, panZoom
brush left, right, top, bottom, width, height, z-index, backgroundColor, color
set region soundAlign, soundLevel, left, right, top, bottom, width, height, z-index, backgroundColor (background-color), panZoom, regionName
area (anchor) coords (string)
text, img, audio, animation, video, ref, textstream left, right, top, bottom, width, height, z-index, backgroundColor, panZoom
brush left, right, top, bottom, width, height, z-index, color
animateMotion region Animates the top and left attributes of the region.
text, img, audio, animation, video, ref, textstream Animates the top and left attributes of the sub-region associated with the media element.
animateColor region backgroundColor (background-color)
text, img, audio, animation, video, ref, textstream backgroundColor
brush color

Integration definitions

The SMIL 3.0 Language profile defines a set of integration definitions as required by the Animation modules. These definitions are:

17.4.5 Content Control Modules

The Content Control Modules provide a framework for selecting content based on a set of test attributes. The Content Control Modules define semantics for the switch, prefetch, customAttributes and customTest elements. The SMIL 3.0 Language profile includes the Content Control functionality of the BasicContentControl, CustomTestAttributes, PrefetchControl, RequiredContentControl and SkipContentControl modules.

In the SMIL 3.0 Language profile, Content Control elements can have the following attributes and content model :

Content Control Module
Elements Attributes Content model
switch Core, I18n, Test, customTest, expr (switch*, (((Animation)+, (switch | Animation)*, (((Schedule | priorityClass | MediaContent | prefetch | a | State)+, (Schedule | MediaContent | switch | prefetch | a | Animation | State)*) | ((param | area | )+, (param | area | switch | Animation | )*))) | (priorityClass+, (switch | priorityClass)*))) | layout*
prefetch Core, I18n, Test, Timing, mediaSize, mediaTime, bandwidth, src, clipBegin (clip-begin), clipEnd (clip-end), skip-content, customTest, expr EMPTY
customAttributes Core, I18n, Test, skip-content customTest+
customTest Core, I18n, skip-content, defaultState (true|false) 'false', override (visible | hidden) 'hidden', uid (URI) EMPTY

This profile adds the switch element to the content model of the par, seq and excl elements of the Timing and Synchronization Modules, of the body and the head elements of the Structure Module, of the content model of the a element of the Linking Modules. The profile adds the customAttributes element to the content model of the head and the customTest element to the content model of the customAttributes element.

The Content Control functionality is used to define the Attribute set "Test":

Collection Name Attributes in Collection
Test systemBitrate (system-bitrate), systemCaptions (system-captions), systemLanguage (system-language), system-overdub-or-caption, systemRequired (system-required), systemScreenSize (system-screen-size),systemScreenDepth (system-screen-depth), systemOverdubOrSubtitle, systemAudioDesc, systemOperatingSystem, systemCPU, systemComponent

The collection of Attributes Test is added to all the elements defined in the SMIL 3.0 Language profile, except customTest and customAttributes. A SMIL 3.0 user agent must support all of the values for the systemOperatingSystem and systemCPU attributes listed in the Content Control Modules. In addition, the user agent should accept namespaced values as future extensions, and not declare a syntax error. The user agent should return false for unrecognized values of the systemOperatingSystem and systemCPU attributes.

17.4.6 Layout Modules

The Layout Modules provide a framework for spatial layout of visual components. The Layout Modules define semantics for the region, root-layout, topLayout, layout and the regPoint elements. The SMIL 3.0 Language profile includes the Layout functionality of the AlignmentLayout Module, AudioLayout Module, BackgroundTilingLayout Module, BasicLayout Module, MultiWindowLayout Module, OverrideLayout Module, StructureLayoutModule, SubRegionLayout Module modules.

In the SMIL 3.0 Language profile, Layout elements can have the following attributes and content model :

Layout Module
Elements Attributes Content model
region Core, I18n, Test, TextAttributes, backgroundColor (background-color), backgroundImage, backgroundOpacity, backgroundRepeat, bottom, chromaKey, chromaKeyOpacity, chromaKeyTolerance, customTest, erase (never | whenDone) 'whenDone', fit (fill | hidden | meet | scroll | slice | meetBest), height, left, mediaAlign (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), mediaBackgroundOpacity, mediaOpacity, mediaRepeat (preserve | strip) 'preserve', paramGroup, regAlign (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), regionName, regPoint (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), right, sensitivity, showBackground (always | whenActive), skip-content, soundAlign (left | both | right), soundLevel, textMode (append | replace | inherit | crawl | scroll | jump) 'append', textPlace (fromTop | fromBottom | inherit) 'fromTop',, textStyle, textRate, textWrapOption (wrap | noWrap | inherit) 'wrap', top, panZoom, width, z-index region*
root-layout Core, I18n, Test, backgroundColor (background-color), backgroundImage, backgroundOpacity, backgroundRepeat, customTest, height, skip-content, width EMPTY
topLayout Core, I18n, Test, backgroundColor (background-color), backgroundImage, backgroundOpacity, backgroundRepeat, close, customTest, height, open, skip-content, width region*
layout Core, I18n, Test, customTest, type (root-layout | region | topLayout | regPoint)*
regPoint Core, I18n, Test, bottom, customTest, left, regAlign, right, skip-content, top EMPTY

(**) The "background-color" attribute of SMIL1.0 is deprecated in favor of "backgroundColor", but both are supported.

The attribute collection SubregionAttributes is defined as follows:

Collection Name Attributes in Collection
SubregionAttributes backgroundColor, backgroundOpacity, bottom, fit, height, left, mediaAlign, regAlign, regPoint, right, soundAlign, top, width, z-index

This profile adds the layout element to the content model of the head element of the Structure Module. It also adds this element to the content model of the switch element of the Content Control Modules, when the switch element is a child of the head element.

17.4.7 Linking Modules

The Linking Modules provide a framework for relating documents to content, documents and document fragments. The Linking Modules define semantics for the a and area (anchor) elements. They define also the semantics of a set of attributes defined for these elements. The SMIL 3.0 Language profile includes the Linking functionality of the BasicLinking, LinkingAttributes and ObjectLinking modules.

Both the a and area elements have an href attribute, whose value must be a valid URI.

Support for URIs with XPointer fragment identifier syntax is not required.

In the SMIL 3.0 Language profile, Linking elements can have the following attributes and content model :

Linking Module
Elements Attributes Content model
a Core, I18n, basicTiming, Test, href, sourceLevel, destinationLevel, sourcePlaystate (play | pause | stop) 'pause', destinationPlaystate (play | pause) 'play', show (new | replace | pause) 'replace', accesskey, tabindex, target, external, actuate, customTest, expr (Schedule | MediaContent | ContentControl | Animation | State )*
area (anchor) Core, I18n, basicTiming, Test, shape, coords, href, nohref, sourceLevel, destinationLevel, sourcePlaystate, destinationPlaystate, show, accesskey, tabindex, target, external, actuate, shape, fragment, skip-content, customTest, expr (animate | set)*

This profile adds the a element to the content model of the par, seq, and excl elements of the Timing and Synchronization Modules. It also adds these elements to the content model of the body element of the Structure Module.

In the SMIL 3.0 language profile, a value of onLoad set on the attribute actuate indicates that the link is automatically traversed when the linking element becomes active. For linking elements containing SMIL timing, this is when the active duration of the linking element begins.

The attribute tabindex specifies the position of the element in the tabbing order at a particular instant for the current document. The tabbing order defines the order in which elements will receive focus when navigated by the user via an input device such as a keyboard. At any particular point in time, only active elements are taken into account for the tabbing order; inactive elements are ignored.

When a media object element has a tabindex attribute and becomes active, then its ordered tab index is inserted in the SMIL tab index at the location specified by the media object's tabindex attribute value. This assumes that the media object itself has tab indices, such as embedded HTML with tabindex attributes. This enables all link starting points in a SMIL presentation to have a place on the ordered list to be tab-keyed through, including those in embedded presentations.

For SMIL 1.0 backward compatibility, the anchor element is available but deprecated in favor of area. The anchor element supports the same attributes as area, both the new SMIL 3.0 attributes and the SMIL 1.0 attributes as defined in [SMIL10].

SMIL 1.0 backward compatibility: The show attribute value pause is deprecated in favor of setting the show attribute to new and the sourcePlaystate attribute to pause.

17.4.8 Media Object Modules

The Media Object Modules provide a framework for declaring media. The Media Object Modules define semantics for the ref, animation, audio, img, video, text, textstream and brush elements. The SMIL 3.0 Language profile includes the Media functionality of the BasicMedia, BrushMedia, MediaAccessibility, MediaClipping, MediaClipMarkers, MediaDescription, MediaOpacity, MediaPanZoom, MediaParam, and MediaRenderAttributes modules.

In the SMIL 3.0 Language profile, media elements can have the following attributes and content model:

Media Object Module
Elements Attributes Content model
ref, animation, audio, img, text, textstream, video Core, I18n, Timing, Test, SubregionAttributes, abstract, author, chromaKey, chromaKeyOpacity, chromaKeyTolerance, clipBegin (clip-begin), clipEnd (clip-end), copyright, customTest, endsync, erase, expr, fill (freeze | remove | hold | transition | auto | default), mediaBackgroundOpacity, mediaOpacity, mediaRepeat (strip | preserve), paramGroup, region, sensitivity, src, tabindex, transIn, transOut, type, panZoom (param | area (anchor) | switch | Animation | )*
brush Core, I18n, Timing, Test, SubregionAttributes, abstract, author, color, copyright, customTest, endsync, erase, expr, fill (freeze | remove | hold | transition | auto | default), paramGroup, region, sensitivity, tabindex, skip-content, transIn, transOut (param | area (anchor) | switch | Animation | )*
param Core, I18n, Test, name, value, valuetype (data | ref | object), type, skip-content EMPTY
paramGroup Core, I18n, skip-content param*

This profile adds the ref, animation, audio, img, video, text, textstream and brush elements to the content model of the par, seq, excl, and priorityClass elements of the Timing and Synchronization Modules. It also adds these elements to the content model of the body element of the Structure Module. It also adds these elements to the content model of the a element of the Linking Modules.

SMIL 1.0 only allowed anchor as a child element of a media element. In addition to anchor, the following elements are allowed in SMIL 3.0 as children of a SMIL media object: area, param, animate, set, animateColor, animateMotion (note that the a element is not included). The switch element is allowed, with the restriction that in this case the content of the switch may only be from the same set of elements.

Media Object Integration Requirements

The MediaRenderAttributes Module defines the erase attribute, and defers definition of the "display area" to the language profile. "Display area" for the purposes of the SMIL 3.0 Language corresponds to a SMIL BasicLayout region. The effects of erase="never" apply after the active duration of the media object and any fill period (defined by SMIL Timing and Synchronization), and only until other media plays to the region targeted by the media object, or until the same media object restarts.

17.4.9 Metainformation Module

The Metainformation Module provides a framework for describing a document, either to inform the human user or to assist in automation. The Metainformation Module defines semantics for the meta and elements. The SMIL 3.0 Language profile includes the Metainformation functionality of the Metainformation module.

In the SMIL 3.0 Language profile, Metainformation elements can have the following attributes and content model :

Metainformation Module
Elements Attributes Content model
meta Core, I18n, skip-content, content (CDATA), name (CDATA) EMPTY
Core, I18n, skip-content EMPTY

This profile adds the meta element to the content model of the head element of the Structure Module and the element to the content model of the head element and most elements within the body element.

The content model of metadata is empty. Profiles that extend the SMIL 3.0 Language profile can define the RDF (Resource Description Framework) schema to be used in extending the content model of the metadata element. The Resource Description Framework is defined in the W3C RDF Recommendation [RDFsyntax]. Other XML-based metadata formats may also be included in a smiliar manner.

17.4.10 smilText Modules

The smilText Modules provide a light-weight method of adding in-line text to a SMIL presentation. The smilText Modules define semantics for the smilText, tev, clear, br, span, p, div, textStyle, textStyling elements and their attributes. The SMIL 3.0 Language profile includes the smilText functionality of the BasicText, TextStyling and TextMotion modules.

In the SMIL 3.0 Language profile, SMILtext elements can have the following attributes and content model:

Text Module
Elements Attributes Content model
smilText Core, I18n, Timing, Test, TextAttributes, SubregionAttributes, abstract, region, fill (freeze | remove | hold | transition | auto | default), author, copyright, skip-content, erase, sensitivity, tabindex, customTest, expr, textMode (append | replace | inherit | crawl | scroll | jump) 'append', textPlace (fromTop | fromBottom | inherit ) 'fromTop', textStyle, textRate, textWrapOption (wrap | noWrap | inherit) 'wrap', transIn, transOut, endsync, paramGroup (#PCDATA | tev | clear | br | span | p | div)*
tev Core, I18n, skip-content, begin, next EMPTY
clear Core, I18n, skip-content, begin, next EMPTY
br Core, I18n, skip-content EMPTY
div Core, I18n, skip-content, TextAttributes, textAlign, textStyle, textWrapOption (wrap | noWrap | inherit) 'wrap',. (#PCDATA | tev | clear | br | span | p | div)*
p Core, I18n, skip-content, TextAttributes, textAlign, textStyle, (#PCDATA | tev | clear | br | span)*
span Core, I18n, skip-content, TextAttributes, textStyle, (#PCDATA | span)*
textStyle Core, I18n, skip-content, TextStyle EMPTY
textStyling Core, I18n textStyle+

This profile adds the smilText element to the content models of the par, seq, and excl elements of the Timing and Synchronization Modules, the body element of the Structure Module, and the a element of the Linking Modules. This profile adds the textStyling element to content model of the head element of the Structure Module.

The SMILtext functionality is used to define the Attribute set "TextAttributes":

Collection Name Attributes in Collection
TextAttributes textAlign (start | end | left | right | center | inherit) 'start', textBackgroundColor, textColor, textWritingMode (inherit | ltr | rtl) 'inherit', textFontFamily (monospace | sansSerif | serif | inherit) 'monospace', textFontSize, textFontStyle (normal | italic | oblique | reverseOblique | inherit) 'normal', textFontWeight (normal | bold | inherit) 'normal', textStyle, xml:space (default | preserve)

17.4.11 State Modules

The State Modules provide a framework for declaratively manipulating various bits of state in a SMIL presentation. The State Modules define semantics for the delvalue, newvalue, send, setvalue, state, and submission elements and the action, expr, language, method, name, ref, replace, submission, and value attributes. The SMIL 3.0 Language profile includes the State functionality of the StateTest, UserState, StateSubmission, StateInterpolation modules.

In the SMIL 3.0 Language profile, the State elements can have the following attributes and content model:

State Module
Elements Attributes Content model
delvalue Core, I18n, basicTiming, Test, ref, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
newvalue Core, I18n, basicTiming, Test, ref, name, value, skip-content, customTest, expr, where (before | after | child ), fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
send Core, I18n, basicTiming, Test, submission, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
setvalue Core, I18n, basicTiming, Test, ref, value, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), fillDefault (remove | freeze | hold | transition | auto | inherit) EMPTY
state Core, I18n, Test, skip-content, customTest, expr, language, src EMPTY
submission Core, I18n, Test, skip-content, customTest, expr, ref, action, method, replace (all | instance | none), target EMPTY

This profile adds the state and submission elements to the content model of the head element of the Structure Module, and the setvalue, newvalue, delvalue, and send elements to the content model of the body, switch, a, par, seq, excl, priorityClass elements. It also adds the expr attribute to all elements within the content model of the body element.

The content model of the state element is declared as empty. The state element defines the data model of the SMIL State engine using the language defined by the language attribute. If that language is XPath 1.0 the contents of the state element is an XML document that is not imported into SMIL 3.0 but needs to be declared using a namespace prefix. For other languages the contents of the state element are probably CDATA.

The submission attribute value is an IDREF that refers to a submission element.

Interpolation of values using the mechanism from the StateInterpolation module is supported on the attributes for which animation is supported. Interpolation is also supported on the src, href, clipBegin, and clipEnd attributes. Interpolation is disallowed on the Timing and Synchronization attributes. Use of interpolation on other attributes is implementation-dependent.

Expression Language and Data Model

Support for using XPath 1.0 as the expression language is required. Support for other languages is implementation-defined. The default value for the language attribute is http://www.w3.org/TR/1999/REC-xpath-19991116, which denotes the use of XPath 1.0 as the expression language.

When using XPath as the expression language, the content of the state element must be a single XML document.

When using XPath as the expression language the following constraints are in force:

Interpretation of XPath expressions depends on an expression context. That context is defined thus:

17.4.12 Structure Modules

The Structure Module provides a framework for structuring a SMIL document. The Structure Module defines semantics for the smil, head, and body elements. The SMIL 3.0 Language profile includes the Structure functionality of the Structure module.

The Identity Module provides attributes to identify the SMIL version and profile used in a SMIL document. The Identity Module defines semantics for the version and baseProfile attributes. The SMIL 3.0 Language profile includes the functionality of the Identity Module.

In the SMIL 3.0 Language profile, the Structure elements can have the following attributes and content model :

Structure Module
Elements Attributes Content model
smil Core, I18n, Test, xmlns (http://www.w3.org/ns/SMIL), version (3.0), baseProfile (Language) (head?,body?)
head Core, I18n (meta*, (customAttributes,meta*)?,(state,meta*)?,(submission,meta*)?,(,meta*)?,((layout|switch),meta*)?, (transition+,meta*)?, (textStyling+,meta*)?, (paramGroup+,meta*)?)
body Core, I18n, Timing, fill, abstract, author, copyright (Schedule | MediaContent | ContentControl | a | Animation | State | )*

The body element acts as the root element to span the timing tree. The body element has the behavior of a seq element. Timing on the body element is supported. The syncbase of the body element is the application begin time, which is implementation dependent, as is the application end time. Note that the effect of fill on the body element is between the end of the presentation and the application end time, and therefore the effect of fill is implementation dependent.

17.4.13 Timing and Synchronization Modules

The Timing and Synchronization Modules provide a framework for describing timing structure, timing control properties and temporal relationships between elements. The Timing and Synchronization Modules define semantics for par, seq, excl and priorityClass elements. In addition, these modules define semantics for attributes including begin, dur, end, repeat (deprecated), repeatCount, repeatDur, syncBehavior, syncTolerance, syncBehaviorDefault, syncToleranceDefault, restartDefault, fillDefault, restart, min, max. The SMIL 3.0 Language profile includes the Timing functionality of the AccessKeyTiming Module, BasicInlineTiming Module, BasicTimeContainers Module, BasicExclTimeContaine Module, BasicPriorityClassContainers Module, EventTiming Module, FillDefault Module, MediaMarkerTiming Module, MinMaxTiming Module, MultiArcTiming Module, RepeatTiming Module, RepeatValueTiming Module, RestartDefault Module, RestartTiming Module, SyncbaseTiming Module, SyncBehavior Module, SyncBehaviorDefault Module, WallclockTiming Module modules.

In the SMIL 3.0 Language profile, Timing and Synchronization elements can have the following attributes and content model :

Timing and Synchronization Module
Elements Attributes Content model
par Core, I18n, Timing, Test, endsync, customTest, expr, fill (freeze | remove | hold | auto | default), abstract, author, copyright, region (Schedule | MediaContent | ContentControl | a | Animation | State | )*
seq Core, I18n, Timing, Test, customTest, expr, fill (freeze | remove | hold | auto | default), abstract, author, copyright, region (Schedule | MediaContent | ContentControl | a | Animation | State | ) *
excl Core, I18n, Timing, Test, endsync, skip-content, customTest, expr, fill (freeze | remove | hold | auto | default), abstract, author, copyright, region ((Schedule | MediaContent | ContentControl | a | Animation | State | )* | priorityClass+)
priorityClass Core, I18n, Test, peers (stop | pause| defer | never) 'stop', higher (stop | pause) 'pause', lower (defer | never) 'defer', skip-content, pauseDisplay, customTest, expr, abstract, author, copyright ((Schedule | MediaContent | ContentControl | a | Animation | State | )*)

The Attribute collections Timing and basicTiming are defined as follows:

Collection Name Attributes in Collection
Timing begin, dur, end, repeat (deprecated), repeatCount, repeatDur, syncBehavior (canSlip | locked | independent | default), syncTolerance, syncBehaviorDefault (canSlip | locked | independent | inherit) 'inherit', syncToleranceDefault, restartDefault (always | whenNotActive | never), fillDefault (remove | freeze | hold | transition | auto | inherit), restart (always | whenNotActive | never | default), min, max
basicTiming begin, dur, end, repeat (deprecated), repeatCount, repeatDur, min, max

This profile adds the par, seq, and excl elements to the content model of the body element of the Structure Module and adds these elements to the content model of the a element of the Linking Modules.

Elements of the Media Object Modules have the attributes describing timing and properties of contents.

Supported Event Symbols

The SMIL 3.0 Language profile specifies which types of events can be used as part of the begin and end attribute values. The supported events are described as Event-symbols according to the syntax introduced in the SMIL Timing and Synchronization module.

The supported event symbols in the SMIL 3.0 Language profile are:

Event example
focusInEvent (In DOM Level 2: "DOMFocusIn") end="foo.focusInEvent + 3s"
focusOutEvent (In DOM Level 2: "DOMFocusOut") begin="foo.focusOutEvent"
activateEvent (In DOM Level 2: "DOMActivate") begin="foo.activateEvent"
beginEvent begin="foo.beginEvent + 2s"
endEvent end="foo.endEvent + 2s"
repeatEvent end="foo.repeatEvent"
inBoundsEvent end="foo.inBoundsEvent"
outOfBoundsEvent begin="foo.outOfBoundsEvent + 5s"
topLayoutCloseEvent end="toplayout1.topLayoutCloseEvent"
topLayoutOpenEvent end="toplayout2.topLayoutOpenEvent+5s"
stateChange(ref) end="foo.stateChange(/)"
contentControlChange(attrname) end="root.contentControlChange(systemBitrate)"
contentControlChange end="root.contentControlChange"

Event semantics

focusInEvent:
Raised when a media element gets the keyboard focus in its rendering space, i.e., when it becomes the media element to which all subsequent keystroke-event information is passed. Once an element has the keyboard focus, it continues to have it until a user action or DOM method call either removes the focus from it or gives the focus to another media element, or until its rendering space is removed. Only one media element can have the focus at any particular time. The focusInEvent is delivered to media elements only, and does not bubble.
focusOutEvent:
Raised when a media element loses the keyboard focus from its rendering space, i.e., when it stops being the media element to which all subsequent keystroke-event information is passed. The focusOutEvent is delivered to media elements only, and does not bubble.
activateEvent:
Raised when a media element is activated by user input such as by a mouse click within its visible rendering space or by specific keystrokes when the element has the keyboard focus. The activateEvent is delivered to media elements only, and does not bubble.
beginEvent:
Raised when the element actually begins playback of its active duration. If an element does not ever begin playing, this event is never raised. If an element has a repeat count, beginEvent only is raised at the beginning of the first iteration. The beginEvent is delivered to elements which support timing, such as media elements and time containers, and does not bubble.
endEvent:
Raised when an element actually ends playback; this is when its active duration is reached or whenever a playing element is stopped.

This example is informative.

In the following example,

<ref xml:id="x" end="30s" src="15s.mpg" />
<ref xml:id="y" end="10s" src="20s.mpg" />
<ref xml:id="z" repeatCount="4" src="5s.mpg" />

x.endEvent occurs at roughly 30s when the active duration is reached, y.endEvent occurs at roughly 10s when the playback of the continuous media is ended early by the active duration being reached, and z.endEvent occurs at roughly 20s when the fourth and final repeat has completed, thus reaching the end of its active duration.

The endEvent is delivered to elements which support timing, such as media elements and time containers, and does not bubble.

repeatEvent:
Raised when the second and subsequent iterations of a repeated element begin playback. An element that has no repeatDur, repeatCount, or repeat attribute but that plays two or more times due to multiple begin times will not raise a repeatEvent when it restarts. Also, children of a time container that repeats will not raise their own repeatEvents when their parent repeats and they begin playing again. The repeatEvent is delivered to elements which support timing, such as media elements and time containers, and does not bubble.
inBoundsEvent:
Raised when one of the following happens:
  • by any input from the mouse or other input device that brings the mouse cursor from outside to within the bounds of a media element's rendering space, regardless of what part, if any, of that rendering space is visible at the time, i.e., z-order is not a factor.
  • by any other action that moves the "cursor" or "pointer", as defined by the implementation, from outside to within the bounds of a media element's rendering space, regardless of what part, if any, of that rendering space is visible at the time, i.e., z-order is not a factor. An implementation may decide, for instance, to raise an inBoundsEvent on an element whenever it gets the focus, including when keystrokes give it the focus.

A media element's bounds are restrained by the bounds of the region in which it is contained., i.e., a media element's bounds do not extend beyond its region's bounds. The inBoundsEvent is delivered to media elements only, and does not bubble.

Note that, unlike with keyboard focus which can only be active on one object at a time, the state of being within an object's bounds can be true for multiple objects simultaneously. For instance, if one object is on top of another and the cursor is placed on top of both objects, both would have raised an inBoundsEvent more recently than the raising of any respective outOfBoundsEvent.

outOfBoundsEvent:
Raised when one of the following happens:
  • by any input from the mouse or other input device that brings the mouse cursor from within to outside the bounds of a media element's rendering space, regardless of what part, if any, of that rendering space is visible at the time,
  • by any other action that moves the "cursor" or "pointer", as defined by the implementation, from within to outside the bounds of a media element's rendering space, regardless of what part, if any, of that rendering space is visible at the time.

A media element's bounds are restrained by its region's bounds, i.e., a media element's bounds do not extend beyond its region's bounds. The outOfBoundsEvent is delivered to media elements only, and does not bubble.

topLayoutCloseEvent:
Raised when a topLayout closes for any reason. This event is delivered to that topLayout. If a topLayout reopens when additional media becomes active in its region(s), this event will be raised again if and when the topLayout closes again, and will be raised every subsequent time it closes. This event is delivered to topLayout elements only and does not bubble.
topLayoutOpenEvent:
Raised when a topLayout window opens. This event is delivered to that topLayout. If a topLayout closes and then reopens when additional media becomes active in its region(s), this event will be raised again, and will be raised every subsequent time it reopens. This event is delivered to topLayout elements only and does not bubble.
stateChange(ref):
Raised by the state element. The parameter is a reference to an item in the data model. Whenever the referenced data model item or any of its descendants is changed, this event is raised.
contentControlChange(attrname):
Raised by the root of the SMIL document when the named Content Control test values has changed. It does not bubble. The list of allowed values for attrname is taken from the Content Control Module attribute names. The parameterless contentControlChange event is raised as well.
contentControlChange:
Raised by the root of the SMIL document when any Content Control test value has changed. It does not bubble.

Order of raising of simultaneous events:

There will be cases where events occur simultaneously. To ensure that each SMIL 3.0 Language implementation handles them in the same order, the following order must be used to resolve ties:

  1. InBoundsEvent
  2. focusInEvent (should follow 1)
  3. OutOfBoundsEvent
  4. activateEvent (should follow 2)
  5. focusOutEvent (should follow 3)
  6. endEvent
  7. beginEvent (must follow 6)
  8. repeatEvent
  9. topLayoutCloseEvent
  10. topLayoutOpenEvent (must follow 9)
  11. stateChange
  12. contentControlChange(param)
  13. contentControlChange

Events are listed in order of precedence, e.g., if event #6 in this list occurs at the same time as event #7, then #6 must be raised prior to #7.

The InBoundsEvent, focusInEvent, OutOfBoundsEvent, activateEvent, and focusOutEvent events do not bubble and are delivered to the target media element.

The beginEvent, endEvent and repeatEvent events do not bubble and are delivered to the timed element on which the event occurs.

The topLayoutOpenEvent and topLayoutCloseEvent events do not bubble and are delivered to the topLayout element on which the event occurs.

Extending the set of supported events

The SMIL 3.0 Language profile supports an extensible set of events. In order to resolve possible name conflicts with the events that are supported in this profile qualified event names are supported. Namespace prefixes are used to qualify the event names. As a result, the colon is reserved in begin and end attributes for qualifying event names.

This example is informative.

For example:

<smil ... xmlns:example="http://www.example.com">
   <img xml:id="foo" .../> 
   <audio begin="foo.example:focusInEvent".../>
    ... 
</smil>

Integration definitions

A SMIL document's begin time is defined as the moment a user agent begins the timeline for the overall document. A SMIL document's end time is defined as equal to the end time of the body element.

17.4.14 Transition Effects Modules

The Transition Modules provide a framework for describing transitions such as fades and wipes. The Transition Modules define semantics for the transition element. The SMIL 3.0 Language profile includes the functionality of the BasicTransitions, TransitionModifiers and the FullScreenTransitions Module modules.

In the SMIL 3.0 Language profile, Transition Effects elements have the following attributes and content model :

Transition Effects Module
Elements Attributes Content model
transition Core, I18n, Test, dur, type, subtype, startProgress, endProgress, direction, fadeColor, scope, horzRepeat, vertRepeat, borderWidth, borderColor, skip-content, customTest, expr EMPTY

This profile adds the transition element to the content model of the head element of the Structure Module.

The Transition Effects Modules add transIn and transOut attributes to ref, animation, audio, img, video, text, textstream and brush elements of the Media Object Modules.

The Transition Effects Modules add the transition value to the fill attribute for all elements on which this value of the fill attribute is supported.

17.5 Appendix A: SMIL 3.0 Document Type Definition

This section is normative.

The SMIL 3.0 Language profile Document Type Definition is defined as a set of SMIL 3.0 modules. All SMIL 3.0 modules are integrated according to the guidelines in the W3C Note "Synchronized Multimedia Modules based upon SMIL 1.0" [SMIL-MOD], and defined within their respective module sections.

17.6 Appendix B: Recommended MIME Types

This section is normative.

The following royalty-free media formats should be supported:

While many SMIL user agents support speciality media types for streaming audio and video content, SMIL user agent developers are also encouraged to support the following non-royalty-free media formats to further interoperability of SMIL content:

Since both of these technologies are not freely available to user agent developers, the actual availability will remain player dependent.

This section is informative.

Authors are encouraged to encode media objects using one of the recommended MIME types whenever possible. This will ensure that their SMIL documents can be played back by a wide range of SMIL user agents.

Note that the MIME type for Ogg Vorbis audio and Ogg Theora video are listed as application/ogg. The Xiph.org Foundation has decided that it wants to change the MIME types of the various formats it defines, so this MIME type may change in the future.

If authors use a MIME type that is not in the list of recommended types, they should provide an alternative version encoded using a baseline format. This can be achieved by using a switch element as shown in the following example:

<switch>
  <audio src="non-baseline-format-object" ... />
  <audio src="baseline-format-object" ... />
</switch>

In this example, a user agent that supports the non-baseline format will play the first audio media object, and a user agent that does not support the non-baseline format will play the second media object.

Implementers are encouraged to implement support for other license-free codecs as this will probably lead to enhanced interoperability.

17.6.1 JPEG Support

This section is informative.

SMIL 3.0 follows the lead of SVG Tiny in the way JPEG is required. The normative text is adapted from [SVGMobile12-JPEG].

This section specifies the JPEG support recommended by a SMIL 3.0 implementations. The recommended support is targeted at specifying a level of functionality known to be compatibly supported within the industry and without licensing issues.

In general when people refer to JPEG [JPEG], they actually mean JPEG compressed images within the JFIF [JFIF] file format. JFIF was created by the Independent JPEG Group (IJG) for storing a single JPEG-compressed image in a file.

SMIL 3.0 User Agents should support JPEG images stored in a JFIF file [JFIF]. Other transport or storage mechanisms may be supported.

The following coding processes defined by the JPEG specification [JPEG], in Table 1, section 4.11, should be supported:

The following statements also apply:

The following encoding processes may be supported

SMIL 3.0 UA's should convert Y,Cb,Cr values compressed in the JPEG image to RGB as defined in the JFIF specification [JFIF] and may assume that the RGB values are sRGB.


previous   next   contents