-
Previous version:
-
http://www.w3.org/AudioVideo/Group/Linking/extended-linking-19990623
(W3C member only)
-
Editors:
- Lloyd Rutledge, CWI
(lloyd.rutledge@cwi.nl),
Philipp
Hoschka, W3C (ph@w3.org)
Table of Contents
The SMIL linking module defines the user-initiated hyperlink elements that
can be used in a SMIL document. It describes
-
How other documents can use XPointer to link into SMIL documents
-
How XPointer is used to reference document component referencing in certain
attributes in SMIL
-
How XLink is used for encoding hyperlinks
XPointer [XPTR] allows components of XML documents to
be addressed in terms of their placement in the XML structure rather than
on their unique identifiers. This allows referencing of any portion of an
XML document without having to modify that document. Without XPointer, pointing
within a document may require adding unique identifiers to it, or inserting
specific elements into the document, such as a named anchor in HTML. XPointers
are put within the fragment identifier part of a URI.
XLink (XML Linking Language) [XLINK] defines a set of
generic attributes that can be used when defining linking elements in an
XML-encoded language. Using these generic XLink attributes has the advantage
that users find the same syntactic constructs with the same semantics in
many XML-based languages, resulting in a faster learning curve. It also enables
generic link processors to process the hyperlinking semantics in XLink documents
without understanding the details of the DTD. For example, it allows users
of a generic XML browser to follow SMIL links.
Both XLink and XPointer are subject to change. At the time of this document's
writing, neither is a full W3C recommendation. This document is based on
the public Working Drafts ([XLINK],
[XPTR]). It will change when these two formats change.
SMIL 1.0 allowed authors to playing back a SMIL presentation at a particular
element rather than at the beginning by using a URI with a fragment identifier,
e.g. "doc#test", where "test" was the value of an element identifier in the
SMIL document "doc". This meant that only elements with an "id" attribute
could be the target of a link.
The SMIL Linking module defined in this specification allows using any element
in a SMIL document as target of a link. SMIL software must fully support
the use of XPointers for fragment identifiers in URIs pointing into SMIL
documents.
Example:
The following URI selects the 4th par element of an element called "bar":
http://www.w3.org/foo.smil#id("bar").child(4,par)
Note that XPointer only allows navigating in the XML document tree, i.e.
it does not actually understand the time structure of a SMIL document.
Error handling
When a link into a SMIL document contains an unresolvable XPointer ("dangling
link") because it identifies an element that is not actually part of the
document, SMIL software should ignore the XPointer, and start playback from
the beginning of the document.
When a link into a SMIL document contains an XPointer which identifies an
element that is the content of a "switch" element, SMIL software should interpret
this link as going to the parent "switch" element instead. The result of
the link traversal is thus to play the "switch" element child that passes
the usual switch child selection process.
The use of XPointer is not restricted to XLink attributes. Any attribute
specifying a URI can use an XPointer (unless, of course, prohibited for that
attributes document set).
XPointer can be used in various SMIL attributes which refer to XML components
in the same SMIL document or in external XML documents. These include
3.1 The a
Element
The "a" element has the same syntax and semantics as the SMIL 1.0 "a" element.
All SMIL 1.0 attributes can still be used. The following lists attributes
that are newly introduced by this specification, and attributes that are
extended with respect to SMIL 1.0:
-
actuate
-
The value of this XLink attribute is fixed to "user". This indicates that
traversal of this link is triggered by an external event, typically by user
interaction.
-
behavior
-
This XLink attribute controls the temporal
behavior of the presentation containing the link when the link is traversed.
It can have the following values:
-
"play": When the link is traversed, the
presentation containing the link continues playing.
-
"pause": When the link is traversed, the
presentation containing the link pauses. When the display of the destination
resource ends (@@ define what "end" means exactly: user closes display window
(is this an end event ?) OR continuous media object ends), the originating
presentation resumes playing.
-
"stop": When the link is traversed, the presentation containing the link
stops, i.e. it is reset to the beginning of the presentation. The termination
of the destination resource will not cause the originating presentation to
continue or restart.
The default value of the "behavior" attribute
depends on the value of the "show" attribute.
-
href
-
This XLink attribute is equivalent to the SMIL 1.0 "href" attribute.
-
inline
-
The value of this attribute is fixed to "true" (since the content of the
"a" element is the local resource of the link).
-
sourceVolume
-
This attribute sets the volume of audio media
objects in the presentation containing the link when the link is followed.
Ignored if the presentation does not contain audio media objects. This attribute
can have the same
values as the "volume"
property in CSS2. [CSS2]
-
destinationVolume
-
This attribute sets the volume of audio media
contained in the remote resource. Ignored if the remote resource does not
contain audio media. This attribute can have the same values as the "localVolume"
attribute.
-
destinationPlaystate
-
This attribute controls the temporal behavior
of the resource identified by the href attribute when the link is followed.
It only applies when this resource is a continuous media object. It can have
the same values as the "behavior" attribute.
-
show
-
This XLink attribute specifies how to handle
the current state of the presentation at the time in which the link is activated.
The following values are allowed:
-
"new": Semantics as defined in SMIL 1.0. In
SMIL 1.0, the presentation containing the link continues playing when a link
with show="new" is followed. As a refinement to SMIL 1.0, if both the
presentation containing the link and the remote resource contain audio media,
both are played in parallel.
This specification allows authors to change
the SMIL 1.0 behavior by setting the "behavior" attribute to a value other
than "play". To model the SMIL 1.0 behavior, the default value of
"behavior" is "play" when the "show" has the value "new".
-
"pause": Semantics as defined in SMIL 1.0.
Use of this value is deprecated in favor of the "behavior" attribute, since
it is not a legal value for "show" in XLink, and thus will not be
understood by generic XLink software.
To achieve SMIL 1.0 behavior, the "show" attribute
should be set to "new", and the "behavior" attribute should be set to
"pause".
-
"replace": Semantics as defined in SMIL 1.0.
In SMIL 1.0, the presentation containing the link pauses when a link with
show="replace" is followed.
This specification allows authors to change
the SMIL 1.0 behavior by setting the "behavior" attribute to a value other
than "play". To model the SMIL 1.0 behavior, the default value of
"behavior" is "pause" when the "show" has the value
"replace".
The default value of "show" is "replace".
-
tabindex
-
This attribute provides the same functionality as the "tabindex" attribute
in HTML 4.0 [HTML4]. It specifies the position of the
element in the tabbing order for the current document. The tabbing order
defines the order in which elements will receive focus when navigated by
the user via the keyboard. At any particular point in time, only elements
with an active timeline are taken into account for the tabbing order, and
inactive elements that are are ignored for the tabbing order.
-
target
-
This attribute defines either in which existing
display environment the link should be opened (e.g. a SMIL region, an HTML
frame or another named window), or triggers opening a new display environment.
Its value is the identifier of the display environment. If no currently active
display environment has this identifier, a new display environment is opened
and assigned the identifier of the target. When a presentation uses different
types of display environments (e.g. SMIL regions and HTML frames), the namespace
for identifiers is shared between these different types of display environments.
For example, one cannot use a "target" attribute with the value "foo" twice
in a document, and have it point once to an HTML frame, and then to a SMIL
region. If the element has both a "show" attribute and a "target" attribute,
the "show" attribute is ignored.
@@ linking into "excl" needs to be resolved
-
title
-
This XLink attribute provides human-readable text describing the link. It
has the same significance as in SMIL 1.0. It is now also recognized as the
XLink title attribute, whose semantics are consistent with that of the "title"
attribute in SMIL 1.0.
-
xml:link
-
The value of this XLink attribute is fixed to "simple". This establishes
the element as being an XLink simple link element. XLink processors will
recognize this attribute assignment and know to process this element as an
XLink simple link. Because the attribute is fixed in the DTD, it is not assigned
in any SMIL document instance, and authors need not be aware of its use.
All XLink attributes not mentioned in the list above are not allowed in SMIL.
Element Content
No changes to SMIL 1.0.
This element extends the syntax and semantics of the
HTML
4.0 "area" element with constructs required for timing. The SMIL 1.0
"anchor" element is deprecated in favor of "area".
The "area" element can have the attributes listed below, with the same
syntax and semantics as in HTML 4.0:
-
id
-
class
-
style
-
title
-
lang
-
dir
-
onclick
-
ondblclick
-
onmousedown
-
onmouseup
-
onmouseover
-
onmousemove
-
onmouseout
-
onkeypress
-
onkeydown
-
onkeyup
-
shape
-
coords
-
href
-
nohref
-
alt
-
accesskey
-
onfocus
-
onblur
The following lists attributes that are newly introduced by this specification,
and attributes that are extended with respect to HTML 4.0:
-
actuate
-
Defined in Section on "a" element.
-
begin
-
Defined in "SMIL Timing and Synchronization" module.
-
behavior
-
Defined in Section on "a" element.
-
inline
-
The value of this attribute is fixed to "false" ("area" element are out-of-line
links, since they do not element content, and thus do not have a local resource
as defined by XLink).
-
dur
-
Defined in "SMIL Timing and Synchronization" module.
-
end
-
Defined in "SMIL Timing and Synchronization" module.
-
sourceVolume
-
Defined in Section on "a" element.
-
destinationVolume
-
Defined in Section on "a" element.
-
destinationPlaystate
-
Defined in Section on "a" element.
-
show
-
Defined in Section on "a" element.
-
tabindex
-
Defined in Section on "a" element.
-
target
-
Defined in Section on "a" element.
-
title
-
Defined in Section on "a" element.
-
xml:link
-
If the "anchor" element contains an "href" attribute, this attribute must
be present, and set to "simple", if the "area" element should be interpreted
as an XLink. It must not be present if there is no "href" attribute.
(Explanation: SMIL uses "anchor" elements without href to e.g. allow jumping
into a video. However, an "area" element without href is not an Xlink. The
disadvantage is that in the case in which "anchor" is used to define a link,
it will have to have an explicit xml:link attribute (see examples below)).
Element Content
An "area" elements can contain "seq" and "par" elements for scheduling other
"area" elements over time.
-
seq
-
Defined in Timing module.
When used in the content of an "area" element, a "seq" element may only contain
"seq" and "par" elements, and none of the other elements that can be used
when a "seq" element is used outside of an "area" element.
-
par
-
Defined in Timing module.
When used in the content of an "area" element, a "par" element may only contain
"seq" and "par" elements, and none of the other elements that can be used
when a "par" element is used outside of an "area" element.
Examples
1) Decomposing a video into temporal segments
In the following example, the temporal structure of an interview in
a newscast (camera shot on interviewer asking a question followed by shot
on interviewed person answering ) is exposed by fragmentation:
<smil>
<body>
<video src="video" title="Tom Cruise interview 1995" >
<seq>
<area dur="20s" title="first question" />
<area dur="50s" title="first answer" />
</seq>
</video>
</body>
</smil>
2) Associating links with spatial segments In the following example,
the screen space taken up by a video clip is split into two sections. A different
link is associated with each of these sections.
<smil>
<body>
<video src="video" title="Tom Cruise interview 1995" >
<area shape="rect" coords="5,5,50,50"
title="Journalist" href="http://www.cnn.com" xml:link="simple" />
<area shape="rect" coords="5,60,50,50"
title="Tom Cruise" href="http://www.brando.com" xml:link="simple" />
</video>
</body>
</smil>
3) Associating links with temporal segments
In the following example, the duration of a
video clip is split into two sub-intervals. A different link is associated
with each of these sub-intervals.
<smil>
<body>
<video src="video" title="Tom Cruise interview 1995" >
<seq>
<area dur="20s" title="first question"
href="http://www.cnn.com" xml:link="simple" />
<area dur="50s" title="first answer"
href="http://www.brando.com" xml:link="simple" />
</seq>
</video>
</body>
</smil>
-
[CSS2]
-
Cascading Style Sheets, level 2 (CSS2) Specification 12 May 1998, Bert Bos,
Håkon Wium Lie, Chris Lilley and Ian Jacobs, editors, 12 May 1998.
Available at
http://www.w3.org/TR/REC-CSS2/
.
-
[HTML4]
-
"HTML 4.0 Specification", . Dave Raggett, Arnaud Le Hors and Ian Jacobs,
editors, 18 December 1997, revised 24 April 1998. Available at
http://www.w3.org/TR/REC-html40/.
-
[XPTR]
-
Eve Maler and Steve DeRose, editors. XML Pointer Language (XPointer) V1.0.
ArborText, Inso, and Brown University. Burlington, Seekonk, et al.:
World Wide Web Consortium, 1998. Available at
http://www.w3.org/TR/WD-xptr.
-
[XLINK]
-
Eve Maler and Steve DeRose, editors. XML Linking Language (XLink) V1.0.
ArborText, Inso, and Brown University. Burlington, Seekonk, et al.: World
Wide Web Consortium, 1998. Available at
http://www.w3.org/TR/WD-xlink.