Shaun McCance
shaunm@gnome.org 2008-2009
Fügen Sie ein Bild-, Video- oder sonstiges Multimediaobjekt ein.

# Multimedia-Objekte

    mal_block_media = element media {
      attribute type { "image" | "video" | "audio" | "application" } ?,
      attribute mime { text } ?,
      attribute src { text },
      attribute height { text } ?,
      attribute width { text } ?,
      attribute style { xsd:NMTOKENS } ?,
      attribute * - (mal:* | local:*) { text } *,

      mal_block *
    }

Use the `media` element to insert an image, video, or other multimedia object into your document. Since not all display tools will be able to display all types of objects, you can provide fallback elements in the contents of a `media` element. See for details on how fallback elements are handled.

# Anmerkungen

The `media` element can contain any general block content. The content is only used as a fallback or alternative.

The `media` element can occur in any general block context, including inside pages, sections, and certain block elements.

The `style` attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

The `mime` attribute takes a valid MIME type for the object that is being inserted.

The `media` element can have attributes from external namespaces. See for more information on external-namespace attributes.

The `media` element may also be used in an inline context. See for more information.

# Beispiele

Use `media` to insert an image into your document:

<media type="image" mime="image/png" src="figures/mallard.png"> <p>Drake, the Mallard mascot</p> </media>

Drake, das Maskottchen von Mallard

# Processing Expectations

When a `media` element occurs in a block context, it should be displayed as a block element. The exact rendering of a `media` element will depend on the `type` and `mime` attributes. Display tools may need to add controls for audio and video objects.

The `application` type is intended for embedding interactive applications in documents. There are currently no specific recommendations for displaying application objects. Behavior may vary according to the type of application being embedded.

Some display tools will not be able to display all types of objects. For example, a printed document will not be able to display video or play back audio. Even when a display tool can display the type of object, it may not be able to work with the given MIME type for technical or other reasons.

When a display tool cannot display a `media` element, it should display the child elements of the element, as if the `media` element itself were replaced by its children. The child elements may consist of simply another `media` element referencing a different type of content. When processing any child `media` elements, display tools may need to fall back further to their child elements.

Frequently, the children of a `media` element will be a single block element, such as another `media` element or a `p` element. Note, however, that this is not required, and fallback rendering may involve displaying several block elements.

In some display media, multimedia objects can have alternate text. This may be displayed when a user hovers over the object, or it may be provided to assistive technologies. When displaying in such a medium, display tools should extract the text value of a `media` element by processing its child elements, and recursively processing any child `media` elements, as if it can not display any types of `media` elements.

# Vergleich mit anderen Formaten

The `media` element can be used in place of the DocBook elements `audioobject`, `imageobject`, and `videoobject`. DocBook uses the `mediaobject` element to provide alternative objects. In Mallard, alternative objects are nested, obviating the need for a container element.