previous   next   contents  

20. SMIL 3.0 DAISY Profile

Editors
Marisa DeMeglio, DAISY
Hiroshi Kawamura, NRCD
Julien Quint, DAISY
Daniel Weck, NRCD

20.1 Changes for SMIL 3.0

This section is informative.

The DAISY profile is new for SMIL 3.0.

20.2 Abstract

This section is informative.

DAISY [DAISY] digital talking books are fully accessible for persons with print disabilities, including blindness, low vision, and dyslexia. DAISY is the recognized international standard for digital talking books and has been adopted worldwide by organizations serving these groups.

With the release of SMIL 3.0, the pre-existing DAISY standard has gotten the opportunity to move into the mainstream of multimedia development. Several accessibility features have been added to the SMIL language, and a fully-conforming language profile has been defined for DAISY books.

20.3 Introduction to the DAISY Profile

This section is informative.

Although SMIL has always been an integral part of the DAISY standard, none of the existing profiles fit the needs of DAISY. The full language profile is too large to be considered practical, while the Tiny profile lacks certain timing, state, and media object modules required by DAISY. The Mobile profile and the Extended Mobile profile also lack some of what is necessary for representing DAISY books in SMIL (e.g. the state modules), and include modules which are not required by DAISY (e.g. animation, tiling, and transitions modules).

20.4 Normative Definition of the DAISY Profile

This section is normative.

20.4.1 Document Conformance

This version of SMIL provides a definition of strictly conforming DAISY profile documents, which are restricted to tags and attributes from the SMIL 3.0 namespace. In the future, the language described in this profile may be extended by other W3C Recommendations, or by private extensions. For these extensions, the following rules must be obeyed:

Conformant DAISY profile user agents are expected to handle documents containing extensions that obey these two rules.

20.4.2 SMIL 3.0 DAISY profile Conformance

The definition of document conformance for SMIL 3.0 DAISY 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 DAISY profile documents is:
    <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0 Daisy//EN"
        "http://www.w3.org/2007/07/SMIL30/SMIL30Daisy.dtd">
  2. Default namespace: the default namespace for SMIL 3.0 DAISY profile documents is:
    xmlns="http://www.w3.org/ns/SMIL"

    Documents written for the DAISY profile must declare the default SMIL namespace with the xmlns attribute on the smil root element. Also, the version and baseProfile attributes need to be included as follows:
    <smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" >
    ...
    </smil>
  3. DTD: the normative DTD for SMIL 3.0 DAISY profile documents is:
    http://www.w3.org/TR/2007/WD-SMIL3-20070713/smil30DTD/SMIL30Daisy.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 DAISY profile with other namespaces, for instance, on including new tags within SMIL 3.0 documents.

SMIL 3.0 DAISY Profile User Agent Conformance

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

20.4.3 The DAISY Profile

The DAISY profile includes the following SMIL modules:

The collection names contained in the following table define the DAISY profile vocabulary.

DAISY Profile
Collection Name Elements in Collection
Layout region, root-layout, layout
LinkAnchor a, area (anchor)
MediaContent text, img, audio, video, ref, animation, textstream, param
Metainformation meta,
State delvalue, newvalue, send, setvalue, state, submission
Structure smil, head, body
Schedule par, seq, excl
Other paramGroup, switch

In the following sections, we define the set of elements and attributes used in each of the modules included in the DAISY 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), class (NMTOKEN), xml:id (ID), label (CDATA), longdesc (CDATA), readIndex (CDATA), title (CDATA), xml:base (CDATA)
I18n xml:lang (NMTOKEN)
Role xhtml:role (CDATA), with [xmlns:xhtml="http://www.w3.org/1999/xhtml"]

All attributes in the collection Core are defined for all the elements of the DAISY profile. The xml:id attribute is used in the DAISY profile to assign a unique XML identifier to every element in a SMIL document.

XHTML Role Attribute Module

The DAISY profile includes the separate XHTML Role Attribute Module [XHTMLrole]. This provides a mechanism for allowing a semantic classification of elements via the xhtml:role attribute. The DAISY profile adds the xhtml:role attribute to the switch, region, a, area, text, img, audio, video, ref, textstream, par, and seq elements.

