select.mediaobject.index
select.mediaobject.index — Selects the position of the appropriate media object from a list
Synopsis
<xsl:template name="select.mediaobject.index">
<xsl:param name="olist" select="d:imageobject|d:imageobjectco |d:videoobject|d:audioobject|d:textobject"/>
<xsl:param name="count">1</xsl:param>
...
</xsl:template>
Description
This template takes a list of media objects (usually the
children of a mediaobject or inlinemediaobject) and determines
the "right" object. It returns the position of that object
to be used by the calling template.
If the parameter use.role.for.mediaobject
is nonzero, then it first checks for an object with
a role attribute of the appropriate value. It takes the first
of those. Otherwise, it takes the first acceptable object
through a recursive pass through the list.
This template relies on a template named "is.acceptable.mediaobject"
to determine if a given object is an acceptable graphic. The semantics
of media objects is that the first acceptable graphic should be used.
If no acceptable object is located, no index is returned.
Parameters
- olist
The node list of potential objects to examine.
- count
The position in the list currently being considered by the
recursive process.
Returns
Returns the position in the original list of the selected object.