previous   next   contents  

20. SMIL 3.0 DAISY Profile

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

Table of contents

20.1 Changes for SMIL 3.0

This section is informative.

The Daisy profile from SMIL 3.0 is a new profile.

The core functionality of this profile is specified in this release. Several issues remain open, pending Daisy review:

20.2 Abstract

This section is normative.

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 such as libraries for the visually-impaired.

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.

A DAISY profile is required because one does not currently exist, although SMIL has always been an integral part of the DAISY standard, and also because none of the existing profiles fit the needs of DAISY. The full SMIL language profile is too large to be considered practical, while SMIL Tiny lacks the media clipping and custom test attributes modules. The mobile profiles of SMIL 3.0 also do not incorporate the custom test attributes module, and include modules not required by DAISY, such as multi-arc timing and transitions. Therefore, a new SMIL profile is required to represent DAISY book presentations.

20.4 Normative Definition of the DAISY Profile

This section is normative.

20.4.1 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 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/2007/07/SMIL30/Daisy"
  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.

20.4.2 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, smilText, param
Metainformation meta,
State newvalue, setvalue, send
Structure smil, head, body
Schedule par, seq, excl
TextContent tev, clear, br, span, p, div, textStyle, textStyling
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 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), id (ID), label (CDATA), longdesc (CDATA), readIndex (CDATA), title (CDATA), xml:base (CDATA)
I18n xml:lang (NMTOKEN)

The id, class and title attributes in the collection Core are defined for all the elements of the DAISY Profile. The id attribute is used in the DAISY Profile to assign a unique XML identifier to every element in a SMIL document. In this document, equivalent but deprecated attributes and elements are shown in square brackets.

20.4.4 Content Control Modules

In the DAISY Profile, Content Control elements can have the following attributes and content model :