This section is informative

The DAISY profile allows authors to use the xhtml:role attribute to provide semantic classification of elements, but does not impose any specific user-agent behavior for when these semantic values are encountered.

The DAISY profile does not explicitly extend the collection of roles defined by the XHTML Role Attribute Module, and does not impose restrictions on the number of actual semantic roles a single xhtml:role attribute value can provide. Instead, implementations that wish to formalize the possible values for the xhtml:role semantic annotation should follow the XHTML Role Attribute Module's extension guidelines [XHTMLrole-ExtensionGuidelines].

According to the XHTML Role Attribute Module's Host Language Conformance rules [XHTMLrole-HostLanguageConformance], it is a requirement to prefix the role attribute name with the imported namespace prefix for "http://www.w3.org/1999/xhtml". For example:

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" xmlns:xhtml="http://www.w3.org/1999/xhtml" >
    ...
    <par xhtml:role="...">
        ...
    </par>
    ...
</smil>

20.4.4 Content Control Modules

In the DAISY profile, Content Control elements may have the following attributes and content model :

Content Control Module
Elements Attributes Content model
switch Core, Role, I18n, Test, expr ((MediaContent | State | a | layout)*)

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 switch element has the restriction that the content of the switch may only be from the same set of elements.

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

Collection Name Attributes in Collection
Test systemBitrate, systemCaptions, systemLanguage, systemRequired, systemScreenSize, systemScreenDepth, systemOverdubOrSubtitle, systemAudioDesc, systemOperatingSystem, systemCPU, systemComponent

20.4.5 Layout Modules

In the DAISY profile, Layout elements may have the following attributes and content model :

Layout Module
Elements Attributes Content model
region Core, Role, I18n, paramGroup, backgroundColor, backgroundOpacity, bottom, fit (fill | hidden | meet | meetBest | scroll | slice), height, left, regionName, right, showBackground (always | whenActive), top, width, z-index region*
root-layout Core, I18n, backgroundColor, backgroundOpacity, width, height EMPTY
layout Core, I18n, type, systemRequired (root-layout | region )*

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.

20.4.6 Linking Modules

This profile includes both timing and linking modules; however, the profile authors have decided to explicitly exclude timing attributes on linking elements because it introduces too much complexity.

Both the a and area elements have an href attribute, whose value must be a valid URI or XPointer [[XPOINTER]] fragment identifier.

In the DAISY profile, linking elements may have the following attributes and content model :

Linking Module
Elements Attributes Content model
a Core, Role, I18n, href, Test, expr (Schedule | MediaContent )*
area Core, Role, I18n, shape, coords, href, nohref, Test, expr EMPTY

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.

20.4.7 Media Object Modules

In the DAISY profile, media elements may have the following attributes and content model:

Media Object Module
Elements Attributes Content model
text, img, audio, video, ref, textstream Core, Role, I18n, Timing, author, copyright, abstract, title, region, fill (freeze | remove | hold | transition | auto | default), src, type, paramGroup, clipBegin, clipEnd, Test, expr, systemRequired (param | area )*
param Core, I18n, name, value, valuetype (data | ref | object), type, Test EMPTY
paramGroup Core, I18n (param)*

This profile adds the ref, animation, audio, img, video, text, and textstream elements 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. It also adds these elements to the content model of the a element of the Linking Modules.

Examples

This section is informative.

Text media with an external source may put a URI in the src attribute. For instance:

An example of referring to a text fragment in an external file by specifying the fragment's xml:id value:

<par>
    <text src="text.xml#id"/>
    <audio src="audio.mp3"/>
</par>

An example of referring to a document fragment (for example, the second paragraph) by using XPointer:

<par>
    <text src="text.xml#xpointer(/body/p[2])"/>
    <audio src="audio.mp3"/>
</par>

Using param

The param element conveys rendering instructions about a media type.

The DAISY profile defines the following name values as rendering instructions for text media:

