Documentation Tools

Changeset 256


Ignore:
Timestamp:
12/07/07 10:29:05 (4 years ago)
Author:
kate
Message:

Added overrides for HTML tables, which were output under the default namespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xsl/xhtml/sanitize.xsl

    r240 r256  
    398398        </xsl:template> 
    399399 
     400        <!-- 
     401                Overriding formal.xsl to introduce the xhtml namespace for <table>. 
     402                The stylesheets (particularly htmltbl.xsl) copy through these 
     403                nodes as-is, but omit their namespaces. 
     404        --> 
     405 
     406        <xsl:template match="table"> 
     407                <xsl:choose> 
     408                        <xsl:when test="tgroup|mediaobject|graphic"> 
     409                                <xsl:call-template name="calsTable"/> 
     410                        </xsl:when> 
     411                        <xsl:otherwise> 
     412                                <table> 
     413                                        <xsl:copy-of select="@*[not(local-name()='id')]"/> 
     414                                        <xsl:attribute name="id"> 
     415                                                <xsl:call-template name="object.id"/> 
     416                                        </xsl:attribute> 
     417                                        <xsl:call-template name="htmlTable"/> 
     418                                </table> 
     419                        </xsl:otherwise> 
     420                </xsl:choose> 
     421        </xsl:template> 
     422 
     423        <xsl:template match="tr" mode="htmlTable"> 
     424                <tr> 
     425                        <xsl:apply-templates mode="htmlTable"/> 
     426                </tr> 
     427        </xsl:template> 
     428 
     429        <xsl:template match="th" mode="htmlTable"> 
     430                <th> 
     431                        <xsl:apply-templates mode="htmlTable"/> 
     432                </th> 
     433        </xsl:template> 
     434 
     435        <xsl:template match="td" mode="htmlTable"> 
     436                <td> 
     437                        <xsl:apply-templates mode="htmlTable"/> 
     438                </td> 
     439        </xsl:template> 
     440 
    400441</xsl:stylesheet> 
    401442 
Note: See TracChangeset for help on using the changeset viewer.