<?xml version="1.0"?> <xsl:stylesheet exclude-result-prefixes="d" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" version="1.0"> <!-- ******************************************************************** $Id: htmltbl.xsl 9501 2012-07-16 00:14:50Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://docbook.sf.net/release/xsl/current/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template match="d:table" mode="htmlTable"> <xsl:element name="table" namespace=""> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> <xsl:call-template name="htmlTable"/> </xsl:element> </xsl:template> <xsl:template match="d:colgroup" mode="htmlTable"> <xsl:element name="{local-name()}" namespace=""> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> <xsl:apply-templates mode="htmlTable"/> </xsl:element> </xsl:template> <xsl:template match="d:col" mode="htmlTable"> <xsl:element name="{local-name()}" namespace=""> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> </xsl:element> </xsl:template> <!-- Handled by formal.object.title template --> <xsl:template match="d:caption" mode="htmlTable"/> <xsl:template match="d:tbody|d:thead|d:tfoot|d:tr" mode="htmlTable"> <xsl:element name="{local-name(.)}"> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> <xsl:apply-templates mode="htmlTable"/> </xsl:element> </xsl:template> <xsl:template match="d:th|d:td" mode="htmlTable"> <xsl:element name="{local-name(.)}"> <xsl:apply-templates select="@*" mode="htmlTableAtt"/> <xsl:apply-templates/> <!-- *not* mode=htmlTable --> </xsl:element> </xsl:template> <!-- don't copy through DocBook-specific attributes on HTML table markup --> <!-- default behavior is to not copy through because there are more DocBook attributes than HTML attributes --> <xsl:template mode="htmlTableAtt" match="@*"/> <!-- copy these through --> <xsl:template mode="htmlTableAtt" match="@abbr | @align | @axis | @bgcolor | @border | @cellpadding | @cellspacing | @char | @charoff | @class | @dir | @frame | @headers | @height | @lang | @nowrap | @onclick | @ondblclick | @onkeydown | @onkeypress | @onkeyup | @onmousedown | @onmousemove | @onmouseout | @onmouseover | @onmouseup | @rules | @style | @summary | @title | @valign | @valign | @width | @xml:lang"> <xsl:copy-of select="."/> </xsl:template> <xsl:template match="@span|@rowspan|@colspan" mode="htmlTableAtt"> <!-- No need to copy through the DTD's default value "1" of the attribute --> <xsl:if test="number(.) != 1"> <xsl:attribute name="{local-name(.)}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:if> </xsl:template> <!-- map floatstyle to HTML float values --> <xsl:template match="@floatstyle" mode="htmlTableAtt"> <xsl:attribute name="style"> <xsl:text>float: </xsl:text> <xsl:choose> <xsl:when test="contains(., 'left')">left</xsl:when> <xsl:when test="contains(., 'right')">right</xsl:when> <xsl:when test="contains(., 'start')"> <xsl:value-of select="$direction.align.start"/> </xsl:when> <xsl:when test="contains(., 'end')"> <xsl:value-of select="$direction.align.end"/> </xsl:when> <xsl:when test="contains(., 'inside')"> <xsl:value-of select="$direction.align.start"/> </xsl:when> <xsl:when test="contains(., 'outside')"> <xsl:value-of select="$direction.align.end"/> </xsl:when> <xsl:when test="contains(., 'before')">none</xsl:when> <xsl:when test="contains(., 'none')">none</xsl:when> </xsl:choose> <xsl:text>;</xsl:text> </xsl:attribute> </xsl:template> </xsl:stylesheet>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 26953 | Paul Allen | Move //guest/perforce_software/p4convert to //guest/perforce_software/p4convert/main | ||
//guest/perforce_software/p4convert/docs/docbook-xsl-ns-1.78.1/html/htmltbl.xsl | |||||
#2 | 14806 | Paul Allen | Update docs and add +w. | ||
#1 | 13920 | Paul Allen | copy part 2 (no errors) | ||
//guest/paul_allen/p4convert-maven/docs/docbook-xsl-ns-1.78.1/html/htmltbl.xsl | |||||
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/html/htmltbl.xsl | |||||
#1 | 12728 | eedwards |
Upgrade ANT doc build infrastructure to assemble PDFs: - remove non-namespaced DocBook source and add namespaced DocBook source. - add Apache FOP 1.1 - copy fonts, images, XSL into _build, establishing new asset structure. The original structure remains until all guides using it can be upgraded, and several other issues can be resolved. - updated build.xml to allow for per-target build properties. - upgraded the P4SAG to use the new infrastructure. - tweaked admonition presentation in PDFs to remove admonition graphics, and resemble closely the presentation used in the new HTML layout, including the same colors. With these changes, building PDFs involves using a shell, navigating into the guide's directory (just P4SAG for now), and executing "ant pdf". Issues still to be resolved: - PDF generation encounters several warnings about missing fonts (bold versions of Symbol and ZapfDingbats), and a couple of locations where the page content exceeds the defined content area. - Due to issues within Apache FOP, PDF generation emits a substantial amount of output that is not easily suppressed without losing important warning information. - Apache FOP's interface to ANT does not expose a way to set the font base directory. The current configuration does work under Mac OSX, but further testing on Windows will need to be done to determine if the relative paths defined continue to work. The workaround is for Windows users to customize the fop-config.xml to provide absolute system paths to the required fonts. - HTML generation needs further browser testing, and exhibits broken navigation on iOS browsers within the TOC sidebar. - A number of PDF and HTML presentation tweaks still need to be made, for example: sidebars, gui* DocBook tags, whitespace, section separation, etc. |