name attribute values on the param element
name value Description
daisy:use-renderer tts | braille | avatar | tactile Send the media data to a text-to-speech engine, a Braille display, a (sign language) avatar, or a tactile display.
daisy:display-in-context true | false If true, display the text document in the text region and focus on the specified fragment. If false, render only the text fragment by itself (not in its parent document) in the text region.
daisy:css-highlight-style A simple CSS style. To give the effect of a highlight on the text fragment, CSS style may be used.

It is expected that media objects using <param name="daisy:use-renderer" value="..." /> exist alongside a default rendering of the media.

In the case where the whole document is being shown at once (<param name="daisy:display-in-context" value="true"/>), an intelligent renderer will ensure that the portion of the parent document containing the specified fragment will be put in view so the fragment may be seen. It is left to the renderer to decide how much of the surrounding document context to include (lines above and below the target fragment).

Examples:

This section is informative.

The parameters below specify that this text element should be displayed in the context of its parent document, and that it should be highlighted with the given style attributes when it is active.

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" >
    ...
  <body>
      ...
      <par>
          <text src="example.html#p2" region="centerTextRegion" >
              <param name="daisy:display-in-context" value="true" />
              <param name="daisy:css-highlight-style" value="background-color: yellow; color: black; border: solid thin green"/>
          </text>
      </par>
      ...
  </body>
</smil>

To reduce verbosity, the param elements may be put in a paramGroup element, and this may be referenced from the region. For example:

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" >
    <head>
        <paramGroup xml:id="textParams">
              <param name="daisy:display-in-context" value="true" />
            <param name="daisy:css-highlight-style" value="background-color: yellow; color: black; border: solid thin green"/>
        </paramGroup>
        <region xml:id="textWindow" width="100%" height="100%" paramGroup="textParams"/>
        ...
    </head>
    <body>
        ...
        <par>
            <text src="my_text.txt" region="textWindow"/>
            <audio src="audio.mp3" clipBegin="0.00s" clipEnd="3.00s"/>
        </par>
        ...
    </body>
</smil>

MIME Types

This profile does not require support of any particular formats. However, it is strongly recommended to support the formats listed in the SMIL 3.0 Language profile's Required MIME Types section.

20.4.8 Metainformation Modules

In the DAISY profile, Metainformation elements may have the following attributes and content model :

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

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

The content model of is EMPTY. Profiles that extend the DAISY profile may define the RDF (Resource Description Framework) schema to be used in extending the content model of the element. The Resource Description Framework is defined in the W3C RDF Recommendation [RDFsyntax].

Note that because the element may appear on its own, it may be used to wrap a meta element and placed anywhere in the document.

The following name attribute values may be used to specify the relationship between documents:

name attribute values on the meta element
value Description
next Value of content gives the next SMIL document in the presentation
prev Value of content gives the previous SMIL document in the presentation

An example using this to define the static default playback order in a multi-document SMIL presentation:

<-- chapter2.smil -->
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" >
    <head>
        <meta name="next" content="chapter3.smil"/>
        <meta name="prev" content="chapter1.smil"/>
        ...
    </head>
    <body>
        ...
    </body>
</smil>

20.4.9 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 submission, send, state, setvalue, newvalue, and delvalue elements and the expr, submission, action, method, replace, target, language, ref, where, name, value attributes. The DAISY profile includes the State functionality of the StateTest, UserState, StateSubmission, and StateInterpolation modules.

In the DAISY profile, the State elements may have the following attributes and content model:

State Module
Elements Attributes Content model
delvalue Core, I18n, ref, expr EMPTY
newvalue Core, I18n, ref, name, value, expr, where (before | after | child ) EMPTY
send Core, I18n, submission, expr EMPTY
setvalue Core, I18n, ref, value, expr EMPTY
state Core, I18n, language, src EMPTY
submission Core, I18n, 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 elements. It also adds the expr attribute to all elements within the content model of the body element (i.e. excluding the body element itself).

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 XForms 1.0 syntax. The elements are not imported into SMIL 3.0 and must be fully qualified.

The submission attribute value is an IDREF that refers to an XForms submission element within the data model.

Interpolation of values using the mechanism from the StateInterpolation module is supported on the href, src, clipBegin, clipEnd and value attributes.

Expression Language and Data Model

Support for using XPath 1.0 [XPATH10] as the expression language is required. 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.

