Schema Documentation - DIAGRAM Description Profile
version 1.0

The phrase variant of the description element

On this page:

The description element represents an alternate accessible description of an image, video, table, etc.

The description element can either contain the text content of the description or reference an external file in which it can be found via the xlink:href attribute. It is not permitted to mix both methods, however.

To ensure the description can be rendered, the description element must not include descendant elements and attributes that require a description.

Allowed parents

object

Allowed children

This element may contain text.

This element may contain the following children: abbr, annoref, annotation, char, citation, code, d, definition, emph (phrase variant), emph (text variant), expansion, rend:linebreak, ln, name, note, noteref, num, object (phrase variant), object (text variant), quote, ref, s, span (phrase variant), span (text variant), sub, sup, term, time and w

Content model and additional requirements

required attributes: @ref
optionally
an optional @xlink:type
an optional @xlink:title
an optional @xlink:show
an optional @xlink:actuate
a choice of
either no content
or
one or more of
a choice of
or text
end of choice
end of choice
Note that in addition to restrictions presented in the content model above, use of this element must also respect the following requirements:
  • The description element must either contain text data or point to an external resource using the xlink:href attribute.
  • The description element must not contain text data and also point to an external resource using the xlink:href attribute.
  • The description element must not contain descendant description elements.
  • The description element must not contain descendant object elements.
  • The description element must not contain descendant table elements.
  • The description element must not contain descendant elements from the MathML feature grammar.
  • Every description element must be referenced by at least one element in the document.
  • The object element may contain only one child description.
  • description elements cannot be nested inside the children of an object element.
  • A single description element must be the only child of an object element when used.
Such requirements take precedence over any conflicting statements in the content model or in the lists above of allowed children and parents.

Variants

This element exists in 3 variants. The other 2 variants are:

Namespace

http://www.daisy.org/ns/z3998/authoring/

Usage Details

The description element can be used in one of two ways:

  1. as a direct container for the descriptive text:

    <description by="republisher" xml:id="mouse-desc">
                <p>A picture of a small, grey mouse.</p>
    </description>
                    
  2. as a pointer to an external description:

    <description by="republisher" xml:id="mouse-desc2" xlink:href="mouse-desc.xml" />
                    

An element may point to more than one description so long as each description has a unique role attribute value.

A single description element can be the child of an object to provide its accessible description. In this case, an implicit association is made between the two elements (i.e., the desc attribute does not need to be used:

            <object src="mouse.png">
                <description by="republisher" xlink:href="mouse-desc.xml" />
            </object>
        

If an object element contains text or other elements as its children, an implicit description is assumed. In the absence of the container element, the object's children represent an implied content description added by an author. The following examples are functionally identical, but highlight the various implicit elements and attributes:

            <object src="mouse.png">
                <p>A small mouse...</p>
            </object>
            
            <object src="mouse.png">
                <description>
                    <p>A small mouse...</p>
                </description>
            </object>
            
            <object src="mouse.png">
                <description by="author">
                    <p>A small mouse...</p>
                </description>
            </object>
            
            <object src="mouse.png">
                <description by="author" role="content">
                    <p>A small mouse...</p>
                </description>
            </object>
            
            <object src="mouse.png" desc="mouse-desc">
                <description xml:id="mouse-descrip" by="author" role="content">
                    <p>A small mouse...</p>
                </description>
            </object>
        

The Content Selection feature can additionally be used to tailor the type of description to the output format being generated:

            <sel:select>
                <sel:when expr="target:format('BRAILLE')">
                    <description sel:selid="mouse-desc" by="republisher" xlink:href="mouse-braille-desc.xml" />
                </sel:when>
                <sel:otherwise>
                    <description sel:selid="mouse-desc" by="republisher" xlink:href="mouse-desc.xml" />
                </sel:otherwise>
            </sel:select>
        

As each condition in the sel:select contains the same description element but corresponding to a different output, they cannot each have the same xml:id. The sel:selid attribute is instead attached to each description. After the select condition has been evaluated, the remaining sel:selid is converted back to an xml:id.