]> granicus.if.org Git - docbook-dsssl/commitdiff
Output anchors for images that have IDs
authorNorman Walsh <ndw@nwalsh.com>
Wed, 1 Aug 2001 00:52:24 +0000 (00:52 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 1 Aug 2001 00:52:24 +0000 (00:52 +0000)
xsl/html/graphics.xsl

index b3c0c1b61aa7d6a323672aa7ab51462e85236b9a..d49c10e4f805f16058bcdcbc642e7e86443e6592 100644 (file)
 
 <xsl:template match="graphic">
   <p>
+    <xsl:if test="@id">
+      <a name="{@id}"/>
+    </xsl:if>
     <xsl:call-template name="process.image"/>
   </p>
 </xsl:template>
     </xsl:choose>
   </xsl:variable>
 
+  <xsl:if test="@id">
+    <a name="{@id}"/>
+  </xsl:if>
+
   <xsl:choose>
     <xsl:when test="@format='linespecific'">
       <xsl:choose>
 
 <xsl:template match="mediaobject|mediaobjectco">
   <div class="{name(.)}">
+    <xsl:if test="@id">
+      <a name="{@id}"/>
+    </xsl:if>
     <xsl:call-template name="select.mediaobject"/>
     <xsl:apply-templates select="caption"/>
   </div>
 
 <xsl:template match="inlinemediaobject">
   <span class="{name(.)}">
+    <xsl:if test="@id">
+      <a name="{@id}"/>
+    </xsl:if>
     <xsl:call-template name="select.mediaobject"/>
   </span>
 </xsl:template>
 <!-- ==================================================================== -->
 
 <xsl:template match="imageobjectco">
+  <xsl:if test="@id">
+    <a name="{@id}"/>
+  </xsl:if>
   <xsl:apply-templates select="imageobject"/>
   <xsl:apply-templates select="calloutlist"/>
 </xsl:template>