The content of the state element must be a single XML document.

The following constraints are in force:

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

Using state

This section is informative.

In DAISY books, publication components such as page number announcements and footnotes may be turned on or off. These playback options are implemented using state expressions.

The DAISY specification is extensible to be able to incorporate content written in other XML languages (such as MathML); however, not all user agents will support these extensions. In these cases, fallbacks specified using state expressions may give alternatives to user agents.

This example shows how to use state and param together to target specialized text renderers. A state expression controls whether the element will be rendered or not, and param provides additional information about the media. A presentation is being rendered on a user's computer, to which an electronic Braille display is attached . The SMIL player is aware that this display is enabled. The Braille display normally receives the same text output as is shown on-screen and renders it as Braille. When the SMIL player reaches a point where specialized text (such as a mathematical expression, which is represented differently in Braille markup) has to be substituted for the on-screen text, it notifies the Braille display. The part of the presentation in which this substitution takes place would be authored as follows:

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" >
  <head>
  <--This state data model could live in a separate file and be accessed by other user agent components -->
  <state xmlns:f="http://www.w3.org/2002/xforms">
    <f:model>
      <data xmlns="">
        <brailleAvailable>true</brailleAvailable>
      </data>
    </f:model>
    <f:bind nodeset="brailleAvailable" type="xsd:boolean"/>
</state>
    ...
  </head>
  <body>
      <seq>
          <par>
            <-- This is the Braille rendering equivalent of the text contents.  A Braille display is required to show it. -->
            <text src="special-notation-for-braille.xml#p4" dur="indefinite" expr="brailleAvailable">
                <param name="daisy:use-renderer" value="braille"/>
            </text>
            <-- This is the default visual rendering of the text contents.-->
            <text src="my_text.xml#p4"/>
            <audio src="audio.mp3" clipBegin="0.00s" clipEnd="3.00s"/>
          </par>
          ...
      </seq>
  </body>
</smil>

20.4.10 Structure Modules

In the DAISY profile, Structure elements may have the following attributes and content model:

Structure Module
Elements Attributes Content model
smil Core, I18n, systemRequired, xmlns, version, baseProfile (head?, body?)
head Core, I18n (meta*, (state, meta*)?, (submission, meta*)?, (, meta*)?, ((layout | switch), meta*)?, meta*)?, (paramGroup+, meta*)?)
body Core, I18n, Timing, abstract, author, copyright (Schedule | MediaContent | switch | a | State | )*

20.4.11 Timing Modules

In the DAISY profile, Timing elements can have the following attributes and content model:

Timing and Synchronization Module
Elements Attributes Content model
par Core, Role, I18n, Timing, endsync, Test, expr, systemRequired (Schedule | MediaContent | switch | a | State | )*
seq Core, Role, I18n, Timing, fill (freeze | remove | hold | auto | default), Test, expr, systemRequired (Schedule | MediaContent | switch | a | State | )*
excl Core, Role, I18n, Timing, Test, expr, systemRequired (Schedule | MediaContent | switch | a | State | )*

The Attribute collection Timing is defined as follows:

Collection Name Attributes in Collection
Timing begin, dur, end

Special values for the end attribute

This profile defines the following values for the end attribute, in addition to what is given by SMIL.

special end attribute values
value Description
daisy:userEscape;childId-value.end The time container ends when the daisy:userEscape event happens or when the last child finishes playing. This may be used for escapable content, i.e., parts of the book which the user may "jump out of", such as nested tables.
daisy:userResume(;childId-value.end + Clock-value)? The time container ends when the daisy:userResume event happens or at a predefined length of time after the last child element finishes playing. This may be used for authoring pauses into a presentation.

20.5 Appendix A: SMIL DTD

This section is normative.

The DAISY Profile Document Type Definition is defined as a set of SMIL 3.0 modules, with the addition of the XHTML Role Attribute Module [XHTMLrole]. 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. The XHTML Role Attribute Module's DTD Implementation [XHTMLrole-DTDImpl] is used for integrating role into the DAISY profile DTD.

20.6 Appendix B: A sample presentation

This section is informative.

