Multimodal Presentation Markup Language (MPML) Ver. 1.030 Specification Author: Takayuki Tsutsui Ishizuka Lab., Dept. of Information and Communication, The university of Tokyo Last update: Fab. 10, 1998 Introduction: This document is the specification sheet of MPML (Multimodal Presentation Markup Language), script language for multimodal presentation version 1.030 MPML is a language for making scripts of presentation based on agent characters. The objective and features of MPML can be found in the MPML Homepage at http://www.miv.t.u-tokyo.ac.jp/MPML-e/mpml.html By using MPML, the followings are possible: - Writing actions of agent charactors at ease - Writing movement of agent charactors' actions with synchronized various media objects. - Presentation control based on interactive dialogue, click, and events. This document has following structure. Chapter 1: The introduction of this specification sheet. Chapter 2: The description of "mpml" elements. Chapter 3: The description of elements in header part. Chapter 4: The description of elements in body part. Chapter 5: The description of definitions in MPML document format. Language: The original document is given in Japanese. Content: 1. About Specification Sheet 2. "mpml" element 3. Header of document 3.1 "head" element 3.2 "rec" element 3.2.1 "meta" element 3.2.2 "abst" element 3.3 "layout" element 3.3.1 "region" element 3.3.2 "root-layout" element 3.4 "switch" element in header part 4. Body of document 4.1 "body" element 4.2 "agent" element 4.2.1 "move" element 4.2.2 "speak" element 4.2.3 "play" element 4.3 Synchronization element 4.3.1 "par" element 4.3.2 "seq" element 4.3.3 "ref" element 4.3.4 Time model of MPML 4.4 "switch" element in body part 4.5 Hyper-link element 4.5.1 "a" element 4.5.2 "anchor" element 5. Definition of document format 5.1 Relation to XML 5.2 DTD Chapter 1: About Specification Sheet MPML document conforms to XML 1.0 document. It is recommended that the reader should understand the concept and terminology used in XML specification. The grammar of MPML shown as definition of document format will be given in chapter 5. The attributes of definitions will be described respectively to the occurrences of elements. The elements and attributes of definitions have the following rule: The attributes of definitions are basically described first. Later on, the definitions of elements of same category will refer to the chapter in which the definition is given for the first time. If the use of the attribute is different from previous description, it will be given specifically in that part. The elements that can not be omitted according to the condition of MPML, the attributes that can not overridden some specific attributes, and the different usages due to the preceding elements are exist. Since these relationship can not be specified in DTD, basically, the explanation will be given in the parts of specification sheet. The parser gives warning if there are errors caused by violating MPML grammar such as the overriding of attributes, which have exclusive relationship, but it will not correct the error. In such case, the execution will be relied basically on the player at run time. Chapter 2: "mpml" element The "mpml" element is the top element of MPML document. [Attribute of Element] The "mpml" element has following attributes. id This is the identification tag in XML, which have the same attribute as ID format. With this attribute, the same id can not be used even in the different elements because it is the value used to declare identity through out the document. [Content Model] "mpml" element has following sub-elements: head Defined in 3.1 body Defined in 4.1 Chapter 3: Header of document 3.1 "head" element "head" element is record portion of meta data related to the presentation and it is also provided for description of the appearance layout of the presentation. [Attribute of Element] id     Defined in Chapter 2 [Content Model] "head" element has following sub-elements: rec     Defined in 3.2 layout     Defined in 3.3 switch     Defined in 3.4 3.2 "rec" element With "rec" element, the user can describe general properties related to the presentation script document. It is necessary that the "rec" element has to come before "layout" or "switch" element. [Attribute of Element] id     Defined in Chapter 2 [Content Model] "rec"element has following sub-elements: meta     Defined in 3.2.1 abst     Defined in 3.2.2 3.2.1 "meta" element "meta" element is the element in which you can describe properties and information of the presentation. The properties can be described in pair of property name and corresponding value. [Attribute of Element] "meta" element can have following attributes: Id Defined in Chapter 2 name This attribute is used to define a property within "meta" element. This attribute cannot be omitted. The value of "name" attribute can be anything but if the "meta" element is used as sub-element of "rec" element, it is recommended to follow the following: ──────────────────────────────────────── [Definition][Explanation]            [Example] titl  Japanese title of the presentation   タイトル tite  English title of the presentation    title aupk  Author name in Japanese 著者1 / 著者2 /... aupe  Author name in English     author1 / author2 /... conf  The name of conference        The 56th annual conference, Information Processing Society of Japan cond  The date of using           19981005 host  The host of conference         Information Processing Society of Japan kywd  Japanese keywords            キーワード1 / キーワード2 / ... kywe  English keywords            key1 / key2 / ... (The above are the information conformed to the requirement of NACSIS) writer Script author             Author wrid  Date of scripting          19980926 pred  Date of presentation      19981005 vafd  The valid period of presentation(from)19980926 vatd  The valid period of presentation(to) 19990926 ──────────────────────────────────────── content     This attribute is the place where the property value in "meta" element is define     "content" attribute cannot be omitted [Content Model] "meta" element is an empty element. [Example usage]       3.2.2 "abst" element The outline of a presentation can be described in the contents of element "abst". [Attribute of Element] "abst" element can have following attributes: id     Defined in chapter 2. lang     The type of content language is described.     The attribute can be chosen between "Japanese" and "English".     The default is "Japanese". [Content Model] The content of "abst" element is text data. [Sample usage] The following sample is the one described in English.     This is abstract of this presentation. 3.3 "layout" element "layout" element defines layout specification of the contents in "body" document. It cannot be the child element of "head" element when using "switch" element. [Attribute of Element] "layout" element can have following attributes: id     Defined in chapter 2 Type Specify the layout language used in "layout" element. In case that the system cannot recognize specified language, the process will be skipped until the next occurrence of tag . The default attribute is "text/mpml-basic-layout". [Content Model] The content of "layout" element can be arbitrary but in case that the value of "type" attribute is "text/mpml-basic-layout", "layout" element can contain the following child elements: region     Defined in 3.3.1 root-layout     Defined in 3.3.2 3.3.1 "region" element In this section, the expression rule when the value of attribute is "text/mpml-basic-layout" is described. The "region" element describes information about the media object or the position and size of agent. In case of multiple regions, please use multiple "region" elements. The user can choose among various ways of defining region such as using dots or specifying rectangular area. If the "location", "box", "left", or "top" attribute are not specified, the process will be made as the "left" and "top" attributes are 0. [Attribute of Element] "region" element can have following attributes: id     Defined in chapter 2 The "id" attribute of "region" element will be referred as the value of "region" attribute of media object. This attribute cannot be omitted within "region" element. location     Specifies the point location of region setting. It can be specified not only in number of pixels but also the percentage of the size of root window. It will be described by 2 parameters: the distance from left and top of the window. When this attribute is referred for media object, it will be executed so that the left top corner of the media object comes upon the specified point. The format is as follow:         location-value ::= left-x "," top-y box     Specifies the region using an area of rectangular given by left top and right bottom points. It can be specified not only by coordinates of pixels but also the percentage of the size of root window. It can be given either by specifying pairs of parameters of distances on X-axis and Y-axis respectively or by giving a point by a pair of parameters then specify another point by the relative distances. The format can be either one of followings:         box-value1 ::= left-x "," top-y "," right-x "," bottom-y         box-value2 ::= left-x "," top-y ","             "+" relative-distance-x "," "+" relative-distance-y         box ::= (box-value1 | box-value2)         [例]         box="50,100,150,200"         box="50,100,+100,+100" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0,0(0%,0%)     [root window]         X,0(100%,0%) +----------------------------------------------------------+ |     / \         / \     | |     |         |        | |     |         |        | |     |top-y         |        | |     |         bottom-y|        | |     |         |        | | left-x \ /         |        | |<------------>@1---------------------| |        | |     | / / / / / / / / / / /| |        | |     |/ / / / / / / / / / / | |        | |     | / / / / / / / / / / /| |        | |     |/ / / / / / / / / / / | |        | |     | / / / / / / / / / / /| |        | |     |/ / / / / / / / / / / | |        | |     |---------------------@2 \ /     | | right-x                     | |<----------------------------------->         | |                             | |                             | |                             | +----------------------------------------------------------+ 0,Y(0%,100%)                 X,Y(100%,100%) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ left     Specifies the location by horizontal distance (or percentage) from the left edge of windows.     The "left" attribute cannot be implemented when "location" or "box" attribute is used. top Specifies the location by vertical distance (or percentage) from the top edge of windows.     The "top" attribute cannot be implemented when "location" or "box" attribute is used.      width     Specifies the horizontal width of the region by number of pixels or in percentage format of the size of the root window. height     Specifies the vertical height of the region by number of pixels or in percentage format of the size of the root window. zindex     This is the index of overlapped regions.     Root window is set to be level "0". The larger numbers of this index indicate that those regions overlay the regions with smaller index     In case of the same index, the basic rule is that the region of last processing order will overlay others. This process depends on the players. fit     Specifies the way of media object processing when its size does not match the size of region.     Default value is "hidden".     The attribution value can be chosen from the following:         fill This option fills the element "region" with the media object. Its size will be adjusted regardless of the original ratio.         hidden If the size of media object is smaller than that of "region" element, the upper left corner of the media object will be placed at the upper left corner of the region and the remaining part will be painted with background color. In contrast, if the size of media object is bigger than that of "region" element, the area outside the region will be truncated.         meet Retain the aspect ratio of the object while placing the object into the region. The object will be enlarged (or reduced) to the biggest (or smallest) size possible while the upper left corner of the object will be placed at the upper left corner of the region. The remaining area on the right (or bottom) will be painted with background color.         scroll Enable the visualization of the object even it's bigger than the region by scroll bar feature.         slice Retain the aspect ratio of the object as well as enlarge (or reduce) the object to the size of the region. The remaining part on the right (or bottom) will be truncated. backgroundcolor     Specify the color of background.     If this attribute is not given the default background color will be transparent. title     Describe the information about the element.     The way of using with "region" element is that, for example, when user moves the cursor to the region, there will be a tool tip pops up to show the value of the attribute. [Content Model] "region" element is an empty attribute. [Sample usage] In the following example, the script uses "ref" element to refer to the position, which is set at 80% from the left and 30% from the top of the presentation window:                      3.3.2 "root-layout" element "root-layout" is the characteristic of the root window which is the overall characteristic of MPML presentation. The detail such as the size of overall area of MPML presentation can be set in this element. [Attribute of Element] "root-layout" element has following attributes: id     Defined in chapter 2 title     Defined in chapter 3.3.1 width     Defined in chapter 3.3.1 but percentage display is not applicable. height     Defined in chapter 3.3.1 but percentage display is not applicable. box Defined in chapter 3.3.1 but percentage display is not applicable. backgroundcolor     Defined in chapter 3.3.1 [Content Model] "root-layout" element is and empty element. 3.4 "switch" element in header part "switch" element itself is not for layout description. It is 要素"switch"自体はレイアウト記述のためにあるのでなく、コンテンツ作者が代替のコンテン ツを複数指定しておくために使用される。要素"head"の子要素としての要素"switch"は、レイ アウト記述の表現方法として複数の方法を指定しておき、プレイヤに適当なものを選択させる 為に使用される。 DTDでは明示できないが、ヘッダ中の要素"switch"の持つ子要素は要素"layout"のみである 。コンテンツ作成者はできるだけ使ってもらいたいコンテンツから順に要素"switch"の中に並 べ、最も安全なコンテンツを最後に記述しておくことを推奨する。 [要素属性] 要素"switch"は以下の属性を持つことができる: id     2章で定義。 title     3.3.1章で定義。 [内容モデル] ヘッダ中にある要素"switch"は以下の子要素を持つことができる: layout     3.3章で定義。 ◆4 ドキュメントのボディ ◇4.1 要素"body" 要素"body"の子孫要素には、メディアオブジェクトの動作仕様、エージェントの動作、リンク 、プレゼンテーション制御などに関する情報を持つコンテンツがおかれる。 また要素"body"は暗黙に要素"seq"の定義を含むため、そのコンテンツの実行はシーケンシャ ルに行われる。 [要素属性] 要素"body"は以下の属性を持つことができる: id     2章で定義。 [内容モデル] 要素"body"は以下の子要素を持つことができる: agent     4.2章で定義。 move     4.2.1章で定義。 speak     4.2.2章で定義。 play     4.2.3章で定義。 par     4.3.1章で定義。 seq     4.3.2章で定義。 ref     4.3.3章で定義。 switch     4.4章で定義。 a     4.5.1章で定義。 ◇4.2 要素"agent" 要素"agent"には画面上でプレゼンテーションを行うエージェントキャラクタに関する情報を 記載する。要素"agent"で定義したエージェントを、要素"play"や要素"move"、要素"speak"な どで参照する。複数のエージェントを用いてプレゼンテーションを行う場合には複数の要素 "agent"を定義し、それらを参照することでマルチエージェントによるプレゼンテーションが 可能になる。 [要素属性] 要素"agent"は以下の属性を持つことができる: id     2章で定義。     明示する事を強く推奨する。 character     プレゼンテーションを行うエージェントキャラクタを指定する。     省略された場合、もしくはプレイヤが指定されたキャラをサポートしていない場合は     適当なキャラクタがロードされる。 [例]character="genie" appear     エージェントキャラクタの出現のタイミングを管理する。     デフォルト値は"always"である。     属性値は以下のリストから選択される:         always     プレゼンテーションの開始時から常に存在している。         now     プレイヤが要素agentを実行する際に始めて出現する。         later     showなどのplayコードで呼ばれる時まで出現しない。         never     姿は現さない。音声対話のみサポート。 region     IDREF型の属性値を持ち、エージェントキャラクタが出現する場所のリージョンを指     定する。この属性値が指定されなかった場合のプレゼンテーション実行はプレイヤに     依存する。 lang     音声合成を用いるエンジンの言語を指定する。     属性値は"japanese"、"english"から選択する。     デフォルト値は"english"である。 voicetype     音声合成の種類を指定する。     属性値はプレイヤの音声合成に依存する。 [内容モデル] 要素"agent"は空要素である。 [使用例] 以下の例では、識別子"taro"と識別子"hanako"というキャラクタを定義し、声のタイプをそれ ぞれ"youngman"、"youngwoman"に設定した: □4.2.1 要素"move" この要素を用いてエージェントキャラクタを移動させることができる。 移動時にはプレイヤがキャラクタに適当な動きをさせることが望ましい。 [要素属性] 要素"move"は以下の属性を持つことができる: id     2章で定義。 agent     IDREF型の属性値を持ち、要素"agent"で定義したエージェントのID値を参照する。     この属性が省略された場合、対象エージェントは一番最後に定義されたエージェント     となる。 region     IDREF型の属性値を持つ。要素"anchor"等で指定された場所のID値、もしくはメディ     アオブジェクトのID値を参照する。属性"region"は属性"location"と排他的関係にあ り、どちらか一方の存在しか許されない。属性"region"と属性"location”が同一要 素中に存在する場合の動作はプレイヤに依存する。 location     3.3.1章で定義。 stand     移動目標に対するエージェントの立ち位置を指定する。     デフォルト値は"on"である。     属性値は以下のリストの中から選択される:         aside     できるだけ移動目標に被らないよう、少し離れる。                 離れる方向はプレイヤに依存         sideright 目標に向かって右側に少し離れる         sideleft 目標に向かって左側に少し離れる         over     目標の上側に少し離れる         down     目標の下側に少し離れる         on     移動目標の真上に移動する。 speed     移動のはやさの度合いを"0"〜"100"の整数値で表す。     属性値が100の時、エージェントの移動速度は最もはやくなる。     デフォルトの値は"50"である。 [内容モデル] 要素"move"は空要素である。 [使用例] 以下の例で"taro"として定義されたエージェントキャラクタはx座標100、y座標200の 位置に移動する: □4.2.2 要素"speak" プレイヤが音声合成をサポートしている場合、エージェントは要素"speak"の要素内容を発話 する。属性"end"、"dur"などで発話時間の指定を行った場合、その指定時間によって発話途中 でも強制的に発話が終了する。 [要素属性] 要素"speak"は以下の属性を持つことができる: id     2章で定義。 agent     4.2.1章で定義。     リップシンク動作を行うエージェントを指定する。 lang     4.2章で定義。 voicetype     4.2章で定義。 speed     発話のはやさの度合いを"0"〜"100"の整数値で表す。     属性値が100の時、エージェントの発話は最もはやくなる。     デフォルトの値は"50"である。 begin     発話開始のタイミングを指定する。     時間指定の方法は4.4.4章の時間指定の書式に準ずる。 end     発話終了のタイミングを指定する。     時間指定の方法は4.4.4章の時間指定の書式に準ずる。 dur     発話している時間を指定する。     時間指定の方法は4.4.4章の時間指定の書式に準ずる。 alt     プレイヤが音声合成を実行できない場合に表示するテキストを指定する。     この属性は省略可能だが、使用することを強く推奨する。 [内容モデル] 要素"speak"はコンテンツに以下のものを持つことができる: 文字列     発話させるテキストを記述する。 anchor     4.5.2章で定義。 [使用例] 以下の例では"taro"というキャラクタが"speak"タグで囲まれた文を英語で発話する: Hello, my name is Taro. Nice to meet you. □4.2.3 要素"play" エージェントキャラクタは要素"play"によって、様々な動作を行う。 プレイヤがサポートする動作は有限であるが、ここでは属性値のリストと、それに対応する代 表的なエージェントシステムの動作を記す。 [要素属性] 要素"play"は以下の属性を持つことができる: id     2章で定義。 agent     4.2.1章で定義。 act     属性"act"は要素"play"中で省略することはできない。     本バージョンの仕様では属性値として以下のリストに挙げたものが採用されている: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [属性値] [動作内容] grad | pleased | happy 喜んだ表情 sad | grieve 悲しい表情 surprise[d] | wow 驚きの表情 anger | angry 怒りの表情 confuse[d] | komatta 困惑の表情 think 考える表情、ポーズ neutral | return | poker 中立の表情、ポーズ alert 目を見開く(軽い驚き) blink まばたき acknowledge うなずき uncertain | dontrecognise よくわからない表情、ポーズ decline | deny 断る、否定 look | watch | see | gaze | grance 対象を見る lookdown 首を向けて下を見る lookleft 首を向けて左を見る lookright 首を向けて右を見る lookup 首を向けて上を見る lookdownleft 首を向けて左下を見る lookdownright 首を向けて右下を見る lookupleft 首を向けて左上を見る lookupright 首を向けて左下を見る listen[ing] 聞く(手を耳へ) hear[ing] 聞く(耳を傾ける) dontlisten 聞かない(耳をふさぐ) random-face ランダムに表情が選ばれる [属性値] [動作内容] point | gesture 対象をさす pointdown 上をさす pointleft 左をさす pointright 右をさす pointup 上をさす pointdownleft 左下をさす pointdownright 右下をさす pointupleft 左上をさす pointupright 右上をさす pointkb キーボードをさす grab 対象をつかむ touch 対象をさわる getit 画面からモノを取る動作 janken | scissors-paper-stone じゃんけん(ランダム) janken_goo | stone じゃんけんのグー janken_choki | scissors じゃんけんのチョキ janken_pa | paper じゃんけんのパー yubiori | count 指を折って数える greet | bow 挨拶(おじぎ) announce お知らせ explain 説明ポーズ wave | bye 手を振る [get]attention 注目を集める suggest 提案する congratulat(e|ion) お祝いの動作 shake 体をふるわす stand[up] 座っているエージェントが立つ sit[down] 立っているエージェントが座る neutral 中立の表情、ポーズ show エージェントが現れる hide エージェントが姿を消す urge2type キーボードを打つよう促す urge2sit 座るよう促す appeal 呼びかける receive 受け取る hand 手渡す domagic 杖を振る busy | processing ビジー動作をする read[ing] 本を読む動作 search[ing] なにかを探す動作 writ(e|ing) なにかを書く動作 idl(e|ing) アイドリング動作 ────────────────────────────────────────── act属性は、以下の構文規則に従って、複数の属性値を指定することができる。 記号     意味 |     OR どちらかが選択される & AND 同時に動作が行われる ;     AFTER 連続して動作が行われる ()     構文解釈優先 記号解釈の優先度を設定する ";"や"|"、"&"などの構文規則を使用した場合、タイミングを記述する属性("begin","end", "dur")は使用することができない。 またその場合、動作対象("object")はただ一つに限定される。 終了時間を明示しないとずっと継続するような動作("look"など)の後に別の動作が続く時の エージェントの挙動はプレイヤ依存であるが、基本的には一つの動作の完了と同時に次の動作 が実行される。 [例] 1.    首を左に向けて何かを見ながら、まばたきをする: 2.    首を左に向けて何かを見た後、まばたきをする。 この場合、左を向いて何かを見ている時間の指定をすることはできない。 3.    首を左に向けて何かを見ながらまばたきをする。その後、驚いた表情をする この場合、左を向いて何かを見ている時間の指定をすることはできない。 4.       動作内容は2.と同じだが、左を見ている時間の指定ができる。 5.               動作内容は1.とほぼ同じだが、まばたきの開始などの時間の指定ができる。 6.       "anchor1"として定義した場所を5秒間見る。その後"anchor2"を5秒間指す。 7.    "look", "point"の対象は両方とも"anchor1"になる。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ parts     エージェントのどの部分を動作させるかを示す。デフォルト値はall。     この属性は以下の属性値をもつことができる。         all     体全体を動作させる         face     体は動かさず、顔だけ目的の動作をさせる         hand     手だけ目的の動作をさせる         eyes     目だけ目的の動作をさせる object     属性"act"の属性値が、"glance"、"look"、"point"等の場合、属性"object"または     属性"objectloc"の指定が必要である。属性"object"はIDREEF型の識別子参照値が     属性値となる。ただし、予約語として"random"(ランダムな座標を目的に定める)、     "front"(画面正面を目標に定める)という属性値が用意されている。 objectloc     属性"act"の属性値が、"glance"、"look"、"point"等の場合、属性"object"または     属性"objectloc"の指定が必要である。属性"objectloc"はCDATA型の属性値を持ち     3.3.1章の属性"location"の書式に準ずる。指定された座標が対象となる。 degree     動作の程度の強さの度合いを"0"〜"100"の整数値で表す。     属性値が100の時、エージェントの動作の程度は最も強くなる。     デフォルト値は"50"である。 speed     動作の素早さの度合いを"0"〜"100"の整数値で表す。     属性値が100の時、エージェントの動作は最も素早くなる。     デフォルト値は"50"である。 begin     一つの要素"play"の動作の明示開始時間を指定する。     時間指定の書式は4.3.4章に定義する。 end     一つの要素"play"の動作の明示終了時間を指定する。     時間指定の書式は4.3.4章に定義する。 dur     一つの要素"play"の動作の明示継続時間を指定する。     時間指定の書式は4.3.4章に定義する。 track     対象オブジェクトの位置が変わったときに、それを追跡するかどうかを指定する。     一部の属性"act"に対応している。属性値は"on"または"off"から選択される。     デフォルト値は"off"である。 pointgesture     属性"act"の属性値が"point"の場合、この属性を用いて手の形を指定することがで     きる。デフォルト値は"finger"である。     属性値は以下のリストから選ばれる:         finger 人差し指を用いて対象をさす         back 手の甲を正面にむけて対象をさす         down 手のひらを下にむけて対象をさす         up 手のひらを上にむけて対象をさす         forward てのひらを正面にむけて対象をさす [内容モデル] 要素"play"は以下の子要素を持つことができる: anchor     4.5.2章で定義。 [使用例] 以下の例ではエージェント"taro"がおじぎをし、エージェント"hanako"が"taro"の方を一瞬 見てから"taro"を紹介する:     This is Taro. ◇4.3 同期要素 □4.3.1 要素"par" 要素"par"の子要素は、そのドキュメント中の順序に関係なく、並行して実行される。 [要素属性] 要素"par"は以下の属性を持つことができる: id     2章で定義。 begin     メディア再生等の明示開始時刻を指定する。     また、そのイベントが、どのイベントに対して「遅れる」のかという指定も出来る。     時間指定の書式は4.3.4章に定義する。         ──────────────────────────────────         [例]         1. の暗黙の開始時刻より、6秒遅れて"audio"が再生される。                                    2. "audio"の再生が開始して4秒後に"img"が表示される。                                             ────────────────────────────────── end     メディア再生等の明示終了時刻を指定する。     属性"begin"と同様の指定方法ができる。     時間指定の書式は4.3.4章に定義する。 dur     メディア再生等の明示継続時間を指定する。     時間指定の書式は4.3.4章に定義する。 endsync     メディア再生、エージェント動作などが並行して行われる場合、それらを終了する     タイミングを指定する。デフォルト値は"last"。     属性値は以下の中から選択される:         ○last :暗黙終了時間は各メディア再生、エージェント動作などのうち、              すべてが終了するまでとなる。         ○first :最初に動作が終了したメディアの終了時刻に他すべてのメディア              を終了させる。         ○idref :この属性値は以下の書式に従う:              idref ::= "id(" idvalue ")"              ここでidvalueは参照するメディア等のid属性の識別子である。              参照されたメディア等の終了時刻をもとに暗黙終了時間が計算さ              れる。 region     IDREF型の属性値を持ち、要素"region"で設定されたリージョンへの参照を行う。 repeat     繰り返し回数を指定。整数値もしくは"indefinite"という指定ができる。     デフォルト値は"1"である。 title     3.3.1章で定義。     この属性を明示することを強く推奨する。 abstract     要素のコンテンツに関する簡単な説明。 author     要素のコンテンツの作者。 copyright     要素のコンテンツのコピーライト。 [内容モデル] 要素"par"は以下の子要素を持つことができる: agent     4.2章で定義。 move     4.2.1章で定義。 speak     4.2.2章で定義。 play     4.2.3章で定義。 par     4.3.1章で定義。 seq     4.3.2章で定義。 ref     4.3.3章で定義。 switch     4.4章で定義。 a     4.5.1章で定義。 [使用例] hello! 以上のスクリプトの実行は、以下のように行われる。 エージェントは挨拶動作をしはじめてから2秒後に発話を行う。 |---------par----------| <---------play---------> <-2s-><------speak-----> □4.3.2 要素"seq" 要素"seq"の子要素は、そのテキスト内に現れる順番に従って実行される。 [要素属性] 要素"seq"は以下の属性を持つことができる: id     2章で定義。 begin     4.3.1章で定義。 end     4.3.1章で定義。 dur     4.3.1章で定義。 repeat     4.3.1章で定義。 region     4.3.1章で定義。 title     3.3.1章で定義。     この属性を明示することを強く推奨する。 abstract     4.3.1章で定義。 author     4.3.1章で定義。 copyright     4.3.1章で定義。 [内容モデル] 要素"seq"は以下の子要素を持つことができる: agent     4.2章で定義。 move     4.2.1章で定義。 speak     4.2.2章で定義。 play     4.2.3章で定義。 par     4.3.1章で定義。 seq     4.3.2章で定義。 ref     4.3.3章で定義。 switch     4.4章で定義。 a     4.5.1章で定義。 [使用例] hello! 以上のスクリプトの実行は以下のように行われる。 エージェントは挨拶動作を完了してから2秒後に発話を行う。 |-------------seq-------------| <---play---><-2s-><---speak---> □4.3.3 要素"ref" 要素"ref"によってプレイヤはメディアオブジェクトを参照し、再生などを行う。 プレイヤがメディアの種類を認識しない場合に備え、スクリプト作者は属性"media"にオブジ ェクトのメディアの種類、属性"type"にMIMEタイプを明示することが望ましい。 [要素属性] 要素"ref"は以下の属性を持つことができる: id     2章で定義。 src     参照するメディアオブジェクトのURIを指定する。     この属性は省略不可である。 region     4.3.1章で定義。 media     メディアの種類を定義する。     この属性は省略不可ではないが、書くことを強く推奨する。     属性値は以下のリストの中から選択する:         video     aviファイルなどのビデオ         audio     wavファイルなどのオーディオ         image     jpgファイルなどのイメージ         text     txtファイルなどのテキスト         textstream テキストストリーム         html     htmlファイル形式 type     メディアオブジェクトのMIMEタイプを記載する。 alt     プレイヤがメディアオブジェクトの再生に適していないか、またはメディアオブジ     ェクトを認識できない等の場合に表示する短いテキストを記載する。     この属性は省略可能であるが、明示することを強く推奨する。 begin     4.3.1章で定義。 end     4.3.1章で定義。 dur     4.3.1章で定義。 longdesc     プレイヤがメディアオブジェクトの再生に適していないか、またはメディアオブジ     ェクトを認識できない等の場合に表示する詳しい説明へのリンクURIを指定する。     この属性は属性"alt"の短い説明を補うものであり、オブジェクトが要素"anchor"を     コンテンツとして持つのであれば、その説明も行う。 repeat     4.3.1章で定義。 title     3.3.3章で定義。     明示することを強く推奨する。 abstract     4.3.1章で定義。 author     4.3.1章で定義。 copyright     4.3.1章で定義。 [内容モデル] 要素"ref"は以下の子要素を持つことができる: anchor     4.5.2章で定義。 □4.3.4 MPMLの時間モデル MPMLドキュメント中で指定する時間は、以下の二種類がある:     ○クロック値 以下の3つの書式から適当なものを選択する。             最後のものはデフォルトでは単位は"s"となる:         Clock-value ::= Hours ":" Minutes ":" Seconds ["." Fraction]         Clock-Value ::= Minutes ":" Seconds ["." Fraction]         Clock-Value ::= Timecount [. Fraction] ("h" |"min" |"s" |"ms")     ○イベント値 同期要素中でのイベントの発生を用いて時間を表現する。             "ID-Value"にはイベントの対象となる要素の識別子を指定する。             Event には"begin"、"end"、"クロック値"のいずれかを指定する。             書式は以下の通り:         Event-value ::= id "(" ID-Value ")(" Event ")" プレイヤがメディア再生を開始、終了するために使っている表示系の制御時間をそれぞれ実効 開始時刻、実効終了時刻という。また、それを表示している時間を実効表示時間という。 MPMLプレイヤはこれらの時刻(時間)をドキュメントから決定する。 そのために、暗黙時刻、明示時刻、要求時刻という三種類の時刻の定義を用いる。 ・要素"body"の暗黙開始時刻はドキュメントの再生開始時刻である。 ・要素"par"の子要素の暗黙開始時刻は親要素である"par"の暗黙開始時刻である。 ・要素"seq"の最初の子要素の暗黙開始時刻は親要素である"seq"の暗黙開始時刻である。  それ以降の子要素の暗黙開始時刻は直前の子要素の要求終了時刻である。 明示開始時刻は"begin"属性が指定されている場合に、暗黙開始時刻をもとに計算される。 要求開始時刻は明示開始時刻が指定されている場合はそれと等しく、指定されていない場合は 暗黙開始時刻となる。 実効開始時刻は要求開始時刻の値が使用される。 ・参照が静止メディアの場合の要素"ref"の暗黙終了時刻は、その実効開始時刻の直後になる ・参照が連続メディアの場合の要素"ref"の暗黙終了時刻は、その実行開始時刻にメディアオ  ブジェクト自体の実行時間を加えたものになる ・要素"seq"の暗黙終了時刻は、その最後の子要素の要求終了時刻である ・要素"par"の暗黙終了時刻は、属性"endsync"によって指定された終了同期要素の要求表示  時間を、要素"par"の実効開始時間に加えたものになる。 ・属性"repeat"の属性値が"indefinite"である場合の暗黙終了時刻は、その要求開始時刻の  直後になる。 ・属性"repeat"の属性値が整数値の場合は、その回数だけ子要素をコピーした場合の暗黙終了  時刻になる。 明示終了時刻は"end"属性が指定されている場合に、要求開始時刻をもとに計算される。 明示表示時間は"dur"属性が指定されている場合に、その値として定義される。 ・明示終了時刻、明示表示時間の両方が指定されている場合、要求終了時刻はその終了の早い  方の時刻になる。 ・明示終了時刻のみが指定されている場合、要求終了時刻はその時刻になる。 ・明示表示時間のみが指定されている場合、要求終了時刻は要求開始時刻に明示表示時間を加  えたものになる。 ・明示終了時刻、明示表示時間共に指定されていない場合は、要求終了時刻は暗黙終了時刻に  なる。 親要素の実行終了時刻と子要素の明示終了時刻を比較し、早い方が要求終了時刻として選ばれ る。 ◇4.4 ボディ中の要素"switch" ボディ中の要素"switch"は、コンテンツ作成者が代替のメディアオブジェクトやエージェント 動作などを複数指定しておくために使用される。 直接の子要素のみが代替コンテンツの選択肢となる。 [要素属性] 要素"switch"は以下の属性を持つことができる: id     2章で定義。 title     3.3.1章で定義。 [内容モデル] ボディ中の要素"switch"は以下の子要素を持つことができる: agent     4.2章で定義。 move     4.2.1章で定義。 speak     4.2.2章で定義。 play     4.2.3章で定義。 par     4.3.1章で定義。 seq     4.3.2章で定義。 ref     4.3.3章で定義。 switch     4.4章で定義。 a     4.5.1章で定義。 [使用例] 以下の例ではまずシステムがビデオ出力可能な場合は動画を再生する。ビデオ出力不可の場合 は静止画を30秒間表示する: 次の例では音声合成システムの有無によって発話する言語を変化させる: プレイヤが日本語の音声合成ができる場合はこちらが読まれます。 This contents will be read in English. ◇4.5 ハイパーリンク要素 ハイパーリンク要素"a"及び"anchor"は、クライアントユーザによるプレゼンテーション制御 を可能にするために、主にインタラクションが起こった際のプレゼンテーションの挙動を記述 するために使用される。 □4.5.1 要素"a" MPMLで用いられる要素"a"はHTMLのそれと大きく異なり、空要素として用いられる。 要素"a"は、プレゼンテーションを制御するための「駆動スイッチ」を設定するために使用さ れる。「駆動スイッチ」は、以下の2つのイベントをサポートする。 ○クリックイベント:指定されたリージョン上でマウスクリックが行われると発生する。 ○音声入力イベント:指定された時間中、音声入力を受け付ける状態になる。入力された音声           が認識キーと一致すると発生する。 「駆動スイッチ」は一つのタグに一つのみ設定でき、それぞれの「駆動スイッチ」に対し て一つずつ、制御を指定することができる。 また同時に複数のタグを使用することも可能である。 クリックイベントと音声入力イベントを総称して「駆動イベント」という。 音声入力の受け付けは、基本的に、MPMLドキュメントの実行時にタグが現れた瞬間から行 われる。時間指定が無い場合は、その後プレゼンテーションの実行終了時まで受け付けが継続される。 プレイヤによっては音声認識と音声合成を同時に行うことができないものもあるので、音声入 力受け付け時間は明示しておくことが望ましい。 [要素属性] 要素"a"は以下の属性を持つことができる: id     2章で定義。 title     3.3.1章で定義。 href     ジャンプ先のURIを指定する。"mode"属性の指定が無いとき、もしくは"mode"属性     の属性値が"jump"、"open"のとき、この属性は省略不可である。 show     リンクへのジャンプが行われた時のプレゼンテーションの挙動を制御する。     デフォルト値は"new"である。     属性値は以下のリストの中から選択する。         replace 現在実行中のプレゼンテーションをその状態のまま一時停止させ、             同一ブラウザでリンク先のプレゼンテーションを実行する。プレイ             ヤがヒストリ機能を使用する場合、中断された箇所が記憶される。         new 現在実行中のプレゼンテーションに影響を与えず、リンク先のプレ             ゼンテーションが新しいブラウザで実行される。         pause 現在実行中のプレゼンテーションをその状態のまま一時停止させ、             リンク先のプレゼンテーションを新しいブラウザで実行する。リン             ク先プレゼンテーションの実行が終了した時に、先に実行していた             プレゼンテーションは停止時の状態から再開される。 mode     駆動イベントが起こったときのプレイヤの挙動を指定する。     デフォルト値は"jump"である。     属性値は以下のリストの中から選択する:         jump     指定されたリンクへジャンプする。 open 指定されたURIを表示するウィンドウを新たに開く         end     プレゼンテーションを終了する。         pause     プレゼンテーションを中断する。その時の状態を保持。         replay     プレゼンテーションを再開する。前の状態が保持されて                 いる場合はそこから再開する。保持されていないときは                 要素"a"のすぐ後から再開される。 repeat 要素"a"のすぐ後からプレゼンテーションを実行する。         slowly     エージェントの発話をゆっくりにする。程度はプレイヤ                 依存である。         fast     エージェントの発話をはやくする。程度はプレイヤ依存                 である。         nothing     駆動イベントが起こってもプレゼンテーションに影響を                 及ぼさない。 begin 音声認識の明示的開始時間を指定する。 4.3.1章で定義。 end 音声認識の明示的終了時間を指定する。 4.3.1章で定義。 dur 音声認識の明示的継続時間を指定する。 4.3.1章で定義。 region IDREF型の属性値を持ち、要素"region"で設定されたリージョン、もしくはメディア オブジェクトのID値への参照を行う。この属性はクリックイベントをサポートする際 に使用される。 listen     音声入力イベントによる駆動スイッチをonにするかoffにするかを指定する。     デフォルト値は"off"である。     属性値は以下の中から選択する:         on     音声入力を受け付ける状態になる。         off     音声入力をすべて受け付けなくする。 lang     入力として受け付ける音声の言語を指定する。属性値は"english"、"japanese"から     選択する。     デフォルト値は"english"である。 key     入力として受け付ける音声を指定する。     "key"属性が指定された場合は、属性"listen"の値が指定されていなくても音声での     入力を受け付ける。key属性は以下の構文規則に従って、複数の属性値を指定するこ     とができる     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━     [記号]     [意味]     |     or     どちらか一方にマッチする     []     省略可     発話されなくても良い     ()     構文優先解釈 構文解釈の優先度を指定 ... 省略記号 省略記号の位置での発話を無視する * くりかえし記号 1回以上の繰り返しをマッチさせる     [例]     1.     key="( Hello | Hi )"     "Hello"もしくは"Hi"を認識したら処理を行う。     2.     key="( [ Say ] Hello | Hi )"     "Say hello", "Hello", "hi"を認識したら処理を行う。     3. key="open the..." "open the sesame" でも "open the pineapple" でもマッチ。     4. key="(hello)* world" "hello world" も "hello hello world" もマッチ。     5.     以下のような複雑な構文も可能     key="([ say ] [ good ] (bye)*... | ...hide... | ...[ go ] away)"     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ confidence     音声入力を受け付ける際に"key"として入力される音声の信頼性を指定する。     0〜100までの値をとり、値が高いほど信頼性が必要である。     入力音声のkeyとのマッチが属性値以下の信頼性の場合、処理は行われない。     デフォルト値は"50"である。 なおこの属性による信頼性は音声認識エンジンに依存する。 [内容モデル] 要素"a"は空要素である。 [使用例] [例1]HTMLドキュメントと類似した使い方 イメージファイル"img1.jpg"をクリックすると、MPMLドキュメント中に識別子"second" として定義されたプレゼンテーションにジャンプする: [例2]音声入力を受け付ける ビデオの再生中に"jump to third"という音声入力を行うと、指定されたプレゼンテーション にジャンプする: [例3]異なる処理を記述する 異なる音声入力によって、プレゼンテーションに異なる挙動を持たせることができる。 イメージファイルをクリックした場合は後者の要素"a"の処理(プレゼンテーションの終了) が行われる: □4.5.2 要素"anchor" 要素"anchor"は以下の2通りに使用される: ○メディアオブジェクトやエージェント動作の時間的な一部分にリンクの終点となるアンカー  を設定する。 ○メディアオブジェクトの空間的な一部分にエージェントの動作対象などになるアンカーを設  定する。 アンカーとして指定された識別子(ID)を要素"a"などで指定するジャンプ先のURIの後 に付与することで、継続メディアオブジェクトやエージェント発話の途中へのジャンプなどが 可能になる。 [要素属性] 要素"anchor"は以下の属性を持つことができる: id     2章で定義。 この属性は要素"anchor"では省略不可である。 title     3.3.1章で定義。 begin     メディアオブジェクトの時間的な一部分にアンカーを設定するために使用する。 アンカーを設定する親オブジェクトの開始時刻からの明示遅れ時間を指定する。     時間指定の書式は4.3.4章に定義。 region IDREF型の属性値を持ち、リージョン、もしくはメディアオブジェクト等の識別値を 参照し、空間的な一部分にアンカーを設定することができる。 location 親要素の空間的な一部分にアンカーを設定するために使用する。 書式は3.3.1章に定義。 [要素内容] 要素"anchor"は空要素である。 [使用例] [例1]アンカー設定(時間的な箇所に) エージェントの発話の途中にアンカーを付与する: この部分の文章は他からanchor1にジャンプして来た場合には発話されません。  ここから発話されます。 [例2]アンカー付与(空間的な箇所に) imageの様々な箇所にアンカーを設定。move等の対象とすることができる: ◆5.文書型定義 ◇5.1 XMLとの関係 MPML1.0ドキュメントはDTD(Document Type Definition)と呼ばれる文書型定義 を持つ。MPMLの文書型は公式に認可されたわけではないので、ネットワーク経由もしく はローカルにdtdファイルを参照する必要がある。以下のようにdtdファイルが置かれ たURIを参照されたい。 ◇5.2 DTD ■References "Extensible Markup Language (XML) 1.0", T.Bray, J.Paoli, C.M.Sperberg-McQueen, editors, 10 February 1998. Available at http://www.w3.org/TR/REC-xml/ "Synchronized Multimedia Integration Language (SMIL) 1.0 Specification ", Philipp Hoschka, W3C, editor, 15 June 1998. Available at http://www.w3.org/TR/REC-smil/