]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug #1359008. If a mediaobject contains only one object, use it
authorBob Stayton <bobs@sagehill.net>
Wed, 8 Feb 2006 22:26:06 +0000 (22:26 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 8 Feb 2006 22:26:06 +0000 (22:26 +0000)
even if it is only a textobject.

xsl/common/common.xsl

index 062fd3d90d83d9b796d2896bbfe22d9558455e8d..b36c84552455d2c99056fb9f5a51d094efbbb502 100644 (file)
@@ -963,6 +963,12 @@ recursive process.</para>
         </xsl:if>
       </xsl:for-each>
     </xsl:when>
+
+    <!-- If no selection by role, and there is only one object, use it -->
+    <xsl:when test="count($olist) = 1 and $count = 1">
+      <xsl:value-of select="$count"/> 
+    </xsl:when>
+
     <xsl:otherwise>
       <!-- Otherwise select first acceptable object -->
       <xsl:if test="$count &lt;= count($olist)">