<?xml version="1.0" encoding="UTF-8"?> <!-- vim: set ts=2 sw=2 tw=80 ai si: --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" xmlns:xtbl="xalan://com.nwalsh.xalan.Table" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" exclude-result-prefixes="d xsl exsl stbl xtbl lxslt ptbl" version="1.1"> <!-- Perforce WebHelp customizations --> <!-- ============================================================= --> <!-- Import docbook styles --> <!-- ============================================================= --> <xsl:import href="../../../docbook-xsl-ns-1.78.1/xhtml/chunk.xsl"/> <xsl:import href="../../../docbook-xsl-ns-1.78.1/webhelp/xsl/webhelp-common.xsl"/> <xsl:include href="../../../docbook-xsl-ns-1.78.1/webhelp/xsl/titlepage.templates.xsl"/> <!-- ============================================================= --> <!-- parameters and styles --> <!-- ============================================================= --> <!-- remove style attribute from admon markup, so we can adjust with CSS --> <xsl:param name="admon.style"></xsl:param> <!-- turn off table borders by default --> <xsl:param name="default.table.frame">none</xsl:param> <!-- avoid emitting the XML declaration on each chunked file. Note that both values must be set to achieve this. --> <xsl:param name="chunker.output.encoding" select="'UTF-8'"/> <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/> <xsl:param name="chunker.output.doctype-public" select="''"/> <xsl:param name="chunker.output.doctype-system" select="''"/> <!-- customize TOC generation --> <xsl:param name="generate.toc"> /appendix toc,title article/appendix nop /article toc,title book toc,title /chapter toc,title part toc,title /preface toc,title reference toc,title /sect1 toc /sect2 toc /sect3 toc /sect4 toc /sect5 toc /section toc set toc,title </xsl:param> <!-- turn off the br tag after formal examples. --> <xsl:param name="formal.object.break.after">0</xsl:param> <!-- PDF availability --> <xsl:param name="pdf.available"></xsl:param> <!-- Perforce Google Analytics toggle --> <xsl:param name="perforce.analytics">0</xsl:param> <!-- ============================================================= --> <!-- Customizations --> <!-- ============================================================= --> <!-- customize d:title's title.markup mode to apply normalize-space to correct whitespace for titles in desired markup --> <xsl:template match="d:title" mode="title.markup"> <xsl:param name="allow-anchors" select="0"/> <xsl:variable name="content"> <xsl:choose> <xsl:when test="$allow-anchors != 0"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="no.anchor.mode"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:copy-of select="normalize-space($content)"/> </xsl:template> <!-- system HTML <head> section customizations --> <xsl:template name="system.head.content"> <xsl:param name="node" select="."/> <!-- The meta tag tells the IE rendering engine that it should use the latest, or edge, version of the IE rendering environment;It prevents IE from entring compatibility mode. --> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </xsl:template> <!-- customize the title tag in the head section --> <xsl:template name="user.head.title"> <xsl:param name="node" select="."/> <xsl:param name="title"/> <title> <xsl:copy-of select="$title"/> <xsl:text> // </xsl:text> <xsl:value-of select="//d:book/d:title"/> </title> </xsl:template> <!-- user HTML <head> section customizations --> <xsl:template name="user.head.content"> <xsl:param name="title"> <xsl:apply-templates select="." mode="object.title.markup.textonly"/> </xsl:param> <meta name="Section-title" content="{$title}"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css"/> <link rel="stylesheet" href="vendor/prettify/prettify.css"/> <link rel="stylesheet" href="css/perforce.css"/> <link rel="stylesheet" href="css/print.css" media="print"/> <link rel="shortcut icon" href="images/favicon.ico"/> <xsl:comment><xsl:text>[if lt IE 9]> <script type="text/javascript" src="vendor/respond/respond.min.js"></script> <link rel="stylesheet" type="text/css" href="css/ie.css"/> <![endif]</xsl:text></xsl:comment> <xsl:call-template name="user.webhelp.head.content"/> </xsl:template> <!-- disable generation of the l10n.js file; we don't need it --> <xsl:template name="l10n.js"/> <!-- custom chunk-element-content to provide the page structure we need --> <xsl:template name="chunk-element-content"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="nav.context"/> <xsl:param name="content"> <xsl:apply-imports/> </xsl:param> <xsl:call-template name="user.preroot"/> <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html>]]></xsl:text> <html> <xsl:call-template name="html.head"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> </xsl:call-template> <body> <a id="page-top"></a> <xsl:if test="$perforce.analytics != '0'"> <noscript> <iframe src="//www.googletagmanager.com/ns.html?id=GTM-PJBHZV" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script> <xsl:text>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-PJBHZV');</xsl:text> </script> </xsl:if> <xsl:call-template name="user.header.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> <div id="content" class="content" tabindex="-1"> <div class="container"> <xsl:call-template name="user.header.content"/> <xsl:copy-of select="$content"/> <xsl:call-template name="user.footer.content"/> </div> </div> <div id="nav" class="toc"></div> <xsl:if test="$webhelp.include.search.tab != '0'"> <div id="search"> <div class="input"> <input id="search-text" type="search" placeholder="Search this guide"/> <button name="clear" type="button" class="clear"> <span class="glyphicon glyphicon-remove-sign"></span> </button> </div> <div class="controls"> <div class="substring"> <input type="checkbox" class="substring" name="substring" value="hide" checked="1"/> <span class="description">Hide partial matches</span> </div> <div class="highlighter"> <input type="checkbox" class="highlight" name="highlight" value="show" checked="1"/> <span class="description">Highlight matches</span> </div> </div> <div class="count"> <span class="number">0</span> matching pages </div> <ul class="results"></ul> </div> </xsl:if> <xsl:call-template name="webhelpfooter"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> </body> </html> <xsl:value-of select="$chunk.append"/> </xsl:template> <!-- The Header with the company logo --> <xsl:template name="webhelpheader"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="nav.context"/> <xsl:param name="title"> <xsl:apply-templates select="." mode="object.title.markup.textonly"/> </xsl:param> <xsl:variable name="home" select="/*[1]"/> <xsl:variable name="up" select="parent::*"/> <div id="header"> <div class="container"> <button name="toc" type="button" class="toc"> <span class="glyphicon glyphicon-list"></span> </button> <span class="logo"> <a href="http://www.perforce.com/documentation"></a> </span> <h1> <a href="index.html" class="title"> <span class="brand"/> <span class="guide-title"> <xsl:apply-templates select="/*[1]" mode="title.markup"/> </span> <span class="guide-subtitle"> (<xsl:apply-templates select="/*[1]" mode="subtitle.markup"/>) </span> </a> </h1> <xsl:if test="$pdf.available != ''"> <a title="Download a PDF version of this guide" class="pdf"> <xsl:attribute name="href"> <xsl:value-of select="$pdf.available"/> </xsl:attribute> <span class="glyphicon glyphicon-book"></span> </a> </xsl:if> <xsl:if test="$webhelp.include.search.tab != '0'"> <button name="search" type="button" class="search" title="Search this guide"> <span class="glyphicon glyphicon-search"></span> </button> </xsl:if> </div> <div id="progress"></div> </div> </xsl:template> <!-- customized footer --> <xsl:template name="webhelpfooter"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="nav.context"/> <xsl:param name="title"> <xsl:apply-templates select="." mode="object.title.markup.textonly"/> </xsl:param> <xsl:variable name="home" select="/*[1]"/> <xsl:variable name="up" select="parent::*"/> <div id="footer"> <div class="container"> <xsl:choose> <xsl:when test="count($prev)>0"> <a accesskey="p" class="nav-prev" title="Press 'p', or left-arrow, to view the previous page"> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$prev"/> </xsl:call-template> </xsl:attribute> <span class="glyphicon glyphicon-chevron-left"></span> <div class="label">Previous</div> <div class="title"> <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/> </div> </a> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="count($next)>0"> <a accesskey="n" class="nav-next" title="Press 'n', or right-arrow, to view the next page"> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$next"/> </xsl:call-template> </xsl:attribute> <span class="glyphicon glyphicon-chevron-right"></span> <div class="label">Next</div> <div class="title"> <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/> </div> </a> </xsl:when> </xsl:choose> </div> </div> <script type="text/javascript" src="vendor/jquery/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="vendor/bootstrap/js/bootstrap.js"></script> <script type="text/javascript" src="vendor/cookie/jquery.cookie.js"></script> <script type="text/javascript" src="vendor/highlight/jquery.highlight.js"></script> <script type="text/javascript" src="vendor/jsrender/jsrender.js"></script> <script type="text/javascript" src="vendor/touchwipe/jquery.touchwipe.min.js"></script> <script type="text/javascript" src="vendor/prettify/prettify.js"></script> <xsl:if test="$webhelp.include.search.tab != '0'"> <script defer="1" type="text/javascript" src="js/index.js"></script> </xsl:if> <script defer="1" type="text/javascript" src="js/toc.js"></script> <script defer="1" type="text/javascript" src="js/perforce.js"></script> <xsl:call-template name="user.webhelp.foot.content"/> </xsl:template> <!-- customize the generator meta tag --> <xsl:template name="head.content.generator"> <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION} with Perforce customizations"/> </xsl:template> <!-- customized user.footer.content --> <xsl:template name="user.footer.content"/> <!-- customized user.webhelp.foot.content --> <xsl:template name="user.webhelp.foot.content"/> <xsl:template match="uri"> <xsl:call-template name="inline.monoseq"> <xsl:with-param name="content"> <a> <xsl:apply-templates select="." mode="common.html.attributes"/> <xsl:call-template name="id.attribute"/> <xsl:attribute name="href"> <xsl:value-of select="."/> </xsl:attribute> <xsl:apply-templates/> </a> </xsl:with-param> </xsl:call-template> </xsl:template> <!-- customized tgroup template to remove the incorrect assumption that tables must have border declarations built in. --> <xsl:template match="tgroup" name="tgroup"> <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'"> <xsl:message terminate="yes"> <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text> </xsl:message> </xsl:if> <xsl:variable name="summary"> <xsl:call-template name="pi.dbhtml_table-summary"/> </xsl:variable> <xsl:variable name="cellspacing"> <xsl:call-template name="pi.dbhtml_cellspacing"/> </xsl:variable> <xsl:variable name="cellpadding"> <xsl:call-template name="pi.dbhtml_cellpadding"/> </xsl:variable> <table> <xsl:choose> <!-- If there's a textobject/phrase for the table summary, use it --> <xsl:when test="../textobject/phrase"> <xsl:attribute name="summary"> <xsl:value-of select="../textobject/phrase"/> </xsl:attribute> </xsl:when> <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for the HTML table summary attribute --> <xsl:when test="$summary != ''"> <xsl:attribute name="summary"> <xsl:value-of select="$summary"/> </xsl:attribute> </xsl:when> <!-- Otherwise, if there's a title, use that --> <xsl:when test="../title"> <xsl:attribute name="summary"> <!-- This screws up on inline markup and footnotes, oh well... --> <xsl:value-of select="string(../title)"/> </xsl:attribute> </xsl:when> <!-- Otherwise, forget the whole idea --> <xsl:otherwise><!-- nevermind --></xsl:otherwise> </xsl:choose> <xsl:if test="$cellspacing != '' or $html.cellspacing != ''"> <xsl:attribute name="cellspacing"> <xsl:choose> <xsl:when test="$cellspacing != ''"> <xsl:value-of select="$cellspacing"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$html.cellspacing"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:if> <xsl:if test="$cellpadding != '' or $html.cellpadding != ''"> <xsl:attribute name="cellpadding"> <xsl:choose> <xsl:when test="$cellpadding != ''"> <xsl:value-of select="$cellpadding"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$html.cellpadding"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:if> <xsl:if test="../@pgwide=1 or local-name(.) = 'entrytbl'"> <xsl:attribute name="width">100%</xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="$table.borders.with.css != 0"> <xsl:choose> <xsl:when test="../@frame='all' or (not(../@frame) and $default.table.frame='all')"> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> <xsl:call-template name="border"> <xsl:with-param name="side" select="'top'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> <xsl:call-template name="border"> <xsl:with-param name="side" select="'bottom'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> <xsl:call-template name="border"> <xsl:with-param name="side" select="'left'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:when test="../@frame='topbot' or (not(../@frame) and $default.table.frame='topbot')"> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> <xsl:call-template name="border"> <xsl:with-param name="side" select="'top'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> <xsl:call-template name="border"> <xsl:with-param name="side" select="'bottom'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:when test="../@frame='top' or (not(../@frame) and $default.table.frame='top')"> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> <xsl:call-template name="border"> <xsl:with-param name="side" select="'top'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:when test="../@frame='bottom' or (not(../@frame) and $default.table.frame='bottom')"> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> <xsl:call-template name="border"> <xsl:with-param name="side" select="'bottom'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:when test="../@frame='sides' or (not(../@frame) and $default.table.frame='sides')"> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> <xsl:call-template name="border"> <xsl:with-param name="side" select="'left'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> <xsl:with-param name="style" select="$table.frame.border.style"/> <xsl:with-param name="color" select="$table.frame.border.color"/> <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:when test="../@frame='none'"> <xsl:attribute name="style"> <xsl:text>border: none;</xsl:text> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="style"> <xsl:text>border-collapse: collapse;</xsl:text> </xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="../@frame='none' or (not(../@frame) and $default.table.frame='none') or local-name(.) = 'entrytbl'"> </xsl:when> <xsl:otherwise> <xsl:attribute name="border">1</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:variable name="colgroup"> <colgroup> <xsl:call-template name="generate.colgroup"> <xsl:with-param name="cols" select="@cols"/> </xsl:call-template> </colgroup> </xsl:variable> <xsl:variable name="explicit.table.width"> <xsl:call-template name="pi.dbhtml_table-width"> <xsl:with-param name="node" select=".."/> </xsl:call-template> </xsl:variable> <xsl:variable name="table.width"> <xsl:choose> <xsl:when test="$explicit.table.width != ''"> <xsl:value-of select="$explicit.table.width"/> </xsl:when> <xsl:when test="$default.table.width = ''"> <xsl:text>100%</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$default.table.width"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:if test="$default.table.width != '' or $explicit.table.width != ''"> <xsl:attribute name="width"> <xsl:choose> <xsl:when test="contains($table.width, '%')"> <xsl:value-of select="$table.width"/> </xsl:when> <xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0"> <xsl:choose> <xsl:when test="function-available('stbl:convertLength')"> <xsl:value-of select="stbl:convertLength($table.width)"/> </xsl:when> <xsl:when test="function-available('xtbl:convertLength')"> <xsl:value-of select="xtbl:convertLength($table.width)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No convertLength function available.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$table.width"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0"> <xsl:choose> <xsl:when test="function-available('stbl:adjustColumnWidths')"> <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/> </xsl:when> <xsl:when test="function-available('xtbl:adjustColumnWidths')"> <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/> </xsl:when> <xsl:when test="function-available('ptbl:adjustColumnWidths')"> <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No adjustColumnWidths function available.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$colgroup"/> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="thead"/> <xsl:apply-templates select="tfoot"/> <xsl:apply-templates select="tbody"/> <xsl:if test=".//footnote|../title//footnote"> <tbody class="footnotes"> <tr> <td colspan="{@cols}"> <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/> </td> </tr> </tbody> </xsl:if> </table> </xsl:template> <!-- customize nongraphical.admonition to include an 'admonition' class, so we can use common CSS for important, caution, note, tip, and warning admonitions. --> <xsl:template name="nongraphical.admonition"> <div> <xsl:call-template name="common.html.attributes"> <xsl:with-param name="inherit" select="1"/> <xsl:with-param name="class" select="concat(local-name(.), ' admonition')"/> </xsl:call-template> <xsl:call-template name="id.attribute"/> <xsl:if test="$admon.style != '' and $make.clean.html = 0"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> </xsl:if> <xsl:if test="$admon.textlabel != 0 or title or info/title"> <h3 class="title"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="object.title.markup"/> </h3> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <!-- customize handling of imageobject with condition attributes, which should be reflected as a CSS class on an image's container in HTML. --> <xsl:template match="d:imageobject"> <xsl:choose> <xsl:when test="@condition"> <span> <xsl:attribute name="class"> <xsl:value-of select="@condition"/> </xsl:attribute> <xsl:apply-templates select="d:imagedata"/> </span> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="d:imagedata"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- customize handling of para tags with condition attributes, which should be reflected as a CSS class on the p tag in HTML. --> <xsl:template match="d:para"> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> <xsl:if test="@condition"> <xsl:value-of select="@condition"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <xsl:if test="position() = 1 and parent::d:listitem"> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="parent::d:listitem"/> </xsl:call-template> </xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:template> <!-- customize xrefs to avoid emitting unwanted leader text --> <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en"> <l:context name="xref"> <l:template name="chapter" text="“%t”"/> <l:template name="bridgehead" text="%t"/> <l:template name="refsection" text="%t"/> <l:template name="refsect1" text="%t"/> <l:template name="refsect2" text="%t"/> <l:template name="refsect3" text="%t"/> <l:template name="sect1" text="%t"/> <l:template name="sect2" text="%t"/> <l:template name="sect3" text="%t"/> <l:template name="sect4" text="%t"/> <l:template name="sect5" text="%t"/> <l:template name="section" text="%t"/> <l:template name="simplesect" text="%t"/> </l:context> </l:l10n> </l:i18n> <!-- customize replaceable to add a bold version --> <xsl:template match="d:replaceable"> <xsl:choose> <xsl:when test="@role='bold'"> <xsl:call-template name="inline.bolditalicmonoseq"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="inline.italicmonoseq"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="inline.bolditalicmonoseq"> <xsl:param name="content"> <xsl:call-template name="anchor"/> <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:param> <b><em> <xsl:call-template name="common.html.attributes"/> <xsl:call-template name="id.attribute"/> <code> <xsl:call-template name="generate.html.title"/> <xsl:call-template name="dir"/> <xsl:copy-of select="$content"/> <xsl:call-template name="apply-annotations"/> </code> </em></b> </xsl:template> <!-- customize programlisting to include language as a CSS class --> <xsl:template match="d:programlisting|d:screen|d:synopsis"> <xsl:param name="suppress-numbers" select="'0'"/> <xsl:call-template name="anchor"/> <xsl:variable name="div.element">pre</xsl:variable> <xsl:if test="$shade.verbatim != 0"> <xsl:message> <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text> <xsl:text>Use CSS instead,</xsl:text> </xsl:message> <xsl:message> <xsl:text>for example: pre.</xsl:text> <xsl:value-of select="local-name(.)"/> <xsl:text> { background-color: #E0E0E0; }</xsl:text> </xsl:message> </xsl:if> <xsl:choose> <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0' and $linenumbering.extension != '0'"> <xsl:variable name="rtf"> <xsl:choose> <xsl:when test="$highlight.source != 0"> <xsl:call-template name="apply-highlighting"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> <xsl:if test="@language"> <xsl:attribute name="lang"> <xsl:value-of select="@language"/> </xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="common.html.attributes"/> <xsl:call-template name="id.attribute"/> <xsl:if test="@width != ''"> <xsl:attribute name="width"> <xsl:value-of select="@width"/> </xsl:attribute> </xsl:if> <xsl:call-template name="number.rtf.lines"> <xsl:with-param name="rtf" select="$rtf"/> </xsl:call-template> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> <xsl:if test="@language"> <xsl:attribute name="lang"> <xsl:value-of select="@language"/> </xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="common.html.attributes"/> <xsl:call-template name="id.attribute"/> <xsl:if test="@width != ''"> <xsl:attribute name="width"> <xsl:value-of select="@width"/> </xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="$highlight.source != 0"> <xsl:call-template name="apply-highlighting"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- customize chapter xrefs so that they are not italic --> <xsl:template match="d:chapter|d:appendix" mode="insert.title.markup"> <xsl:param name="purpose"/> <xsl:param name="xrefstyle"/> <xsl:param name="title"/> <xsl:copy-of select="$title"/> </xsl:template> <!-- PDFs require a pagebreak processing instruction in certain case. Add a complementary no-op PI here to avoid errors. --> <xsl:template match="processing-instruction('pagebreak')"/> <xsl:template match="processing-instruction('chapterbreak')"/> <!-- attempt to write toc as JSON file --> <xsl:template match="/"> <!-- * Get a title for current doc so that we let the user --> <!-- * know what document we are processing at this point. --> <xsl:variable name="doc.title"> <xsl:call-template name="get.doc.title"/> </xsl:variable> <xsl:choose> <xsl:when test="namespace-uri(*[1]) != 'http://docbook.org/ns/docbook'"> <xsl:call-template name="log.message"> <xsl:with-param name="level">Note</xsl:with-param> <xsl:with-param name="source"><xsl:call-template name="get.doc.title"/></xsl:with-param> <xsl:with-param name="context-desc"><xsl:text>namesp. add</xsl:text></xsl:with-param> <xsl:with-param name="message"><xsl:text>added namespace before processing</xsl:text></xsl:with-param> </xsl:call-template> <xsl:variable name="addns"> <xsl:apply-templates mode="addNS"/> </xsl:variable> <xsl:apply-templates select="exsl:node-set($addns)"/> </xsl:when> <xsl:otherwise> <xsl:if test="$htmlhelp.only != 1"> <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:choose> <xsl:when test="count(key('id',$rootid)) = 0"> <xsl:message terminate="yes"> <xsl:text>ID '</xsl:text> <xsl:value-of select="$rootid"/> <xsl:text>' not found in document.</xsl:text> </xsl:message> </xsl:when> <xsl:otherwise> <xsl:message>Formatting from <xsl:value-of select="$rootid"/></xsl:message> <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'"> <xsl:apply-templates select="/" mode="collect.targets"/> </xsl:if> <xsl:if test="$collect.xref.targets != 'only'"> <xsl:apply-templates select="/" mode="process.root"/> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:if> <xsl:if test="$collect.xref.targets != 'only'"> <xsl:call-template name="write.text.chunk"> <xsl:with-param name="filename"> <xsl:value-of select="$chunk.base.dir"/> <xsl:value-of select="'js/toc.js'"/> </xsl:with-param> <xsl:with-param name="method" select="'html'"/> <xsl:with-param name="content"> <xsl:call-template name="jsontoc"> <xsl:with-param name="currentid" select="generate-id(.)"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="encoding" select="$htmlhelp.encoding"/> <xsl:with-param name="quiet" select="$chunk.quietly"/> </xsl:call-template> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- initiates production of a JSON structure representing the TOC --> <xsl:template name="jsontoc"> <xsl:param name="currentid"/> <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:variable name="title"> <xsl:if test="$webhelp.autolabel=1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/> </xsl:variable> <xsl:if test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:if> </xsl:if> <xsl:apply-templates select="key('id',$rootid)" mode="titleabbrev.markup"/> </xsl:variable> <xsl:variable name="href"> <xsl:choose> <xsl:when test="$manifest.in.base.dir != 0"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="key('id',$rootid)"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="href.target.with.base.dir"> <xsl:with-param name="object" select="key('id',$rootid)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> </xsl:when> <xsl:otherwise> <xsl:variable name="title"> <xsl:if test="$webhelp.autolabel=1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="/*" mode="label.markup"/> </xsl:variable> <xsl:if test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:if> </xsl:if> <xsl:apply-templates select="/*" mode="titleabbrev.markup"/> </xsl:variable> <xsl:variable name="href"> <xsl:choose> <xsl:when test="$manifest.in.base.dir != 0"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="/"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="href.target.with.base.dir"> <xsl:with-param name="object" select="/"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:text>var sidebar_toc = { n: [ </xsl:text> <xsl:apply-templates select="/*/*" mode="jsontoc"> <xsl:with-param name="currentid" select="$currentid"/> <xsl:with-param name="indent" select="' '"/> </xsl:apply-templates> <xsl:text> ] }</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Generates the entries for the JSON TOC. --> <xsl:template match="d:book|d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv|d:index|d:setindex" mode="jsontoc"> <xsl:param name="currentid"/> <xsl:param name="indent" select="''"/> <xsl:variable name="prefix"> <xsl:if test="$webhelp.autolabel = 1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:choose> <xsl:when test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:when> <xsl:when test="local-name(.) = 'chapter'"> <xsl:number from="d:book" count="d:chapter" format="{'1'}"/> <xsl:value-of select="$autotoc.label.separator"/> </xsl:when> <xsl:when test="local-name(.) = 'appendix'"> <xsl:number from="d:book" count="d:appendix" format="{'A'}"/> <xsl:value-of select="$autotoc.label.separator"/> </xsl:when> <xsl:when test="local-name(.) = 'glossary'"> <xsl:number from="d:appendix" count="d:appendix|d:glossary" format="{'A'}"/> <xsl:value-of select="$autotoc.label.separator"/> </xsl:when> </xsl:choose> </xsl:if> </xsl:variable> <xsl:variable name="title"> <xsl:call-template name="string-trim"> <xsl:with-param name="string"> <xsl:if test="$prefix"> <xsl:value-of select="$prefix"/> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates select="." mode="title.markup"/> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name="href"> <xsl:choose> <xsl:when test="$manifest.in.base.dir != 0"> <xsl:call-template name="href.target"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="href.target.with.base.dir"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="id" select="generate-id(.)"/> <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))"> <xsl:variable name="subcontent"> <xsl:if test="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv"> <xsl:text>, n: [ </xsl:text> <xsl:apply-templates select="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv" mode="jsontoc"> <xsl:with-param name="currentid" select="$currentid"/> <xsl:with-param name="indent" select="concat($indent, ' ')"/> </xsl:apply-templates> <xsl:value-of select="$indent"/> <xsl:text>]</xsl:text> </xsl:if> </xsl:variable> <xsl:value-of select="$indent"/> <xsl:text>{ u: "</xsl:text> <xsl:value-of select="substring-after($href, $base.dir)"/> <xsl:text>", t: "</xsl:text> <xsl:value-of select="$title"/> <xsl:text>"</xsl:text> <xsl:copy-of select="$subcontent"/> <xsl:text> }, </xsl:text> </xsl:if> </xsl:template> <!-- disables any elements not covered in the JSON TOC --> <xsl:template match="*" mode="jsontoc"/> <xsl:variable name="whitespace" select="'	 '" /> <!-- Strips trailing whitespace characters from 'string' --> <xsl:template name="string-rtrim"> <xsl:param name="string" /> <xsl:param name="trim" select="$whitespace" /> <xsl:variable name="length" select="string-length($string)" /> <xsl:if test="$length > 0"> <xsl:choose> <xsl:when test="contains($trim, substring($string, $length, 1))"> <xsl:call-template name="string-rtrim"> <xsl:with-param name="string" select="substring($string, 1, $length - 1)" /> <xsl:with-param name="trim" select="$trim" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string" /> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <!-- Strips leading whitespace characters from 'string' --> <xsl:template name="string-ltrim"> <xsl:param name="string" /> <xsl:param name="trim" select="$whitespace" /> <xsl:if test="string-length($string) > 0"> <xsl:choose> <xsl:when test="contains($trim, substring($string, 1, 1))"> <xsl:call-template name="string-ltrim"> <xsl:with-param name="string" select="substring($string, 2)" /> <xsl:with-param name="trim" select="$trim" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string" /> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <!-- Strips leading and trailing whitespace characters from 'string' --> <xsl:template name="string-trim"> <xsl:param name="string" /> <xsl:param name="trim" select="$whitespace" /> <xsl:call-template name="string-rtrim"> <xsl:with-param name="string"> <xsl:call-template name="string-ltrim"> <xsl:with-param name="string" select="$string" /> <xsl:with-param name="trim" select="$trim" /> </xsl:call-template> </xsl:with-param> <xsl:with-param name="trim" select="$trim" /> </xsl:call-template> </xsl:template> </xsl:stylesheet>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#28 | 12854 | eedwards |
Fix JSON table of contents generation: markup in <refentry> tags introduces whitespace that makes the JSON invalid. Now, the TOC entry's title has leading and trailing whitespace trimmed. |
||
#27 | 12847 | eedwards | Disable Perforce documentation analytics for user builds. | ||
#26 | 12840 | eedwards |
Upgrade to jQuery 1.11.3 from 1.10.2. There should be no visible or operational changes. |
||
#25 | 12838 | eedwards |
Fix a bug that broke index generation when UTF-8 entities exist in the index content. |
||
#24 | 12837 | eedwards |
#review-1029519 Change the way that the TOC is generated for the HTML presentation: - no longer include the TOC in each generated HTML page. - generate a JSON file representing the TOC. - add javascript to read the TOC in JSON format, and generate the appropriate HTML. - Remove the noscript block that prevents using the documentation with javascript disabled; just hide the search button because you can't use search without javascript. |
||
#23 | 12829 | eedwards |
Follow-on to @1030339: make the reading progress indicator span the entire width of the header. |
||
#22 | 12828 | eedwards |
#review-1028126 Update the logo for both PDF, HTML, and CHM output. Includes updated favicon.ico for the HTML output. Includes some additional tweaks: - In the HTML presentation, the "book" icon (to access the PDF, if available) and the magnifying glass icon for searching both look more clickable, using colors from the latest perforce.com design. - Also, both icons stick to the right edge of the doc content, rather than the right edge of the browser. - The background color in the HTML presentation is now plain white; the gradient image is removed. - The Google Analytics code is now included in the HTML presentation by default. Individual guides can disable this by setting the DocBook parameter perforce.analytics=0. Once this change is in place, subsequent generation of guides will incorporate these changes. |
||
#21 | 12827 | eedwards |
Add an estimate of reading time to the top of each HTML page. Also add an indicator of reading progress to the fixed header. |
||
#20 | 12825 | eedwards |
Disable the addition of a <br> tag after formal tables/examples/figures etc. for HTML output; it messes with the spacing we control via CSS. |
||
#19 | 12809 | eedwards |
#review-954548 Add the infrastructure to present a "PDF" link in the header bar in the HTML presentation. Not all guides provide PDF versions, so this is configurable on a guide-by-guide basis. The default is to omit the link. When a guide provides a PDF version, set the pdf.available attribute to the name of the PDF file that the link should target. For example, in P4Guide's publicsite build.properties: pdf.available=p4guide.pdf A subsequent changelist will apply this attribute to all of the server guides. |
||
#18 | 12804 | eedwards |
Add a new processing instruction <?chapterbreak?> which introduces one or two page breaks so that following content appears on a recto page. A corresponding PI has been added to the HTML, which functions as a no-op, to avoid errors during transformation. This will help in the formatting of reference sections, where we prefer the content to appear in its own chapter, but still use recto pagination for each referenced item. |
||
#17 | 12800 | eedwards |
Doc presentation tweaks: - For PDF cover page: - move logo to top-left from bottom right - move title down - move subtitle near bottom - add <pubdate> presentation below subtitle (the <subtitle> now specifies the doc version) - tweaked font sizes - For HTML: - Add Perforce logo to header bar. - Add <subtitle> in brackets after guide title. |
||
#16 | 12792 | eedwards |
A few updates to presentation for HTML and PDF: - Chapter cross-references no longer appear in italics. - For PDF, <gui*> tag content renders in bold, to match the HTML output. - HTML cross-references to chapters now appears in quotation marks, but cross-references to sections now have the quotation marks removed. - A number of spacing issues in the HTML output between list items, admonitions, images, and a following paragraph have been resolved. |
||
#15 | 12786 | eedwards |
Additional CSS to improve the experience of printing the HTML documentation. This doesn't address the 'single page' aspect of the job, but individual pages do appear much nicer on paper. |
||
#14 | 12784 | eedwards |
Improved nav pane scroll position when moving from page to page in a guide. The behaviour isn't perfect in all situations yet, but is notably better. |
||
#13 | 12779 | eedwards |
Follow-on to @871273: Disable inclusion of HighlightJS, and re-enable Google Prettify. |
||
#12 | 12776 | eedwards |
#review-851775 Updates to the HTML presentation: - remove the double DOCTYPE declarations. - revise markup so that the content is no longer in an immovable container. This should allow the scroll position to be maintained by the browser and work as expected after users navigate within a page and then use the browser's back button. - rename the generated search index file to 'index.js' to avoid a mimetype issue. Also, made the search code tolerant of a missing index.js. - fix scrolling to targeted locations in a guide by applying an offset to the scroll to move the target out from under the header, and to animate the scroll. |
||
#11 | 12768 | eedwards |
Update the handling of condition attributes in <para> tags so that it more correctly overrides the official DocBook version. There should be no functional change in current documents, but this should work better if/when para.propagates.style is set. |
||
#10 | 12767 | eedwards |
Add a processing instruction that allows for page breaks at specific locations in the PDF docs. A similar PI is added for HTML docs, but it is a no-op (since the chunking facility takes care of that) to avoid errors. To use it, add <?pagebreak?> into the XML source where a page break is desired. This will have no effect on existing guides. |
||
#9 | 12766 | eedwards |
Updates to the HTML presentation for docs to better support users with Internet Explorer 8: - removed used of HTML5 tags, such as header, footer and nav, which IE8 doesn't understand at all. - add Respond.js (MIT license), which simulates CSS media queries in IE8. - fix some issues with the javascript that IE8 could not handle. - add a custom IE8 stylesheet to include some very specific tweaks. The HTML for the following two guides has been updated, and is available for review for a limited time: http://ee.perforce.ca/docs/p4dist.ie8/ http://ee.perforce.ca/docs/swarm/ |
||
#8 | 12758 | eedwards |
Updates to the HTML doc presentation's search interface: - Add checkbox to toggle whether partial match results will be displayed or not - Replace obscure water droplet icon with checkbox and label to make it obvious that clicking toggles the highlighting of search terms in the current page - Report results by type: phrase matches, exact term matches, and partial matches, using a heading to indicate each group. |
||
#7 | 12747 | eedwards |
Add a mechanism to automatically label the top-level items in the sidebar TOC. This is disabled by default, and can be enabled by setting webhelp.autolabel=1 in guides that want it. |
||
#6 | 12739 | eedwards |
Add XSLT/Javascript to expose the specified language on programlisting tags and pass it on to google-code-prettify. |
||
#5 | 12738 | eedwards |
Infrastructure updates to support new Swarm DocBook documentation: - Strip out XSLTHL; it does a poor job of highlighting the kinds of syntax included in our documentation, and it does an awful job when code to be highlighted contains other markup, such as xref, link, or replaceable. - Add in google-code-prettify (from Swarm) so that generated HTML has fairly decent syntax highlighting for many of the code examples we use. Further work on syntax highlighting, particularly for PDF output, is required. - Disable TOC generation in HTML; the HTML template already includes the full TOC as a sidebar on every page. - Update the xmlns attribute and image URL filtering. - Fix a bug in HTML page title XSL that often prevented the current section title from being included. This was more obvious in the Swarm documentation which chunks into pages by section, rather than by chapter. - Update the HTML indexer to process multiple HTML files in one pass for performance, and overall simplify the code structure. - Adjust sidebar TOC activation logic to allow Bootstrap's scrollSpy code to work with section-based chunking. - Re-introduce the "brand" markup in the HTML doc heading so that Swarm's documentation can include its logo. Other guides can do so if required, but none have been updated to do so yet. - Add facility for guide-specific custom javacsript inclusion. - Add facility to apply custom CSS classes to images in documentation. This is used in Swarm documentation to provide thumbnail, popup, and "framed" images. - Adjust xref and link text to just report the chapter or section name, without the preamble text, for example: "the section called". - Add <replaceable role="bold"> to provide a second kind of emphasis to programlistings. - Added a subtle color to <filename> content, to help distinguish from other literal text. - Removed the separator rule from the first section heading while chunking by section. - Added Swarm's orderedlist styling so that each numbered item has a circle around the number and a vertical bar indicating the extend of the item. - Added a visual indicator when a link points to an external document. - Rewrote the javascript search code to search for exact and fuzzy terms matches, as well as phrases. Relevance scoring is included, but likely needs some fine tuning to suit our documentation. |
||
#4 | 12734 | eedwards |
Replace the Java-based HTML indexer with a Python-based one. The Java-based HTML indexer was based on stemming, which can reduce the size of the index notably. However, stemming producespoor search behaviour, and is language specific. For example, the word 'documentation' has a stem of 'document'. When a user searches for 'docu', 'document' is not found. Also, all punctuation was stripped, making searches for IP addresses or depot paths impossible. The Python-based indexer collects all whitespace-separated tokens. The resulting index is around 10% larger than the stemmed index, but permits much more reasonable results, particularly while the user is still typing in search terms. The Python-based indexer should be cross-platform, but has to date only been tested on Mac OSX. It should work as-is on Linux, but further work may be required on Windows or other platforms. Also, there is room for optimization, particularly when a large number of HTML documents are to be indexed. Searching multiple terms is possible, and each HTML page must match all entered terms. There is nothing fancy about handling the search terms, no conjunctions, phrase searching, etc. Depending on user feedback, we may need to add more sophistication in the future. Included in this change: - the Python indexer - removed use of Java-based indexer from common build.xml and applied the Python indexer - added additional image src filtering - better build commentary in certain targets - rewrote the client-side searching - fixed the content of the HTML <title> tags to be '<chapter> // <book>', or just '<book>' when necessary. Search results strip off the ' // <book>' to be concise. - identify results as 'pages' rather than results, as each page may contain multiple matches. - results now indicate how many matches to expect on each page. - re-enabled indexing/search for CmdRef, P4API, P4Dist, and P4Guide. |
||
#3 | 12732 | eedwards |
HTML + Javascript fix to "focus" the main content container in the new doc HTML presentation so that up/down arrow navigation works without requiring a click on the container container. |
||
#2 | 12730 | eedwards |
HTML doc presentation tweaks: - turn off the search functionality as it currently has issues making it unreliable. A fix will be applied in a future changelist. - remove the Perforce logo as it is too large and potentially violates several logo style rules. I'll discuss options with our graphics dept. - ensure that code samples can be scrolled horizontally, rather than using word wrapping, if they don't fit in the browser width. |
||
#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. |
||
//guest/perforce_software/doc_build/main/perforce/p4-webhelp.xsl | |||||
#5 | 12727 | eedwards |
Further presentation tweaks to the prototype HTML docs: - improve the presentation of the noscript warning when javascript is disabled. - customize the javascript disabled text to refer to 'documentation' instead of 'this site' - remove some stray styles and cruft that interfered with the intended presentation |
||
#4 | 12719 | eedwards |
Minor updates to prototype HTML presentation: - make ScrollSpy work, so that the current section of the documentation is highlighted in the sidebar TOC. - add expander buttons to the TOC so that users can manually explore the TOC. - remove the now-unused SIDR code. - remove some cruft. |
||
#3 | 12718 | eedwards |
WebHelp transformation improvements: - consolidate the Java indexer's output files into a single file to reduce HTTP requests, and tidy up the search assets the indexer created - move the search interface and results into their own pane on the right side of the display - make search incremental as users type - replace existing navigation links with a TOC sidebar that is displayed when the browser is wide enough, or use a footer with prev/next links when the browser is too narrow. In the narrow presentation, the TOC sidebar can be toggled open. - Various improvements to colours, formatting, at various browser sizes. |
||
#2 | 12717 | eedwards |
Initial prototype of new HTML generation intended to exist on the Perforce public web site. The updates features a more responsive design, removal of frames, styling improvements. More work needs to be done to ensure robust presentation across various devices, and further design tweaks may be required once various stakeholders get a chance to have a look. Future infrastructure work will need to be done: - incorporate PDF generation - some organizational tweaks to make additional output targets easy to add - HTML validation assets need to be added/incorporated |
||
#1 | 12716 | eedwards |
Initial checkin of infrastructure to process DocBook XML into WebHelp format. The purpose of this change is to lay the groundwork that will allow all published Perforce documentation to be converted to HTML (and eventually PDF and other formats) in a consistent manner, independent of tools, and eventually allow for automated documentation builds. The latest versions of DocBook (1.78.1), Saxon (6.5.5), Xalan-J (2.7.1), and XSLTHL (2.1.0) are included, as well as generic customization capability and per-guide customizations. More work needs to be done to the customization layers to fully support their use from an XML authoring tool, such as oXygen, which will appear in a future change. Note: This change only includes configuration to build WebHelp for the P4SAG. Further work is required before the infrastructure can be applied to other guides. WARNING: For anyone using oXygen to produce WebHelp, there is a known incompatibility: <imagedata> tags in oXygen are verified for file existence, and the HTML is subsequently patched to resolve to the output directory. The non-oXygen WebHelp generation does not include the patch operation, so images are broken. The <imagedata> can be updated to indicate the relative path in the output directory, but then the oXygen transformation will fail. This will be fixed in a future change. |