This document shows a SMIL file representing part of a DAISY book which has been produced according to the SMIL 3.0 DAISY profile. It renders synchronized text and audio with user-controlled playback options. It adds the following new features, which have not been present in previous versions of DAISY specifications:

Important note: the namespace "daisyskip" has not yet been officially defined and is included here in concept only. The concept is that there should be a separate section for variables whose values may be set by the user agent.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0 Daisy//EN" "http://www.w3.org/2007/07/SMIL30/SMIL30Daisy.dtd">

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Daisy" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:daisyskip="http://daisy.org/smil/features/skippability" >
<head>
    <meta name="title" content="Smil 3 Demo"/>
    <meta name="next" content="bagw0002.smil"/>
    <meta name="previous" content="bagw0000.smil"/>

    <paramGroup xml:id="textParams">
        <param name="daisy:display–in–context" value="true" />
        <param name="daisy:css–highlight–style" value="background–color: yellow; color: black; border: solid thin green"/>
    </paramGroup>

    <layout>
        <root-layout xml:id="root-layout" width="100%" height="100%"/>
        <region xml:id="text" width="100%" height="100%" paramGroup="textParams"/>
    </layout>

    <!--Note that, instead of the following state element, that data could go in a separate file-->
    <!--such as: <state src="stateData.xml"/>-->
    <state xmlns:f="http://www.w3.org/2002/xforms">
        <f:model>

            <!--Everything in the daisyskip namespace should be exposed by the user agent-->
            <!--Variables that are for internal use only (there are none here) would be declared in the same way, but without the daisyskip: prefix-->
            <f:instance>
                <!--The label references a text/audio representation of "play page number announcements"-->
                <daisyskip:playPageAnnouncements label="labels.smil#play_page">true</daisyskip:playPageAnnouncements>
                <daisyskip:playProducerNotes label="labels.smil#play_prodnote">true</daisyskip:playProducerNotes>	           
           </f:instance>

            <f:bind nodeset="/daisyskip:playPageAnnouncements" type="xsd:boolean"/>
            <f:bind nodeset="/daisyskip:playProducerNotes" type="xsd:boolean"/>
        </f:model>

    </state>

</head>
<body>
    <seq dur="30.076s">

        <par endsync="last" xhtml:role="sectionStart" label="labels.smil#section">
            <text src="ncconlydemo.html#bagw_0001" xml:id="bagw_0001" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=0.000s" clip-end="npt=2.035s" xml:id="qwrt_0001"/>
            </seq>
        </par>

        <par endsync="last" xhtml:role="paragraph">
            <text src="ncconlydemo.html#bagw_0001" xml:id="xbag_0001" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=2.035s" clip-end="npt=8.901s" xml:id="qwrt_0002"/>
            </seq>
        </par>

        <par endsync="last" xhtml:role="ProducerNote" expr="/daisyskip:playProducerNotes">
            <text src="ncconlydemo.html#bagw_0002" xml:id="bagw_0002" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=8.901s" clip-end="npt=19.554s" xml:id="qwrt_0003"/>
                <audio src="bagw0019.mp3" clip-begin="npt=19.554s" clip-end="npt=28.774s" xml:id="qwrt_0004"/>
            </seq>

        </par>
        <par endsync="last" xhtml:role="PageAnnouncement" expr="/daisyskip:playPageAnnouncements">
            <text src="ncconlydemo.html#bagw_0003" xml:id="bagw_0003" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=28.774s" clip-end="npt=30.076s" xml:id="qwrt_0005"/>
            </seq>

        </par>
        <par endsync="last" xhtml:role="Page">
            <text src="ncconlydemo.html#bagw_0003" xml:id="bagw_0003" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=28.774s" clip-end="npt=30.076s" xml:id="qwrt_0005"/>
            </seq>

        </par>
        <par endsync="last" xhtml:role="Page">
            <text src="ncconlydemo.html#bagw_0003" xml:id="bagw_0003" region="text"/>
            <seq>
                <audio src="bagw0019.mp3" clip-begin="npt=28.774s" clip-end="npt=30.076s" xml:id="qwrt_0005"/>
            </seq>

        </par>
    </seq>
</body>
</smil>

previous   next   contents