Content Control Module
Elements Attributes Content model
switch Core, I18n, Test expr, label ((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 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

20.4.5 Layout Modules

In the DAISY Profile, Layout elements can have the following attributes and content model :

Layout Module
Elements Attributes Content model
region Core, I18n, backgroundColor, backgroundOpacity, bottom, fit (fill | hidden | meet | meetBest | scroll | slice), height, left, regionName, right, showBackground (always | whenActive), skip-content, top, width, z-index region*
root-layout Core, I18n, backgroundColor , backgroundOpacity, width, height, skip-content EMPTY
layout Core, type (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 fragment identifier.

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

Linking Module
Elements Attributes Content model
a Core, I18n, href, accesskey (Schedule | MediaContent )*
area Core, I18n, shape, coords, href, nohref, accesskey, skip-content 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 can have the following attributes and content model:

Media Object Module
Elements Attributes Content model
text, img, audio, video, ref, textstream Core, I18n, Timing, region, fill (freeze | remove | hold | transition | auto | default), src, type, paramGroup, clipBegin, clipEnd (param | area )*
param Core, I18n, 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 , 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 . 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.


Text media with its source in an external file may refer to it by putting a URI in the src attribute. Some examples are:

An example of referring to a text fragment in an external file by specifiying the fragment's 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:

param element name attribute values
name value description
daisy:use–renderer tts | braille Send the media data to a text-to-speech engine or a Braille display
daisy:renderer–parameters This is renderer-specific, but some examples are "voice = Joe" or "speed=150%" Any additional information to give to the renderer, such as the name of a voice to use in a text-to-speech engine.
daisy:display–in–context true | false Display the fragment along with its parent document in the text region, or, if false, display only the text within the fragment, if specified, within the text region.
daisy:css–highlight–style a simple CSS style To give the effect of a highlight on the text fragment, CSS style can be used.
daisy:css–to–use an expression specifying further CSS options One example is that when parts of the text document need to be shown or hidden, the value of this parameter would be "generateCssShowOnly(element-id)"

In the case where the whole document is being shown at once (daisy:display–in–context=true), an intelligent renderer will make sure that the portion of the parent document containing the specified fragment will be put in view so the fragment can 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). If the renderer supports additional restrictions about what part of the document to show or hide, this should be given by using the daisy:css–to–use parameter.

Examples:

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>
	...
  <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 can be put in a paramGroup, and the paramGroup can be referenced from the region. Example:

<smil>
	<head>
		<paramGroup 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 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, but this should be defined in forthcoming standards from the DAISY Consortium when they reference this profile.

However, it is strongly recommended to support the formats required by the SMIL 3.0 Language Profile's Required MIME Types section.

20.4.8 Metainformation Modules

In the DAISY 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 (meta*)

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

The content model of metadata 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 metadata element. The Resource Description Framework is defined in the W3C RDF Recommendation [RDFsyntax].

Useful note: because the metadata element can appear on its own, it can be used to wrap a meta element and placed anywhere in the document.

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

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

<–– chapter2.smil ––>
<smil>
	<head>
		<meta name="next" content="chapter3.smil"/>
		<meta name="prev" content="chapter1.smil"/>
		<meta name="contents" content="index.ncx"/>
		...
	</head>
	<body>
		...
	</body>
</smil>

20.4.9 smilText Modules

The smilText Modules provides a light-weight method of adding in-line text to a SMIL presentation. The SMILtext Modules define semantics for the smilText, br, span, textStyle, textStyling elements and their attributes. This profile includes the SMILtext functionality of the BasicText and TextStyling modules.

In this profile, SMILtext elements can have the following attributes and content model:

smilText Module
Elements Attributes Content model
smilText Core , I18n , Timing , Test , TextAttributes , region , fill ( freeze | remove | hold | auto | default ) , skip-content tabindex , expr , textPlace ( fromTop | fromBottom | inherit ) 'fromTop' , textStyle , textWrapOption ( wrap | noWrap | inherit ) 'wrap' , endsync , paramGroup (#PCDATA | br | span)*
tev Core , I18n , skip-content , begin , next EMPTY
clear Core , I18n , skip-content , begin , next EMPTY
br Core, I18n, skip-content EMPTY
span Core, I18n, skip-content, TextAttributes #PCDATA
textStyle Core, I18n, skip-content, TextAttributes 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, the switch element of the Basic Content Control 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, textDirection (inherit | ltr | rtl) 'inherit', textFontFamily (monospace | sansSerif | serif | inherit) 'monospace', textFontSize, textFontStyle (normal | italic | oblique | reverseOblique | inherit) 'normal', textFontWeight (normal | bold | inherit) 'normal', textStyle

20.4.10 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 state, setvalue, and send elements and the expr, ref, value, and submission attributes. This profile includes the State functionality of the StateTest, UserState, StateSubmission, StateInterpolation modules.

In this profile, the State elements can have the following attributes and content model:

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

This profile adds the state element to the content model of the head element of the Structure Module, and the setvalue 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.

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 but need to be used using a namespace prefix.

The ref attribute value is an XPath expression that must evaluate to a nodeset.

The value attribute value is an XPath expression that must evaluate to a value with a compatible type.

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 attributes href, src, and value.

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

DAISY is meant to be able to incorporate content written in other standards (such as Math ML); however, not all user agents will support these extensions. In these cases, fallbacks specified using state expressions can give alternatives to user agents.

Using state

This example shows how to use state and param together to target specialized text renderers:

<smil>
  <head>
  <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.11 Structure Modules

In the DAISY Profile, Structure elements can have the following attributes and content model :

Structure Module
Elements Attributes Content model
smil Core , I18n , Test , xmlns ( head ?, body ?)
head Core , I18n ( meta *,( state , meta *)?,( submission , meta *)?,( , meta *)?,(( layout | switch ), meta *)?, ( textStyling +, meta *)?, ( paramGroup +, meta *)?)
body Core , I18n , Timing (Schedule | MediaContent | switch | a | State | )*

20.4.12 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, I18n, Timing, endsync, label (Schedule | MediaContent | switch | a | State | )*
seq Core, I18n, Timing, fill (freeze | remove | hold | auto | default), label (Schedule | MediaContent | switch | a | State | )*
excl Core, I18n, Timing, label (Schedule | MediaContent | switch | a | State | )*

The Attribute collection Timing is defined as follows:

Collection Name Attributes in Collection
Timing begin, dur, end, repeat, repeatCount, repeatDur

Special values for the end attribute

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

20.4.13 Playback Guidelines

This section is informative

See UAAG checkpoint 2.4 about overriding author-defined timing. This is especially important when a user is reading at a different speed than the default, perhaps via TTS or Braille.

Use case of a deaf-blind user

Deaf-blind readers who use Braille output will use the text contents actively, not passively. Output from electronic refreshable Braille displays happens line-by-line. This means that the user needs to be in control of the reading speed and order. Modifications to the standard speed and sequence will include speed adjustment, reverse, still/pause, and advancement to the next line.

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

20.6 Appendix B: A sample presentation

This section is informative.

This represents a presentation with three major parts:

Some comments about this presentation:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smil PUBLIC "-//W3C//Dtd SMIL 3.0//EN" "http://www.w3.org/2007/07/SMIL30/SMIL30.dtd">
<smil xmlns="http://www.w3.org/2007/07/SMIL30/Language">
  <head>
  	<!--some simple metadata-->
    <meta name="Author" content="Marisa, Julien, and Daniel" />
    <meta name="Date" content="2007-06-08" />
   	<meta name="contents" content="index.ncx"/>
   <!--a data model-->
   <!-- from http://www.w3.org/tr/2006/WD-SMIL3-20061220/smil-state.html -->
	<state xmlns:f="http://www.w3.org/2002/xforms">
	<f:model>
	  <data xmlns="">
		<!-- Keep track of the score during the quiz -->
		<quizScore>0</quizScore>
		<!-- Remember the settings (producer notes on/off)-->
		<playProdnotes>true</playProdnotes>
		<!--Tracks the user's last answer-->
		<lastAnswer>0</lastAnswer>
	  </data>
	</f:model>
	<f:bind nodeset="quizScore" type="xsd:nonNegativeInteger"/>
	<f:bind nodeset="playProdnotes" type="xsd:boolean"/>
	<f:bind nodeset="lastAnswer" type="xsd:nonNegativeInteger"/>
	<!-- This will allow us to save later -->
	<f:submission id="save" action="file:playstate.xml" method="post" replace="none"/>
	</state>

   <!--layout-->
	<layout>
		<root-layout 
			id="root-layout" 
			backgroundColor="#ffffff" 
			width="100%" 
			height="100%"/>
		<region 
		  	id="region_audio"/>
		<region
			id="region_titleScreen" 
		  	width="100%" 
		  	height="30%" 
		  	left="0" 
		  	top="30%"/>
		<!--full-screen text display with room for images-->
		<region
			id="region_textDocument"
			width="100%" 
		  	height="100%" 
		  	left="0" 
		  	top="0">
			<region 
				id="region_textItself" 
				width="70%"
				height="100%"
				left="0"
				top="0"
				paramGroup="params_textHighlightBookText"/>
			<region
				id="region_imageInset"
				width="30%"
				height="30%"
				left="70%"
				top="0"/>
		</region>
		
		<region 
		  	id="region_video" 
		  	width="70%" 
		  	height="70%" 
		  	left="10%" 
		  	top="10%">
		  		<region
		  			id="region_videoItself"
		  			width="100%"
		  			height="80%"
		  			left="0"
		  			top="0"/>
		  		<region 
					id="region_videoCaption" 
					width="80%" 
					height="20%" 
					left="0" 
					top="80%" 
					textBackgroundColor="#000000"
					textColor="#ffffff"/>
		</region>
		
		<region
			id="region_quizScore"
			top="0"
			left="0"
			height="100%"
			width="100%">
			<region 
		  		id="region_scoreReport"
		  		top="0"
		  		left="0"
		  		height="50%"
		  		width="50%"/>
			<region 
				id="region_scoreReportImage"
				top="50%"
				left="0"
				height="50%"
				width="50%"/>
		</region>
	</layout>
   
   <!--these params are used to send style instructions to renderers-->
    <paramGroup id="params_textHighlightProdNotes">
      <param 
             name="daisy:css–highlight–style" 
             value="background–color: pink; color: black; border: solid thin blue;"/>
    </paramGroup>
	
    <paramGroup id="params_textHighlightBookText">
      <param 
             name="daisy:css–highlight–style" 
             value="background–color: yellow; color: black; border: solid thin green;"/>
      <param 
             name="daisy:display–in–context" 
             value="true"/>
      <param 
			 name="daisy:css-to-use"
             value="cssShowOnly({css-rule})"/>
    </paramGroup>
    
  </head>
  <body>
    <seq>
      <!--title-->
      <par role="title" label="labels.smil#title">
        <text 
              src="daisydemo.xml#xpointer(/h1[1])" 
              region="region_titleScreen">
          <param name="align" value="center"/>
          <param 
                 name="daisy:display–in–context" 
                 value="false"/>
        </text>
        <audio 
               region="region_audio" 
               src="wrap.mp3" 
               clipBegin="0s" 
               clipEnd="2.34s"/>
      </par>
      <seq>
      	<!--we only want the div with id=main to show during this section.  the source text is being rendered
      	in context-->
      	<setvalue ref="css-rule" value="id="main""/>
        <!--producer note: skippable and escape-able-->
        <seq 
             role="producerNote" 
             expr="producerNotesOn"
             end="daisy:userEscape"
             label="labels.smil#producerNote">
          <par>
            <text 
                  region="region_textItself" 
                  src="daisydemo.xml#xpointer(/h2[1])" 
                  paramGroup="params_textHighlightProdNotes"/>
            <audio 
                   region="region_audio" 
                   src="wrap.mp3" 
                   clipBegin="2.34s" 
                   clipEnd="4.56s"/>
          </par>
          <par>
            <text 
                  region="region_textItself" 
                  src="daisydemo.xml#xpointer(/prodnote[1])" 
                  paramGroup="params_textHighlightProdNotes"/>
            <audio 
                   region="region_audio" 
                   src="wrap.mp3" 
                   clipBegin="4.56s" 
                   clipEnd="7.65s"/>
          </par>
        </seq>
        <par>
          <text 
                region="region_textItself" 
                src="daisydemo.xml#xpointer(/intro/p[1])"/>
          <audio 
                 region="region_audio" 
                 src="wrap.mp3" 
                 clipBegin="7.65s" 
                 clipEnd="9.02s"/>
        </par>
        <par>
          <text 
                region="region_textItself" 
                src="daisydemo.xml#xpointer(/intro/p[2])"/>
          <img 
               region="region_imageInset"
               src="newspaper.jpg"/>
          <audio 
                 region="region_audio" 
                 src="wrap.mp3" 
                 clipBegin="9.02s" 
                 clipEnd="10.10s"/>
        </par>
        <par>
          <text 
                region="region_textItself" 
                src="daisydemo.xml#xpointer(/intro/p[3])"/>
          <audio 
                 region="region_audio" 
                 src="wrap.mp3" 
                 clipBegin="10.10s" 
                 clipEnd="11.11s"/>
          <img 
          	   region="region_imageInset"	
               src="birthday-paper.jpg"/>
        </par>
        <par>
          <text 
                region="region_textItself" 
                src="daisydemo.xml#xpointer(/intro/p[4])"/>
          <audio 
                 region="region_audio" 
                 src="wrap.mp3" 
                 clipBegin="11.11s" 
                 clipEnd="13.02s"/>
        </par>
        <!--producer note-->
        <par 
             role="producerNote" 
             expr="producerNotesOn"
             label="labels.smil#producerNote">
          <text 
                region="region_textItself" 
                src="daisydemo.xml#xpointer(/prodnote[2])" 
                paramGroup="params_textHighlightProdNotes"/>
          <audio 
                 region="region_audio" 
                 src="wrap.mp3" 
                 clipBegin="13.02s" 
                 clipEnd="14.21s"/>
        </par>
      </seq>
  	  
	  <!--instructional video-->
	  <seq	end="daisy:userEscape">
		<par>
			<smilText region="region_videoCaption" dur="2s">Steps for wrapping a present</smilText>
			<video 
				 region="region_videoItself" 
				 src="wrap.avi" 
				 fill="freeze"/>
		</par>
		<par>
		  <smilText region="region_videoCaption">Step one: measure and cut the paper. It should be about twice as large as whatever you want to wrap.</smilText>
		  <video 
				 region="region_videoItself" 
				 src="wrap.avi" 
				 clipBegin="0s" 
				 clipEnd="3.21s"/>
		</par>
		<par>
		  <smilText region="region_videoCaption">Step two: place your item in the center of the paper and fold the two longest sides inward. Crease them smoothly and fasten with a small amount of tape.</smilText>
		  <video 
				 region="region_videoItself" 
				 src="wrap.avi" 
				 clipBegin="3.21s" 
				 clipEnd="5.4s"/>
		</par>
		<par>
		  <smilText region="region_videoCaption">Step three: fold the vertical edges of the ends inward, then fold the top and bottom of the ends inward as well. Tape down.</smilText>
		  <video 
				 region="region_videoItself" 
				 src="wrap.avi" 
				 clipBegin="5.4s" 
				 clipEnd="7.6s"/>
		</par>
		<par>
		  <smilText region="region_videoCaption">Step four: place a small note on the package indicating who it is for. Otherwise, anyone might open it.</smilText>
		  <video 
				 region="region_videoItself" 
				 src="wrap.avi" 
				 clipBegin="7.6s" 
				 clipEnd="14.6s"/>
		 
		</par>
	  </seq><!--end of the video-->
	  
      <seq id="quiz">
        <par>
          <text 
                src="daisydemo.xml#xpointer(/quiz/h1[1])"
                region="region_titleScreen">
                <param name="align" value="center"/>
			    <param name="daisy:display–in–context" value="false"/>
          </text>
          <audio 
                 region="region_audio" 
                 src="quiz.mp3" 
                 clipBegin="0s" 
                 clipEnd="1s"/>
        </par>
        <!--two questions-->
        <setvalue ref="css-rule" value="id="quiz""/>
		<seq 
			role="question" 
			label="labels.smil#question"
			end="daisy:userResume;q1img2.end+00:00:30">
			<par id="q1text">
			  <text 
					src="daisydemo.xml#xpointer(/quiz/p[1])"
					region="region_textItself"/>
			  <audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="1s" 
					 clipEnd="2s"/>
			</par>
			<par id="q1img1">
				<text 
					src="daisydemo.xml#xpointer(/quiz/ul[1]/li[1])"
					region="region_textItself"/>
				<audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="2s" 
					 clipEnd="3s"/>
				<img
					src="newspaper.jpg"
					region="region_imageInset"/>
			</par>
			<par id="q1img2">
				<text 
					src="daisydemo.xml#xpointer(/quiz/ul[1]/li[2])"/>
				<audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="3s" 
					 clipEnd="4s"/>
				<img 
				   src="birthday-print.jpg"
				   region="region_quizQuestionImage"/>
			</par>
		  </seq><!--end first question-->
		   </seq>
  		<!-- If an answer was given and it is correct, increase the score -->
  		<setvalue ref="quizScore" value="{quizScore}+1" expr="$lastAnswer='2'"/>
          <seq
          	role="question" 
			label="labels.smil#question"
			end="daisy:userResume;q1img2.end+00:00:30">
			<par>
			  <text 
					src="daisydemo.xml#xpointer(/quiz/p[2])"
					region="region_textItself"/>
			  <audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="4s" 
					 clipEnd="5s"/>
			</par>
			<par>
				<text 
					src="daisydemo.xml#xpointer(/quiz/ul[2]/li[1])"
					region="region_textItself"/>
				<audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="5s" 
					 clipEnd="6s"/>
				<img
					src="ribbon.jpg"
					region="region_imageInset"/>
			</par>
			<par>
				<text 
					src="daisydemo.xml#xpointer(/quiz/ul[2]/li[2])"/>
				<audio 
					 region="region_audio" 
					 src="quiz.mp3" 
					 clipBegin="6s" 
					 clipEnd="7s"/>
				<img 
				   src="tape.jpg"
				   region="region_quizQuestionImage"/>
			</par>
		  </seq><!--end second question-->	
		  <!-- If an answer was given and it is correct, increase the score -->
  		<setvalue ref="quizScore" value="{quizScore}+1" expr="$lastAnswer='1'"/>
        </seq> <!--end quiz-->
      <seq id="quiz-results">
        <seq>
          <!--the text here should build up, so each stays on the screen as the next one comes along-->
          <par>
            <smilText region="region_scoreReport">Your score is:</smilText>
            <audio 
                   region="region_audio" 
                   src="score1.mp3"/>
          </par>
          <par>
            <smilText region="region_scoreReport">{number-right}</smilText>
          </par>
          <par>
            <smilText region="region_scoreReport">of two.</smilText>
            <audio 
                   region="region_audio" 
                   src="score2.mp3"/>
          </par>
        </seq>
        <switch>
          <par expr="$number-right = 2">
            <smilText region="region_scoreReport">Yay! Congratulations!</smilText>
            <img 
                 src="happy.jpg" 
                 region="region_scoreReportImage"/>
            <seq>
              <audio src="party.mp3"/>
              <audio src="yay.mp3"/>
            </seq>
          </par>
          <par>
            <smilText region="region_scoreReport">Better luck next time.</smilText>
            <img 
                 src="sad.jpg" 
                 region="region_scoreReportImage"/>
            <seq>
              <audio src="sad.mp3"/>
              <audio src="betterluck.mp3"/>
            </seq>
          </par>
        </switch>
      </seq>
    </seq>
  </body>
</smil>


previous   next   contents