--- /dev/null
+<refentry id="preferred.mediaobject.role">
+<refmeta>
+<refentrytitle>preferred.mediaobject.role</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>preferred.mediaobject.role</refname>
+<refpurpose>Select which mediaobject to use based on
+this value of an object's <sgmltag class="attribute">role</sgmltag> attribute.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='preferred.mediaobject.role.frag'>
+<xsl:param name="preferred.mediaobject.role"></xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A mediaobject may contain several objects such as imageobjects.
+If the parameter <parameter>use.role.for.mediaobject</parameter>
+is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used. If one of the objects has a role value that matches the
+preferred.mediaobject.role parameter, then it has first
+priority for selection. If more than one has such a
+role value, the first one is used.
+</para>
+<para>
+See the <parameter>use.role.for.mediaobject</parameter> parameter
+for the sequence of selection.
+</refsect1>
+</refentry>
--- /dev/null
+<refentry id="use.role.for.mediaobject">
+<refmeta>
+<refentrytitle>use.role.for.mediaobject</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.for.mediaobject</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute
+value for selecting which of several objects within a mediaobject to use.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='use.role.for.mediaobject.frag'>
+<xsl:param name="use.role.for.mediaobject" select="1"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.
+</para>
+<para>
+The order of selection when then parameter is non-zero is:
+</para>
+<orderedlist>
+<listitem>
+ <para>If the stylesheet parameter <parameter>preferred.mediaojbect.role</parameter> has a value, then the object whose role equals that value is selected.</para>
+</listitem>
+<listitem>
+<para>Else if an object's role attribute has a value of
+<literal>html</literal> for HTML processing or
+<literal>fo</literal> for FO output, then the first
+of such objects is selected.
+</para>
+</listitem>
+<listitem>
+<para>Else the first suitable object is selected.</para>
+</listitem>
+</orderedlist>
+<para>
+If the value of
+<parameter>use.role.for.mediaobject</parameter>
+is zero, then role attributes are not considered
+and the first suitable object
+with or without a role value is used.
+</para>
+</refsect1>
+</refentry>