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:

The MinMaxTiming Module was removed from the Language profile for SMIL 3.0. The MinMaxTiming Module functionality may be used using the SMIL 3.0 Scalability Framework.

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 may 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 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.

17.4 Normative Definition of the SMIL 3.0 Language Profile

This section is normative.

In the text in this profile specification, the term Language Profile will be considered to refer exclusively to the SMIL 3.0 Language profile as defined in this document.

17.4.1 SMIL 3.0 Language Profile Conformance

The definition of conformance for a SMIL 3.0 profile is given in the Definitions section of the SMIL 3.0 Scalability Framework. Based on these definitions, the Language profile is a Strict Host-Language Conformant SMIL 3.0 Profile.

Within the referenced sections of the Scalability Framework, the following definitions should be used:

  1. The profile identification string for the Language profile is: http://www.w3.org/2008/SMIL30/Language.
  2. Documents written for the Language profile must declare the default SMIL namespace with the xmlns attribute on the smil root element. For SMIL 3.0, this is:
    xmlns="http://www.w3.org/ns/SMIL"
  3. The SMIL 3.0 Language profile DOCTYPE is:
    <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0 Language//EN"
    "http://www.w3.org/2008/SMIL30/SMIL30Language.dtd">
    If a document contains this declaration, it must be a valid XML document. Note that this implies that extensions to the syntax defined in the DTD (or in the corresponding XML or RelaxNG schemas) are not allowed. If the document is invalid, the user agent should issue an error.
  4. The identification string for the non-normative DTD used for integration of errata is:
    http://www.w3.org/2008/SMIL30/informative-DTD/SMIL30Language.dtd
  5. Documents written for the Language Profile must declare (explicitly or implicitly via the DTD) the following values for the version and baseProfile attributes:
    version="3.0" baseProfile="Language"
    As a consequence of the two requirements above, the effective root element declaration for a Language profile document must be:
    <smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
         ...
    </smil> 
    The root element may be extended as required with additional atttributes.

This version of SMIL provides a definition of strict host-language conformant SMIL 3.0 documents, which are restricted to tags and attributes from the SMIL 3.0 namespace. The Section "Extending/Restricting 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.

Language designers and implementors wishing to extend the Language profile must consider the implications of the use of namespace extension syntax. Please consult the section on Scalable Profiles for restrictions and recommendations for best practice when extending SMIL.

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 Conforming SMIL 3.0 User Agents section of the SMIL 3.0 Scalability Framework. Conforming Language profile user agents must adhere completely to this section.

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. This Language profile includes the following SMIL 3.0 modules:

  1. Structure functionality
    1. Structure Module
    2. Identity Module
  2. Media functionality
    1. BasicMedia Module
    2. BrushMedia Module
    3. MediaAccessibility Module
    4. MediaClipMarkers Module
    5. MediaClipping Module
    6. MediaDescription Module
    7. MediaOpacity Module
    8. MediaPanZoom Module
    9. MediaParam Module
    10. MediaRenderAttributes Module
  3. Timing functionality
    1. AccessKeyTiming Module
    2. BasicExclTimeContainers Module
    3. BasicInlineTiming Module
    4. BasicPriorityClassContainers Module
    5. BasicTimeContainers Module
    6. EventTiming Module
    7. FillDefault Module
    8. MediaMarkerTiming Module
    9. MultiArcTiming Module
    10. RepeatTiming Module
    11. RepeatValueTiming Module
    12. RestartDefault Module
    13. RestartTiming Module
    14. SyncbaseTiming Module
    15. SyncBehaviorDefault Module
    16. SyncBehavior Module
    17. WallclockTiming Module
  4. Content Control functionality
    1. BasicContentControl Module
    2. CustomTestAttributes Module
    3. PrefetchControl Module
    4. RequiredContentControl Module
    5. SkipContentControl Module
  5. 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
  6. smilText functionality
    1. BasicText Module
    2. TextMotion Module
    3. TextStyling Module
  7. Linking functionality
    1. BasicLinking Module
    2. LinkingAttributes Module
    3. ObjectLinking Module
  8. Metainformation functionality
    1. Metainformation Module
  9. Transition Effects functionality
    1. BasicTransitions Module
    2. FullScreenTransitions Module
    3. TransitionModifiers Module
  10. Animation functionality
    1. BasicAnimation Module
  11. State functionality
    1. StateInterpolation Module
    2. StateSubmission Module
    3. StateTest Module
    4. UserState 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, animateColor, animateMotion, set
