previous   next   contents  

21. SMIL 3.0 smilText Profile

Editors
Dick Bulterman, CWI
Sjoerd Mullender, CWI
Eric Hyche, RealNetworks

Table of contents

21.1 Overview and Summary of Changes for SMIL 3.0

This section is informative.

The SMIL 3.0 smilText profile is a new profile introduced in SMIL 3.0. It was not part of the SMIL 2.1.

21.2 Abstract

This section is normative.

The SMIL 3.0 smilText profile is a collection of SMIL 3.0 modules that provide support for the specification of an external streaming text container. This container allows the functionality of the SMIL 3.0 smilText modules to be referenced outside of the content of a SMIL file.

This profile is suitable for systems which require simple streaming timed text. A separate smilText rendering engine will be required to process documents defined using this profile. In many cases, SMIL 3.0 engines will provide this capability, but other stand-alone implementations may also be developed.

21.3 Introduction to the SMIL 3.0 smilText Profile

This section is informative.

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

The smilText profile design requirements are:

  1. Provide an external container format for smilText markup.
  2. Ensure that the profile is a proper subset of the in-line processing of smilText as supported by the SMIL 3.0 Language Profile.

Examples of use cases for this profile are SMIL rendering engines, plus stand-alone media players that wish to support a simple, streamable timed-text format.

21.4 Normative Definition of the smilText Profile

This section is normative.

Within this profile specification, the term smilText profile will be considered to refer exclusively to the SMIL 3.0 smilText profile as defined in this document.

21.4.1 SMIL 3.0 smilText Profile Conformance

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

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

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

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

The smilText profile specifies additional rules for smilText profile, document and user-agent conformance. It also specifies the elements and attribute values, plus any restrictions, required to support the smilText profile. This section provides a normative definition of these three aspects.

The smilText profile is not a SMIL host-language conformant profile. The smilText profile does not support extension using the SMIL 3.0 Scalability Framework.

21.4.2 Document Conformance

This version of the smilText profile provides a definition of strictly conforming external smilText 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 rule must be obeyed:

An external smilText document is a conforming smilText profile document if it adheres to the specification of the SMIL 3.0 smilText profile definition. A conforming smilText profile document must meet all of the following criteria:

  1. The root element of the smilText profile document MUST be the smilText element.
  2. The smilText profile document MUST be well-formed XML.
  3. The smilText profile document MUST conform to the following W3C Recommendations:
    • The XML 1.1 specification (Extensible Markup Language (XML) 1.1) [XML11].
    • Namespaces in XML [XML-NS]. Full XML Namespaces must be supported.
    • Any use of CSS styles and properties shall conform to Cascading Style Sheets, level 2 CSS2 Specification [CSS2].
  4. A smilText profile document MUST reference the SMIL 3.0 default namespace:
    xmlns="http://www.w3.org/ns/SMIL"
    The default namespace name will be reused in any update of SMIL 3.0 which is made for the purpose of clarification or bug fixes. These changes will be minor in that they do not (a) change the meaning of existing documents written using the namespace, or (b) affect the operation of existing software written to process such documents. The SYMM working group MAY reuse this namespace URI in a future specification that revises the SMIL 3.0 DTD, thus affecting the validity of published documents.
  5. A smilText profile document MAY contain the following DOCTYPE declaration:
    <!DOCTYPE smilText PUBLIC "-//W3C//DTD SMIL 3.0 smilText//EN"
    "http://www.w3.org/2008/SMIL30/SMIL30smilText.dtd">
    The DTD referenced in the DOCTYPE declaration will, among other things, define default values for the language version number and the base profile name associated with the DTD. If a document contains a DOCTYPE declaration, it must be a valid XML document. Note that this implies that extensions to the syntax defined in the DTD are not allowed. A document is a conforming smilText profile document if it satisfies the requirements of the smilText profile specification and is valid per the normative DTD identified by the profile. As per section 7.6 of the W3C Process Document, W3C will make every effort to make this normative DTD available in its original form at this URI. The SYMM WG also publishes a non-normative DTD identified by:
    http://www.w3.org/2008/SMIL30/SMIL30smilText.dtd
    The SYMM WG plans to make changes to this DTD over time to correct errata. If you choose to refer to this DTD, please note that it is subject to change without notice at any time. The SYMM WG MAY publish a normative "snapshot" of the corrected DTD at a new URI by following the W3C Process for modifying a Recommendation. Individuals are free to use either of the two URIs above as the system identifier in the smilText profile's DOCTYPE, according to the desired level of stability.
  6. A smilText profile document MAY declare a version number and base profile by using the version and baseProfile attributes on the smilText root element. If a DOCTYPE declaration is present, the version and base profiles defined must match those in the profile DTD. If a DOCTYPE declaration containing a valid SMIL profile DTD is not given and if no version attribute is specified, version 3.0 will be used. If a DOCTYPE declaration containing a valid SMIL profile DTD is not given and if no baseProfile attribute is defined, the smilText base profile will be used.
  7. A smilText profile document MAY declare both an XML DOCTYPE declaration (as defined in [XML11]) and one or more XML namespace declarations (as defined in [XML-NS]). To be recognized as a smilText profile document by a conforming smilText profile user agent, the document MUST include the SMIL 3.0 namespace identifier as the default namespace on the <smilText> tag.
  8. Given that, as of this writing, DTDs have no way to describe the allowability of namespace-qualified extensions, and that extensions to smilText profile conformant documents must be namespace-qualified, here is the algorithm to be used to validate documents with extensions:
    • If all non-SMIL 3.0 namespace elements and attributes and all xmlns attributes which refer to non-SMIL 3.0 namespace elements are removed from the given document and if the appropriate <!DOCTYPE ... > statement which points to the smilText profile DTD is included, the result is a valid XML document.

