3.2.2.25 <object>
The DITA <object> element corresponds to the
HTML <object> element, and attribute semantics derive from their
HTML definitions. For example, the @type attribute differs from the
@type attribute on many other DITA elements.
The <object> element enables authors to include animated images, applets,
plug-ins, ActiveX controls, video clips, and other multimedia objects in a
topic.
Content models
See appendix for information about this element in OASIS document type shells.
Inheritance
- topic/object
Example
Output processors might need to modify data in order to enable compatible function across various browsers, so these examples are only representative:
<p>Cutting the keys from the system unit:</p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,0,0"
data="cutkey370.swf"
type="application/x-shockwave-flash"
height="280"
width="370"
id="cutkey370">
<desc>A description of the task</desc>
<param name="movie" value="cutkey370.swf"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#FFFFFF"/>
</object>
<p>What's EIM?</p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,0,0"
data="eim.swf"
height="400"
width="500"
id="eim">
<desc>Some great, glorious info</desc>
<param name="movie" value="eim.swf"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="pluginspace"
value="http://www.macromedia.com/go/getflashplayer"/>
</object>
<param> elements
<object
id="E5123_026.mp4"
width="300"
height="300">
<param name="poster"
keyref="E5123_026_poster"
/>
<param name="source"
keyref="E5123_026_video"
/>
</object>
<map>
<!-- ... -->
<keydef keys="E5123_026_poster"
href="../images/E5123_026_poster.png"
type="video/mp4"
/>
<keydef keys="E5123_026_video"
href="../media/E5123_026_poster.mp4"
type="video/mp4"
/>
<!-- ... -->
</map>
@data value
<object
classidkeyref="video_classid"
codebasekeyref="video_codebase"
datakeyref="cutkey370"
height="280"
width="370"
id="cutkey370">
<desc>A description of the task</desc>
<param name="movie" keyref="cutkey370"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#FFFFFF"/>
</object>
<map>
<!-- ... -->
<!-- NOTE: Using @scope="external" because
the class ID is a URI that is not intended to
be directly resolved.
-->
<keydef keys="video_classid"
href="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
scope="external"
/>
<!-- NOTE: Using @scope="external" to avoid systems trying to
download this file when they don't need to.
-->
<keydef keys="video_codebase"
href="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,0,0"
format="shockwave"
scope="external"
/>
<!-- Using @scope="external" here because the referenced URL
is not intended to be resolved in isolation but relative
to the codebase URI.
-->
<keydef keys="cutkey370"
href="cutkey370.swf"
type="application/x-shockwave-flash"
scope="external"
/>
<!-- ... -->
</map>
Attributes
The following attributes are available on this element: Universal attribute group , outputclass, and the attributes defined below.
-
@archive - Specifies a space-separated list of URIs indicating resources needed by the
object. These resources might include those
URIs specified by the
@classidand@dataattributes. Preloading these resources usually results in faster loadtimes for objects. The URIs in the list should be relative to the URI specified in the@codebaseattribute. -
@archivekeyrefs - Key references to one or more archives, as for
@archive. The value is a space-separated list of key names. Each resolvable key reference is treated as a URI as though it had been specified on the@archiveattribute. When specified, and at least one key name is resolvable, the key-provided archive list is used. If@archiveis specified, it is used as a fallback when no key names can be resolved to a URI. -
@classid - Contains a URI that specifies the location of an object's
implementation. It can be used together with the
@dataattribute which is specified relative to the value of the@codebaseattribute. -
@classidkeyref - Key reference to the URI that specifies the location of an object's implementation, as for
@classid. When specified, and the key is resolvable, the key-provided class ID URI is used. If@classidis specified, it is used as a fallback when the key cannot be resolved to a URI. -
@codebase - Specifies the base URI used for resolving the relative URI values given for
@classid,@data, and@archiveattributes. If@codebaseis not set, the default is the base URI of the current element. -
@codebasekeyref - Key reference to the base URI used for resolving other attributes, as for
@codebase. When specified, and the key is resolvable, the key-provided code base URI is used. If@codebaseis specified, it is used as a fallback if the key cannot be resolved to a URI. If no URI results from processing@codebasekeyrefand@codebaseis not specified, the default is the base URL of the current element. -
@data - Contains a reference to the location of an object's data. If this
attribute is a relative URL, it is specified relative to the value of the
@codebaseattribute. If this attribute is set, the@typeattribute should also be set. -
@datakeyref - Key reference to the location of an object's data, as for
@data. When specified and the key is resolvable, the key-provided URI is used. A key that has no associated resource, only link text, is considered to be unresolved for the purpose of the@datakeyrefattribute. If@datais specified, it is used as a fallback when the key cannot be resolved to a resource. -
@declare - When this attribute is set to "declare", the current object definition is a declaration only. The object must be instantiated by a later nested object definition referring to this declaration. The only allowable value is "declare".
-
@type - Indicates the content type (MIME type) for the data specified by the
@dataor@datakeyrefattribute. This attribute should be set when the@dataattribute is set to avoid loading unsupported content types. Note that this differs from the@typeattribute on many other DITA elements (it specifies a MIME type rather than a content type). If@typeis not specified, the effective type value for the key named by the@datakeyrefattribute is used as the this attribute's value. -
@standby - Contains a message to be displayed while an object is loading.
-
@height - Indicates the vertical dimension for the resulting object display. If necessary, the object is scaled to the specified size. The value of this attribute is a real number (expressed in decimal notation) optionally followed by a unit of measure from the set of pc, pt, px, in, cm, mm, em (picas, points, pixels, inches, centimeters, millimeters, and ems respectively). The default unit is px (pixels). Possible values include: "5", "5in", and "10.5cm". If a height value is specified and no width value is specified, the width will be scaled by the same factor as the height. If both a height value and width value are specified, implementations MAY ignore one of the two values when they are unable to scale to each direction using different factors.
-
@width - Indicates the horizontal dimension for the resulting object display. If necessary, the object is scaled to the specified size. The value of this attribute is a real number (expressed in decimal notation) optionally followed by a unit of measure from the set of pc, pt, px, in, cm, mm, em (picas, points, pixels, inches, centimeters, millimeters, and ems respectively). The default unit is px (pixels). Possible values include: "5", "5in", and "10.5cm". If a width value is specified and no height value is specified, the height will be scaled by the same factor as the width. If both a height value and width value are specified, implementations MAY ignore one of the two values when they are unable to scale to each direction using different factors.
-
@usemap - Indicates that a client-side image map is to be used. An image map specifies active geometric regions of an included object and assigns a link to each region. When a link is selected, a document might be retrieved or a program might run on the server.
-
@name - Defines a unique name for the object.
-
@tabindex - Position the object in tabbing order.
-
@longdescref(DEPRECATED) - A reference to a textual description of the graphic or object. This attribute supports creating accessible content. See The href attribute for detailed information on supported values and processing implications. For examples of how this attribute is used in output, see this topic on long descriptions. NOTE: This attribute is deprecated in favor of the longdescref subelement to this element.