ContentControl prefetch, switch
Layout layout, region, regPoint, root-layout, topLayout
LinkAnchor a, area (anchor)
MediaContent animation, audio, brush, img, ref, smilText, text, textstream, video
Metainformation meta,
Schedule excl, par, seq
State delvalue, newvalue, send, setvalue
Structure smil, head, body
TextContent tev, clear, br, span, p, div, textStyle, textStyling
Transition transition
Other customAttributes, customTest, param, paramGroup, priorityClass, state, submission

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 may 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), baseProfile 'Language', class (CDATA), label (CDATA), longdesc (CDATA), readIndex '0', title (CDATA), version (3.0) '3.0', xml:base (CDATA) [XMLBase], xml:id (id) (ID)
I18n its:dir (lro | ltr | rlo | rtl), its:locNote (CDATA), its:locNoteRef (CDATA), its:locNoteType (alert | description), its:term (no | yes), its:termInfoRef (CDATA), its:translate (no | yes), xml:lang (CDATA)

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 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 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. The SMIL 3.0 Language Profile DTD provides default values for version and baseProfile.

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

Structure Module
Elements Attributes Content model
smil Core, I18n, Test, xmlns, xmlns:its 'http://www.w3.org/2005/11/its' (()*, (head, ()*)?, (body, ()*)?)
head Core, I18n ((meta)*, ((customAttributes), (meta)*)?, ((), (meta)*)?, ((textStyling), (meta)*)?, ((layout | switch), (meta)*)?, ((state), (meta)*)?, ((submission), (meta)*)*, (((transition)+), (meta)*)?, (((paramGroup)+), (meta)*)?)
body Core, I18n, MediaDescriptionAttributes, Timing, fill (auto | default | freeze | hold | remove | transition) 'default' (Animation | ContentControl | MediaContent | Schedule | State | a | )*

The attribute xmlns must be present on the element smil and it must have the value 'http://www.w3.org/ns/SMIL'.

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.5 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, text, textstream, video 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 may have the following attributes and content model:

Media Object Module
Elements Attributes Content model
ref, animation, audio, img, text, textstream, video Core, I18n, MediaDescriptionAttributes, MediaOpacityAttributes, SubregionAttributes, Test, Timing, clip-begin, clip-end, clipBegin, clipEnd, customTest, endsync 'media', erase (never | whenDone) 'whenDone', expr, fill (auto | default | freeze | hold | remove | transition) 'default', mediaRepeat (preserve | strip) 'preserve', panZoom, paramGroup, region, sensitivity 'opaque', soundLevel '+0.0dB', src, tabindex, transIn, transOut, type (Animation | area (anchor) | | param | switch)*
brush Core, I18n, MediaDescriptionAttributes, Test, Timing, backgroundColor, backgroundOpacity '100%', bottom 'auto', color, customTest, endsync 'media', erase (never | whenDone) 'whenDone', expr, fill (auto | default | freeze | hold | remove | transition) 'default', fit (fill | hidden | meet | meetBest | scroll | slice), height 'auto', left 'auto', mediaAlign (bottomLeft | bottomMid | bottomRight | center | midLeft | midRight | topLeft | topMid | topRight), paramGroup, regAlign (bottomLeft | bottomMid | bottomRight | center | midLeft | midRight | topLeft | topMid | topRight), regPoint, region, right 'auto', sensitivity 'opaque', skip-content (false | true) 'true', tabindex, top 'auto', transIn, transOut, width 'auto', z-index (Animation | area (anchor) | | param | switch)*
param Core, I18n, Test, customTest, name, skip-content (false | true) 'true', type, value, valuetype (data | object | ref) 'data' ()*
paramGroup Core, I18n, skip-content (false | true) 'true' ( | param)*

The attribute collections MediaDescriptionAttributes and MediaOpacityAttributes are defined as follows:

Collection Name Attributes in Collection
MediaDescriptionAttributes abstract (CDATA), author (CDATA), copyright (CDATA)
MediaOpacityAttributes chromaKey, chromaKeyOpacity, chromaKeyTolerance, mediaBackgroundOpacity, mediaOpacity

