<object>
The DITA <object>
element corresponds to
the HTML <object>
element, and the attribute
semantics derive from the HTML definitions. Because of this, the
@type
attribute on <object>
differs from the @type
attribute on many other DITA
elements.
Usage information
The <object>
element enables authors
to include animated images, applets, plug-ins, video clips, and
other multimedia objects in a topic.
Rendering expectations
@height
and
@width
attributes. The following expectations apply:- If a height value is specified and no width value is specified, processors SHOULD scale the width by the same factor as the height.
- If a width value is specified and no height value is specified, processors SHOULD scale the height 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.
When an object cannot be rendered in a meaningful way, processors SHOULD present the contents of the
<fallback>
element, if it is present.
Content model
<desc>
?,
<longdescref>
?,
<fallback>
?,
<param>
*,
<foreign>
*
- Optional
<desc>
- Optional
<longdescref>
- Optional
<fallback>
- Zero or more
<param>
- Zero or more
<foreign>
Attributes
The following attributes are available on this element: universal attributes and the attributes defined below.
@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 document
containing the
<object>
element. If this attribute is set, the@type
attribute should also be set. @datakeyref
- Provides a key reference to the object. 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. If
@data
is specified, it is used as a fallback when the key cannot be resolved to a resource. @height
- Specifies the vertical dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
@name
- Defines a unique name for the object.
@tabindex
- Specifies the position of the object in tabbing order.
@type
- Indicates the content type (MIME type) for the data specified by the
@data
or@datakeyref
attribute. This attribute should be set when the@data
attribute is set to avoid loading unsupported content types. Note that this differs from the@type
attribute on many other DITA elements (it specifies a MIME type rather than a content type). If@type
is not specified, the effective type value for the key named by the@datakeyref
attribute is used as the this attribute's value. @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.
@width
- Specifies the horizontal dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
The following attributes are available on this element: universal attributes and the attributes defined below.
@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 document
containing the
<object>
element. If this attribute is set, the@type
attribute should also be set. @datakeyref
- Provides a key reference to the object. 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. If
@data
is specified, it is used as a fallback when the key cannot be resolved to a resource. @height
- Specifies the vertical dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
@name
- Defines a unique name for the object.
@tabindex
- Specifies the position of the object in tabbing order.
@type
- Indicates the content type (MIME type) for the data specified by the
@data
or@datakeyref
attribute. This attribute should be set when the@data
attribute is set to avoid loading unsupported content types. Note that this differs from the@type
attribute on many other DITA elements (it specifies a MIME type rather than a content type). If@type
is not specified, the effective type value for the key named by the@datakeyref
attribute is used as the this attribute's value. @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.
@width
- Specifies the horizontal dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
Example
This section is non-normative.
This section contains examples of how the
<object>
element can be used.