]> granicus.if.org Git - docbook-dsssl/commitdiff
Make viewport layout table compatible with html5.
authorBob Stayton <bobs@sagehill.net>
Sat, 12 May 2012 23:46:35 +0000 (23:46 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 12 May 2012 23:46:35 +0000 (23:46 +0000)
xsl/html/graphics.xsl

index f8bc792fb72242b48e60a616e3ada6849c728065..127a4d0fa8b3ef24eb1a03962ca3c23539f91cdf 100644 (file)
@@ -690,8 +690,13 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
   <xsl:choose>
     <xsl:when test="$use.viewport">
-      <table border="0" summary="manufactured viewport for HTML img"
-             cellspacing="0" cellpadding="0">
+      <table border="{$table.border.off}">
+        <xsl:if test="$div.element != 'section'">
+          <xsl:attribute name="summary">manufactured viewport for HTML img</xsl:attribute>
+        </xsl:if>
+        <xsl:if test="$css.decoration != ''">
+          <xsl:attribute name="style">cellpadding: 0; cellspacing: 0;</xsl:attribute>
+        </xsl:if>
         <xsl:if test="$html.width != ''">
           <xsl:attribute name="width">
             <xsl:value-of select="$html.width"/>