This profile adds the ref, animation, audio, img, text, textstream, video 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, to the content model of the a element of the Linking Modules and to the content model of the switch element of the Content Control 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, meta, (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.6 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, fill, fillDefault, repeat (deprecated), repeatCount, repeatDur, restart, restartDefault, syncBehavior, syncBehaviorDefault, syncTolerance, syncToleranceDefault. 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, 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 may have the following attributes and content model :

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

The Attribute collections Timing and BasicTiming are defined as follows:

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

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

Elements of the Media Object Modules, elements of the Animation Module, elements of the State Modules and the smilText element of the smilText Modules have the attributes describing timing and properties of contents.

Supported Event Symbols

The SMIL 3.0 Language profile specifies which types of events may 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 end="foo.focusInEvent + 3s"
focusOutEvent begin="foo.focusOutEvent"
activateEvent 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 may 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 may only be active on one object at a time, the state of being within an object's bounds may 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 any of the referenced data model item 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.7 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 may have the following attributes and content model :

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

This profile adds the switch element to the content model of the par, seq and excl elements of the Timing and Synchronization Modules, the content model of the body and the head elements of the Structure Module, the content model of the a element of the Linking Modules, and the content model of the ref, animation, audio, img, text, textstream, video and brush elements of the Media Object Modules. The profile adds the customAttributes element to the content model of the head element 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 system-bitrate, system-captions (off | on), system-language, system-overdub-or-caption (caption | overdub), system-required, system-screen-depth, system-screen-size, systemAudioDesc (off | on), systemBaseProfile, systemBitrate, systemCPU, systemCaptions (off | on), systemComponent, systemLanguage, systemOperatingSystem, systemOverdubOrSubtitle (overdub | subtitle), systemRequired, systemScreenDepth, systemScreenSize, systemVersion (3.0)

The collection of Attributes Test is added to all the elements defined in the SMIL 3.0 Language profile, except body, br, clear, customAttributes, customTest, div, head, meta, , p, span, state, submission, tev and textStyling. 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.8 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 may have the following attributes and content model :

Layout Module
Elements Attributes Content model
region Core, I18n, MediaOpacityAttributes, SubregionAttributes, Test, TextAttributes, background-color, backgroundImage 'none', backgroundRepeat (inherit | noRepeat | repeat | repeatX | repeatY) 'repeat', customTest, erase (never | whenDone) 'whenDone', panZoom, regionName, sensitivity 'opaque', showBackground (always | whenActive) 'always', skip-content (false | true) 'true', soundLevel '+0.0dB', textAlign (center | end | inherit | left | right | start) 'inherit', textDirection (inherit | ltr | ltro | rtl | rtlo) 'inherit', textMode (append | crawl | inherit | jump | replace | scroll) 'inherit', textPlace (center | end | inherit | start) 'inherit', textWrapOption (inherit | noWrap | wrap) 'wrap', textWritingMode (inherit | lr | lr-tb | rl | rl-tb | tb-lr | tb-rl) 'inherit' ( | region)*
root-layout Core, I18n, Test, background-color, backgroundColor, backgroundImage 'none', backgroundOpacity '100%', backgroundRepeat (inherit | noRepeat | repeat | repeatX | repeatY) 'repeat', customTest, height 'auto', skip-content (false | true) 'true', width 'auto' ()*
topLayout Core, I18n, Test, backgroundColor, backgroundImage 'none', backgroundOpacity '100%', backgroundRepeat (inherit | noRepeat | repeat | repeatX | repeatY) 'repeat', close (onRequest | whenNotActive) 'onRequest', customTest, height 'auto', open (onStart | whenActive) 'onStart', skip-content (false | true) 'true', width 'auto' ( | region)*
layout Core, I18n, Test, customTest, type 'text/smil-basic-layout' ( | region | root-layout | topLayout | regPoint)*
regPoint Core, I18n, Test, bottom 'auto', customTest, left 'auto', regAlign (bottomLeft | bottomMid | bottomRight | center | midLeft | midRight | topLeft | topMid | topRight), right 'auto', skip-content (false | true) 'true', top 'auto' ()*

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 '100%', bottom 'auto', fit (fill | hidden | meet | meetBest | scroll | slice), height 'auto', left 'auto', mediaAlign (bottomLeft | bottomMid | bottomRight | center | midLeft | midRight | topLeft | topMid | topRight), regAlign (bottomLeft | bottomMid | bottomRight | center | midLeft | midRight | topLeft | topMid | topRight), regPoint, right 'auto', soundAlign (