Neither the smilText profile definition nor these conformance criteria provide designated size limits on any aspect of smilText profile content. There are no maximum values on the number of elements, the amount of character data, or the number of characters in attribute values.

Conforming SMIL 3.0 smilText Profile User Agents

A conforming smilText profile user agent is a program which can parse and process a smilText profile document and render the contents of the document onto output media. A conforming smilText profile user agent must meet all of the following criteria:

  1. In order to be consistent with the XML 1.1 Recommendation [XML11], the user agent MUST parse and evaluate a smilText profile document for well-formedness. If the user agent claims to be a validating user agent, it MUST also validate documents against the smilText profile DTD according to [XML11].
  2. When the user agent claims to support the functionality of the smilText profile through smilText profile elements and attributes and the semantics associated with these elements and attributes, it must do so in ways consistent with the smilText profile specification.
  3. The user agent must be able to successfully parse and process any conforming smilText profile document as specified by the relevant profile document, and support and correctly implement the semantics of all features of the smilText profile UNLESS a particular feature has been explicitly removed from the user agent.
  4. The XML parser of the user agent must be able to parse and process XML constructs defined in [XML11] and [XML-NS].
  5. Processing the default namespace on the smilText element will fall into one of three cases:
    1. The default namespace on the smilText root element is recognized by the user agent. The user agent should process the document as the version identified by the effective values of the version and baseProfile attributes. Any elements, attributes, or other syntax not defined by the default namespace on the smilText root element must be fully namespace qualified using standard XML mechanisms for declaring namespaces for elements and attributes described in [XML-NS], as further described in the section on Expanding/Restricting SMIL Profiles. Unqualified elements not part of the default namespace are illegal and must result in an error.
    2. The default namespace declaration on the smilText root element unrecognized. A smilText user agent will not recognize the document as any version of smilText and MUST issue an error.
  6. The user agent MUST support the following W3C Recommendations with regard to smilText profile content:
    • Complete support for the XML 1.1 specification (Extensible Markup Language (XML) 1.1) [XML11].
    • Complete support for inclusion of non-SMIL 3.0 namespaces within smilText profile content via Namespaces in XML [XML-NS]. A xmlns declaration or xmlns prefix declaration may be used on any element in the smilText profile document.
  7. The user agent MUST ignore namespace prefix qualified elements from unrecognized namespaces and MUST support the skip-content attributes. If no skip-content attributes are declared, the value of true is assumed.
  8. The user agent MUST ignore elements with unrecognized default namespace declarations and MUST support the skip-content attribute. If no skip-content attributes are declared, the value of true is assumed.
  9. The user agent MUST ignore attributes from the default namespace that are not otherwise supported by the smilText profile.
  10. The user agent MUST issue an error for an attribute value which does not conform to the syntax specified for that attribute.
  11. The detection of a syntax error in a smilText profile document MUST result in the user agent issuing an error and not playing the document.

21.4.3 Details of the SMIL 3.0 smilText Profile

The smilText profile supports the SMIL 3.0 smilText features for the presentation of basic timed text functionality. It uses only modules from the SMIL 3.0 Recommendation. The smilText profile includes the following SMIL 3.0 modules:

The collection names contained in the following table define the smilText 1.0 Profile vocabulary.

smilText Profile
Module Name Elements in Module
Identity None.
RequiredContentControl None.
BasicText smilText, tev, clear, br
TextStyling div, p, span, textStyle
TextMotion None.
Metainformation

