<?xml version="1.0"?> <axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbk="http://docbook.org/ns/docbook" xmlns:rnd="http://docbook.org/ns/docbook/roundtrip" version="1.0"> <!--====================================--> <!--= =--> <!--= DO NOT EDIT THIS STYLESHEET =--> <!--= =--> <!--= This stylesheet is generated =--> <!--= by makeSubsections.xsl and a =--> <!--= mapping specification. =--> <!--= =--> <!--= Revision history: =--> <!--= 1.1 2007-01-10 SRB =--> <!--= Output DocBook 5.0. =--> <!--= 1.0 2005-11-08 SRB =--> <!--= Initial version. =--> <!--= =--> <!--= $Id: sections2blocks.xsl 8107 2008-08-17 22:39:58Z balls $ =--> <!--= =--> <!--====================================--> <axsl:output indent="yes"/> <axsl:strip-space elements="*"/> <axsl:preserve-space elements="dbk:para dbk:emphasis"/> <axsl:template match="dbk:appendix | dbk:article | dbk:book | dbk:chapter | dbk:part | dbk:preface | dbk:section | dbk:sect1 | dbk:sect2 | dbk:sect3 | dbk:sect4 | dbk:sect5"> <axsl:variable name="subsections" select="dbk:para[@rnd:style = "d:bibliography" or @rnd:style = "bibliography-title" or @rnd:style = "d:glossary" or @rnd:style = "glossary-title" or @rnd:style = "d:qandaset" or @rnd:style = "qandaset-title"]"/> <axsl:copy> <axsl:apply-templates select="@*"/> <axsl:choose> <axsl:when test="$subsections"> <axsl:apply-templates select="$subsections[1]/preceding-sibling::node()"/> <axsl:apply-templates select="$subsections[1]" mode="subsections"> <axsl:with-param name="subsections" select="$subsections[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:when test="dbk:appendix | dbk:article | dbk:book | dbk:chapter | dbk:part | dbk:preface | dbk:section | dbk:sect1 | dbk:sect2 | dbk:sect3 | dbk:sect4 | dbk:sect5"> <axsl:apply-templates select="*[self::dbk:appendix | self::dbk:article | self::dbk:book | self::dbk:chapter | self::dbk:part | self::dbk:preface | self::dbk:section | self::dbk:sect1 | self::dbk:sect2 | self::dbk:sect3 | self::dbk:sect4 | self::dbk:sect5][1]/preceding-sibling::node()"/> <axsl:apply-templates select="dbk:appendix | dbk:article | dbk:book | dbk:chapter | dbk:part | dbk:preface | dbk:section | dbk:sect1 | dbk:sect2 | dbk:sect3 | dbk:sect4 | dbk:sect5"/> </axsl:when> <axsl:otherwise> <axsl:apply-templates/> </axsl:otherwise> </axsl:choose> </axsl:copy> <axsl:choose> <axsl:when test="following-sibling::*[self::dbk:appendix | self::dbk:article | self::dbk:book | self::dbk:chapter | self::dbk:part | self::dbk:preface | self::dbk:section | self::dbk:sect1 | self::dbk:sect2 | self::dbk:sect3 | self::dbk:sect4 | self::dbk:sect5] | following-sibling::dbk:para[@rnd:style = "d:bibliography" or @rnd:style = "bibliography-title" or @rnd:style = "d:glossary" or @rnd:style = "glossary-title" or @rnd:style = "d:qandaset" or @rnd:style = "qandaset-title"]"> <axsl:variable name="nextComponent" select="following-sibling::*[self::dbk:appendix | self::dbk:article | self::dbk:book | self::dbk:chapter | self::dbk:part | self::dbk:preface | self::dbk:section | self::dbk:sect1 | self::dbk:sect2 | self::dbk:sect3 | self::dbk:sect4 | self::dbk:sect5|self::dbk:para[@rnd:style = "d:bibliography" or @rnd:style = "bibliography-title" or @rnd:style = "d:glossary" or @rnd:style = "glossary-title" or @rnd:style = "d:qandaset" or @rnd:style = "qandaset-title"]][1]"/> <axsl:apply-templates select="following-sibling::*[generate-id(following-sibling::*[self::dbk:appendix | self::dbk:article | self::dbk:book | self::dbk:chapter | self::dbk:part | self::dbk:preface | self::dbk:section | self::dbk:sect1 | self::dbk:sect2 | self::dbk:sect3 | self::dbk:sect4 | self::dbk:sect5|self::dbk:para[@rnd:style = "d:bibliography" or @rnd:style = "bibliography-title" or @rnd:style = "d:glossary" or @rnd:style = "glossary-title" or @rnd:style = "d:qandaset" or @rnd:style = "qandaset-title"]][1]) = generate-id($nextComponent)]"/> </axsl:when> <axsl:otherwise> <axsl:apply-templates select="following-sibling::*"/> </axsl:otherwise> </axsl:choose> </axsl:template> <axsl:template match="dbk:para" mode="subsections"> <axsl:param name="subsections" select="/.."/> <axsl:choose> <axsl:when test="@rnd:style = "d:bibliography" or @rnd:style = "bibliography-title""> <bibliography xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:variable name="bibliodivs" select="following-sibling::dbk:para[@rnd:style = "d:bibliodiv" or @rnd:style = "bibliodiv-title"]"/> <axsl:choose> <axsl:when test="$bibliodivs"> <axsl:apply-templates select="following-sibling::*[1]" mode="bibliodivs"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> <axsl:with-param name="bibliodivs" select="$bibliodivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:otherwise> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </bibliography> </axsl:when> <axsl:when test="@rnd:style = "d:glossary" or @rnd:style = "glossary-title""> <glossary xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:variable name="glossdivs" select="following-sibling::dbk:para[@rnd:style = "d:glossdiv" or @rnd:style = "glossdiv-title"]"/> <axsl:choose> <axsl:when test="$glossdivs"> <axsl:apply-templates select="following-sibling::*[1]" mode="glossdivs"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> <axsl:with-param name="glossdivs" select="$glossdivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:otherwise> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </glossary> </axsl:when> <axsl:when test="@rnd:style = "d:qandaset" or @rnd:style = "qandaset-title""> <qandaset xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:variable name="qandadivs" select="following-sibling::dbk:para[@rnd:style = "d:qandadiv" or @rnd:style = "qandadiv-title"]"/> <axsl:choose> <axsl:when test="$qandadivs"> <axsl:apply-templates select="following-sibling::*[1]" mode="qandadivs"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> <axsl:with-param name="qandadivs" select="$qandadivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:otherwise> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$subsections[1]"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </qandaset> </axsl:when> </axsl:choose> </axsl:template> <axsl:template match="*" mode="subsections"> <axsl:param name="subsections" select="/.."/> <axsl:copy> <axsl:apply-templates select="@*"/> <axsl:apply-templates mode="subsections"/> </axsl:copy> </axsl:template> <axsl:template match="dbk:para" mode="bibliodivs"> <axsl:param name="nextSubsection" select="/.."/> <axsl:param name="bibliodivs" select="/.."/> <axsl:choose> <axsl:when test="generate-id() = generate-id($nextSubsection)"/> <axsl:when test="@rnd:style = "d:bibliodiv" or @rnd:style = "bibliodiv-title""> <bibliodiv xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="nextbibliodiv" select="$bibliodivs[1]"/> </axsl:apply-templates> </bibliodiv> <axsl:choose> <axsl:when test="$nextSubsection and $bibliodivs and count($nextSubsection/preceding-sibling::* | $bibliodivs[1]) = count($nextSubsection/preceding-sibling::*)"> <axsl:apply-templates select="$bibliodivs[1]" mode="bibliodivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="bibliodivs" select="$bibliodivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:when test="$bibliodivs"> <axsl:apply-templates select="$bibliodivs[1]" mode="bibliodivs"> <axsl:with-param name="bibliodivs" select="$bibliodivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> </axsl:choose> </axsl:when> <axsl:otherwise> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="bibliodivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </axsl:template> <axsl:template match="dbk:para" mode="glossdivs"> <axsl:param name="nextSubsection" select="/.."/> <axsl:param name="glossdivs" select="/.."/> <axsl:choose> <axsl:when test="generate-id() = generate-id($nextSubsection)"/> <axsl:when test="@rnd:style = "d:glossdiv" or @rnd:style = "glossdiv-title""> <glossdiv xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="nextglossdiv" select="$glossdivs[1]"/> </axsl:apply-templates> </glossdiv> <axsl:choose> <axsl:when test="$nextSubsection and $glossdivs and count($nextSubsection/preceding-sibling::* | $glossdivs[1]) = count($nextSubsection/preceding-sibling::*)"> <axsl:apply-templates select="$glossdivs[1]" mode="glossdivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="glossdivs" select="$glossdivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:when test="$glossdivs"> <axsl:apply-templates select="$glossdivs[1]" mode="glossdivs"> <axsl:with-param name="glossdivs" select="$glossdivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> </axsl:choose> </axsl:when> <axsl:otherwise> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="glossdivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </axsl:template> <axsl:template match="dbk:para" mode="qandadivs"> <axsl:param name="nextSubsection" select="/.."/> <axsl:param name="qandadivs" select="/.."/> <axsl:choose> <axsl:when test="generate-id() = generate-id($nextSubsection)"/> <axsl:when test="@rnd:style = "d:qandadiv" or @rnd:style = "qandadiv-title""> <qandadiv xmlns="http://docbook.org/ns/docbook"> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="nextqandadiv" select="$qandadivs[1]"/> </axsl:apply-templates> </qandadiv> <axsl:choose> <axsl:when test="$nextSubsection and $qandadivs and count($nextSubsection/preceding-sibling::* | $qandadivs[1]) = count($nextSubsection/preceding-sibling::*)"> <axsl:apply-templates select="$qandadivs[1]" mode="qandadivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="qandadivs" select="$qandadivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> <axsl:when test="$qandadivs"> <axsl:apply-templates select="$qandadivs[1]" mode="qandadivs"> <axsl:with-param name="qandadivs" select="$qandadivs[position() != 1]"/> </axsl:apply-templates> </axsl:when> </axsl:choose> </axsl:when> <axsl:otherwise> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="qandadivs"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </axsl:template> <axsl:template match="*" mode="terminal"> <axsl:param name="nextSubsection" select="/.."/> <axsl:param name="nextbibliodiv" select="/.."/> <axsl:param name="nextglossdiv" select="/.."/> <axsl:param name="nextqandadiv" select="/.."/> <axsl:choose> <axsl:when test="generate-id() = generate-id($nextSubsection)"/> <axsl:when test="generate-id() = generate-id($nextbibliodiv)"/> <axsl:when test="generate-id() = generate-id($nextglossdiv)"/> <axsl:when test="generate-id() = generate-id($nextqandadiv)"/> <axsl:otherwise> <axsl:call-template name="copy"/> <axsl:apply-templates select="following-sibling::*[1]" mode="terminal"> <axsl:with-param name="nextSubsection" select="$nextSubsection"/> <axsl:with-param name="nextbibliodiv" select="$nextbibliodiv"/> <axsl:with-param name="nextglossdiv" select="$nextglossdiv"/> <axsl:with-param name="nextqandadiv" select="$nextqandadiv"/> </axsl:apply-templates> </axsl:otherwise> </axsl:choose> </axsl:template> <axsl:template match="*"> <axsl:copy> <axsl:apply-templates select="@*"/> <axsl:apply-templates/> </axsl:copy> </axsl:template> <axsl:template name="copy"> <axsl:copy> <axsl:apply-templates select="@*"/> <axsl:apply-templates/> </axsl:copy> </axsl:template> <axsl:template match="@*"> <axsl:copy/> </axsl:template> </axsl: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/roundtrip/sections2blocks.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/roundtrip/sections2blocks.xsl | |||||
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/roundtrip/sections2blocks.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. |