<?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" xmlns:exsl="http://exslt.org/common" version='1.0'> <!-- ******************************************************************** $Id: inline.xsl 7897 2008-03-10 15:46:03Z 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. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template match="d:replaceable|d:varname|d:structfield"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="italic"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:option|d:userinput|d:envar|d:errorcode|d:constant|d:markup"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="bold"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:classname"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:apply-templates/> </xsl:template> <xsl:template match="d:command"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="bold"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:type[not(ancestor::d:cmdsynopsis) and not(ancestor::d:funcsynopsis)]"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="bold"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:function[not(ancestor::d:cmdsynopsis) and not(ancestor::d:funcsynopsis)]"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="bold"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:parameter[not(ancestor::d:cmdsynopsis) and not(ancestor::d:funcsynopsis)]"> <xsl:if test="$man.hyphenate.computer.inlines = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <xsl:call-template name="italic"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:template> <xsl:template match="d:filename"> <!-- * add hyphenation suppression in Filename output only if --> <!-- * break.after.slash is also non-zero --> <xsl:if test="$man.hyphenate.filenames = 0 and $man.break.after.slash = 0"> <xsl:call-template name="suppress.hyphenation"/> </xsl:if> <!-- * part of the old man(7) man page, now man-pages(7), says, --> <!-- * "Filenames (whether pathnames, or references to files in the --> <!-- * /usr/include directory) are always in italics". But that's dumb, --> <!-- * and looks like crap in PS/printed/PDF output, and there's no --> <!-- * sound rationale for it, so we don't do it. --> <xsl:call-template name="inline.monoseq"/> </xsl:template> <xsl:template match="d:emphasis"> <xsl:choose> <xsl:when test=" @role = 'bold' or @role = 'strong' or @remap = 'B'"> <xsl:call-template name="bold"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="italic"> <xsl:with-param name="node" select="."/> <xsl:with-param name="context" select="."/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="d:optional"> <xsl:value-of select="$arg.choice.opt.open.str"/> <xsl:apply-templates/> <xsl:value-of select="$arg.choice.opt.close.str"/> </xsl:template> <xsl:template name="do-citerefentry"> <xsl:param name="refentrytitle" select="''"/> <xsl:param name="manvolnum" select="''"/> <xsl:variable name="title"> <xsl:value-of select="$refentrytitle"/> </xsl:variable> <xsl:call-template name="bold"> <xsl:with-param name="node" select="exsl:node-set($title)"/> <xsl:with-param name="context" select="."/> </xsl:call-template> <xsl:text>(</xsl:text> <xsl:value-of select="$manvolnum"/> <xsl:text>)</xsl:text> </xsl:template> <xsl:template match="d:citerefentry"> <xsl:call-template name="do-citerefentry"> <xsl:with-param name="refentrytitle" select="d:refentrytitle"/> <xsl:with-param name="manvolnum" select="d:manvolnum"/> </xsl:call-template> </xsl:template> <xsl:template match="d:trademark|d:productname"> <xsl:apply-templates/> <xsl:choose> <!-- * Just use true Unicode chars for copyright, trademark, etc., --> <!-- * symbols (by default, we later automatically translate them --> <!-- * with the apply-string-subst-map template, or with the --> <!-- * default character map, if man.charmap.enabled is true). --> <xsl:when test="@class = 'copyright'"> <xsl:text>©</xsl:text> </xsl:when> <xsl:when test="@class = 'registered'"> <xsl:text>®</xsl:text> </xsl:when> <xsl:when test="@class = 'service'"> <xsl:text>℠</xsl:text> </xsl:when> <xsl:when test="@class = 'trade'"> <xsl:text>™</xsl:text> </xsl:when> <!-- * for Trademark element, render a trademark symbol by default --> <!-- * even if no "class" value is specified --> <xsl:when test="self::d:trademark" > <xsl:text>™</xsl:text> </xsl:when> <xsl:otherwise> <!-- * otherwise we have a Productname with no value for the --> <!-- * "class" attribute, so don't render any symbol by default --> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- * span seems to sneak through into output sometimes, possibly due --> <!-- * to failed Olink processing; so we need to catch it --> <xsl:template match="d:span"> <xsl:apply-templates/> </xsl:template> <xsl:template match="d:inlinemediaobject"> <xsl:apply-templates/> </xsl:template> <!-- * indexterm instances produce groff comments like this: --> <!-- * .\" primary: secondary: tertiary --> <xsl:template match="d:indexterm"> <xsl:text>.\" </xsl:text> <xsl:apply-templates/> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="d:primary"> <xsl:value-of select="normalize-space(.)"/> </xsl:template> <xsl:template match="d:secondary|d:tertiary"> <xsl:text>: </xsl:text> <xsl:value-of select="normalize-space(.)"/> </xsl:template> <!-- * non-empty remark instances produce groff comments --> <xsl:template match="d:remark"> <xsl:variable name="content" select="normalize-space(.)"/> <xsl:if test="not($content = '')"> <xsl:text>.\" </xsl:text> <xsl:value-of select="$content"/> <xsl:text> </xsl:text> </xsl:if> </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/manpages/inline.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/manpages/inline.xsl | |||||
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/manpages/inline.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. |