]> granicus.if.org Git - docbook-dsssl/commitdiff
Support alt text on mediaobjectco
authorNorman Walsh <ndw@nwalsh.com>
Tue, 31 Dec 2002 20:27:42 +0000 (20:27 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 31 Dec 2002 20:27:42 +0000 (20:27 +0000)
xsl/html/graphics.xsl

index aa5924f2941f00a08f8ece668d95857aa350698a..e686060e8eec6cb9e33cb56a87391d7c2db1c602 100644 (file)
@@ -899,9 +899,13 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
         </xsl:call-template>
       </xsl:variable>
 
+      <xsl:variable name="phrases"
+                    select="ancestor::mediaobject/textobject[phrase]
+                            |ancestor::mediaobjectco/textobject[phrase]"/>
+
       <xsl:call-template name="process.image">
         <xsl:with-param name="alt">
-          <xsl:apply-templates select="(../../textobject[not(@role) or @role!='tex']/phrase)[1]"/>
+          <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
         </xsl:with-param>
         <xsl:with-param name="longdesc">
           <xsl:call-template name="write.longdesc">