<?xml version="1.0" encoding="ASCII"?> <!--This file was created automatically by html2xhtml--> <!--from the HTML stylesheets.--> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.1" exclude-result-prefixes="doc d" extension-element-prefixes="saxon redirect lxslt"> <!-- ******************************************************************** $Id: oldchunker.xsl 6910 2007-06-28 23:23:30Z xmldoc $ ******************************************************************** 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. ******************************************************************** --> <!-- ==================================================================== --> <!-- This stylesheet works with Saxon and Xalan; for XT use xtchunker.xsl --> <!-- ==================================================================== --> <xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type="string"/> <doc:param xmlns="" name="default.encoding"> <refpurpose xmlns="http://www.w3.org/1999/xhtml">Encoding used in generated HTML pages</refpurpose> <refdescription xmlns="http://www.w3.org/1999/xhtml"> <para>This encoding is used in files generated by chunking stylesheet. Currently only Saxon is able to change output encoding. </para> </refdescription> </doc:param> <!-- ==================================================================== --> <xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type="string"/> <doc:param xmlns="" name="saxon.character.representation"> <refpurpose xmlns="http://www.w3.org/1999/xhtml">Saxon character representation used in generated HTML pages</refpurpose> <refdescription xmlns="http://www.w3.org/1999/xhtml"> <para>This character representation is used in files generated by chunking stylesheet. If you want to suppress entity references for characters with direct representation in default.encoding, set this parameter to value <literal>native</literal>. </para> </refdescription> </doc:param> <!-- ==================================================================== --> <xsl:template name="make-relative-filename"> <xsl:param name="base.dir" select="'./'"/> <xsl:param name="base.name" select="''"/> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon doesn't make the chunks relative --> <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan doesn't make the chunks relative --> <xsl:value-of select="concat($base.dir,$base.name)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>Chunking isn't supported with </xsl:text> <xsl:value-of select="$vendor"/> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="write.chunk"> <xsl:param name="filename" select="''"/> <xsl:param name="method" select="'html'"/> <xsl:param name="encoding" select="$default.encoding"/> <xsl:param name="indent" select="'no'"/> <xsl:param name="content" select="''"/> <xsl:message> <xsl:text>Writing </xsl:text> <xsl:value-of select="$filename"/> <xsl:if test="name(.) != ''"> <xsl:text> for </xsl:text> <xsl:value-of select="name(.)"/> <xsl:if test="@id"> <xsl:text>(</xsl:text> <xsl:value-of select="@id"/> <xsl:text>)</xsl:text> </xsl:if> </xsl:if> </xsl:message> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON 6.2')"> <!-- Saxon 6.2.x uses xsl:document --> <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </xsl:document> </xsl:when> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon uses saxon:output --> <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </saxon:output> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan uses redirect --> <redirect:write file="{$filename}"> <xsl:copy-of select="$content"/> </redirect:write> </xsl:when> <xsl:otherwise> <!-- it doesn't matter since we won't be making chunks... --> <xsl:message terminate="yes"> <xsl:text>Can't make chunks with </xsl:text> <xsl:value-of select="$vendor"/> <xsl:text>'s processor.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="write.chunk.with.doctype"> <xsl:param name="filename" select="''"/> <xsl:param name="method" select="'html'"/> <xsl:param name="encoding" select="$default.encoding"/> <xsl:param name="indent" select="'no'"/> <xsl:param name="doctype-public" select="''"/> <xsl:param name="doctype-system" select="''"/> <xsl:param name="content" select="''"/> <xsl:message> <xsl:text>Writing </xsl:text> <xsl:value-of select="$filename"/> <xsl:if test="name(.) != ''"> <xsl:text> for </xsl:text> <xsl:value-of select="name(.)"/> </xsl:if> </xsl:message> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:choose> <xsl:when test="contains($vendor, 'SAXON 6.2')"> <!-- Saxon 6.2.x uses xsl:document --> <xsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </xsl:document> </xsl:when> <xsl:when test="contains($vendor, 'SAXON')"> <!-- Saxon uses saxon:output --> <saxon:output file="{$filename}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" saxon:character-representation="{$saxon.character.representation}"> <xsl:copy-of select="$content"/> </saxon:output> </xsl:when> <xsl:when test="contains($vendor, 'Apache')"> <!-- Xalan uses redirect --> <redirect:write file="{$filename}"> <xsl:copy-of select="$content"/> </redirect:write> </xsl:when> <xsl:otherwise> <!-- it doesn't matter since we won't be making chunks... --> <xsl:message terminate="yes"> <xsl:text>Can't make chunks with </xsl:text> <xsl:value-of select="$vendor"/> <xsl:text>'s processor.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </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/xhtml/oldchunker.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/xhtml/oldchunker.xsl | |||||
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/xhtml/oldchunker.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. |