In the following sections, we define the set of elements and attributes used in each of the modules included in the smilText 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 baseProfile 'smilText', version (3.0) '3.0', xml:base (CDATA) [XMLBase], xml:id (ID)
I18n its:dir (lro | ltr | rlo | rtl), its:locNote (CDATA), its:locNoteRef (CDATA), its:locNoteType (alert | description), its:term (no | yes), its:termInfoRef (CDATA), its:translate (no | yes), xml:lang (CDATA)

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

21.4.4 Identity Module

The smilText profile integrates the baseProfile and version attributes from the Identity module into the Core collection.

21.4.5 RequiredContentControl Module

The smilText profile integrates the systemRequired attribute from the RequiredContentControl module as an attribute of the smilText root element.

21.4.6 smilText Modules

The smilText Modules provide a light-weight method of defining timed text in an external container format. The smilText Modules section of SMIL 3.0 define semantics for the smilText, tev, clear, br, span, p, div, textStyle elements and their attributes. The smilText profile includes the smilText functionality of the BasicText, TextStyling, and TextMotion modules.

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

Text Module
Elements Attributes Content model
smilText Core, I18n, systemRequired, TextExternal, textAlign (center | end | inherit | left | right | start) 'inherit', textConceal (both | final | inherit | initial | none) 'inherit', textMode (append | crawl | inherit | jump | replace | scroll) 'inherit', textPlace (center | end | inherit | start) 'inherit', textRate 'auto', textWrapOption (inherit | noWrap | wrap) 'wrap', textWritingMode (inherit | lr | lr-tb | rl | rl-tb | tb-lr | tb-rl) 'inherit', (#PCDATA | | tev | clear | br | span | p | div)
tev Core, I18n, begin, next ()*
clear Core, I18n, begin, next ()*
br Core, I18n, ()*
div Core, I18n, TextAttributes, textAlign (center | end | inherit | left | right | start) 'inherit', textWrapOption (inherit | noWrap | wrap) 'wrap', textWritingMode (inherit | lr | lr-tb | rl | rl-tb | tb-lr | tb-rl) 'inherit' (#PCDATA | | tev | clear | br | div | p | span)
p Core, I18n, TextAttributes, textWrapOption (inherit | noWrap | wrap) 'wrap', textWritingMode (inherit | lr | lr-tb | rl | rl-tb | tb-lr | tb-rl) 'inherit' (#PCDATA | | tev | clear | br | span)
span Core, I18n, TextAttributes, textDirection (inherit | ltr | ltro | rtl | rtlo) 'inherit', textWrapOption (inherit | noWrap | wrap) 'wrap' (#PCDATA | | tev | clear | br | span)
textStyle Core, I18n, TextAttributes, textAlign (center | end | inherit | left | right | start) 'inherit', textConceal (both | final | inherit | initial | none) 'inherit', textDirection (inherit | ltr | ltro | rtl | rtlo) 'inherit', textMode (append | crawl | inherit | jump | replace | scroll) 'inherit', textPlace (center | end | inherit | start) 'inherit', textRate 'auto', textWrapOption (inherit | noWrap | wrap) 'wrap', textWritingMode (inherit | lr | lr-tb | rl | rl-tb | tb-lr | tb-rl) 'inherit' ()*
textStyling Core, I18n (()*, (textStyle, ()*)+)

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

Collection Name Attributes in Collection
TextAttributes textBackgroundColor 'transparent', textColor, textFontFamily 'inherit', textFontSize 'inherit', textFontStyle (inherit | italic | normal | oblique | reverseOblique) 'inherit', textFontWeight (bold | inherit | normal) 'inherit', textStyle, xml:space (default | preserve) 'default'

The smilText profile also integrates attribute definitions in the TextExternal attribute set from the BasicLayout module (backgroundColor 'transparent', height, and width) and the BasicTimeContainers module (dur). While these modules do not form a part of the smilText profile, the attributes used have the same meaning as in the referenced module specifications.

Collection Name Attributes in Collection
TextExternal version '1.0 (1.0)', backgroundColor 'transparent', height, width, dur

21.4.7 Metainformation Module

The Metainformation Module provides a framework for describing a document, either to inform the human user or to assist in automation. The Metainformation Module defines semantics for element. In addition, this module defines semantics for the label attribute. The smilText profile includes the Metainformation functionality of the Metainformation module.

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

Metainformation Module
Elements Attributes Content model
Core, I18n EMPTY

This profile adds the element to the content model of all of the elements in the profile, with the exception of the metadata element itself.

The content model of metadata is empty. Profiles that extend the smilText Profile may define their own content model of the metadata element.

21.5 Appendix A: SMIL 3.0 smilText Document Type Definition

This section is normative.

The SMIL 3.0 smilText 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.


previous   next   contents