<?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:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="doc d" version="1.0"> <!-- ******************************************************************** $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z 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. ******************************************************************** --> <doc:reference xmlns=""> <referenceinfo xmlns="http://www.w3.org/1999/xhtml"> <releaseinfo role="meta"> $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> <copyright><year>1999</year><year>2000</year> <holder>Norman Walsh</holder> </copyright> </referenceinfo> <title xmlns="http://www.w3.org/1999/xhtml">HTML EBNF Reference</title> <partintro xmlns="http://www.w3.org/1999/xhtml"> <section><title>Introduction</title> <para>This is technical reference documentation for the DocBook XSL Stylesheets; it documents (some of) the parameters, templates, and other elements of the stylesheets.</para> <para>This reference describes the templates and parameters relevant to formatting EBNF markup.</para> <para>This is not intended to be <quote>user</quote> documentation. It is provided for developers writing customization layers for the stylesheets, and for anyone who's interested in <quote>how it works</quote>.</para> <para>Although I am trying to be thorough, this documentation is known to be incomplete. Don't forget to read the source, too :-)</para> </section> </partintro> </doc:reference> <!-- ==================================================================== --> <xsl:template match="d:productionset"> <table width="100%" cellpadding="5"> <xsl:if test="$ebnf.table.bgcolor != ''"> <xsl:attribute name="style"><xsl:text>background-color: </xsl:text> <xsl:value-of select="$ebnf.table.bgcolor"/> </xsl:attribute> </xsl:if> <xsl:if test="$ebnf.table.border != 0"> <xsl:attribute name="border">1</xsl:attribute> </xsl:if> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute> <xsl:attribute name="summary"> <xsl:text>EBNF</xsl:text> <xsl:if test="d:title|d:info/d:title"> <xsl:text> for </xsl:text> <xsl:value-of select="d:title|d:info/d:title[1]"/> </xsl:if> </xsl:attribute> <xsl:if test="d:title|d:info/d:title"> <tr> <th align="{$direction.align.start}" valign="top"> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates select="d:title|d:info/d:title[1]"/> </th> </tr> </xsl:if> <tr> <td> <table border="0" width="99%" cellpadding="0"> <xsl:if test="$ebnf.table.bgcolor != ''"> <xsl:attribute name="style"><xsl:text>background-color: </xsl:text> <xsl:value-of select="$ebnf.table.bgcolor"/> </xsl:attribute> </xsl:if> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute> <xsl:attribute name="summary">EBNF productions</xsl:attribute> <xsl:apply-templates select="d:production|d:productionrecap"/> </table> </td> </tr> </table> </xsl:template> <xsl:template match="d:productionset/d:title"> <xsl:apply-templates/> </xsl:template> <xsl:template match="d:production"> <xsl:param name="recap" select="false()"/> <tr> <td align="{$direction.align.start}" valign="top"> <xsl:text>[</xsl:text> <xsl:apply-templates select="." mode="label.markup"/> <xsl:text>]</xsl:text> </td> <td align="{$direction.align.end}" valign="top"> <xsl:choose> <xsl:when test="$recap"> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="."/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="d:lhs"/> </a> </xsl:when> <xsl:otherwise> <xsl:call-template name="id.attribute"/> <xsl:call-template name="anchor"/> <xsl:apply-templates select="d:lhs"/> </xsl:otherwise> </xsl:choose> </td> <td valign="top" align="center"> <xsl:copy-of select="$ebnf.assignment"/> </td> <td valign="top"> <xsl:apply-templates select="d:rhs"/> <xsl:copy-of select="$ebnf.statement.terminator"/> </td> <td align="{$direction.align.start}" valign="top"> <xsl:choose> <xsl:when test="d:rhs/d:lineannotation|d:constraint"> <xsl:apply-templates select="d:rhs/d:lineannotation" mode="rhslo"/> <xsl:apply-templates select="d:constraint"/> </xsl:when> <xsl:otherwise> <xsl:text> </xsl:text> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:template> <xsl:template match="d:productionrecap"> <xsl:variable name="targets" select="key('id',@linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:if test="count($targets)=0"> <xsl:message> <xsl:text>Error: no ID for productionrecap linkend: </xsl:text> <xsl:value-of select="@linkend"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:if> <xsl:if test="count($targets)>1"> <xsl:message> <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text> <xsl:value-of select="@linkend"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:if> <xsl:apply-templates select="$target"> <xsl:with-param name="recap" select="true()"/> </xsl:apply-templates> </xsl:template> <xsl:template match="d:lhs"> <xsl:apply-templates/> </xsl:template> <xsl:template match="d:rhs"> <xsl:apply-templates/> <xsl:if test="following-sibling::d:rhs"> <xsl:text> |</xsl:text> <br/> </xsl:if> </xsl:template> <xsl:template match="d:nonterminal"> <xsl:variable name="linkend"> <xsl:call-template name="xpointer.idref"> <xsl:with-param name="xpointer" select="@def"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="check.id.unique"> <xsl:with-param name="linkend" select="$linkend"/> </xsl:call-template> <xsl:call-template name="check.idref.targets"> <xsl:with-param name="linkend" select="$linkend"/> <xsl:with-param name="element-list">production</xsl:with-param> </xsl:call-template> <!-- If you don't provide content, you can't point outside this doc. --> <xsl:choose> <xsl:when test="*|text()"><!--nop--></xsl:when> <xsl:otherwise> <xsl:if test="$linkend = ''"> <xsl:message> <xsl:text>Non-terminals with no content must point to </xsl:text> <xsl:text>production elements in the current document.</xsl:text> </xsl:message> <xsl:message> <xsl:text>Invalid xpointer for empty nt: </xsl:text> <xsl:value-of select="@def"/> </xsl:message> </xsl:if> </xsl:otherwise> </xsl:choose> <xsl:variable name="href"> <xsl:choose> <xsl:when test="$linkend != ''"> <xsl:variable name="targets" select="key('id',$linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="@def"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <a href="{$href}"> <xsl:choose> <xsl:when test="*|text()"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$linkend != ''"> <xsl:variable name="targets" select="key('id',$linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:apply-templates select="$target/d:lhs"/> </xsl:when> <xsl:otherwise> <xsl:text>???</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </a> </xsl:template> <xsl:template match="d:rhs/d:lineannotation"> <!--nop--> </xsl:template> <xsl:template match="d:rhs/d:lineannotation" mode="rhslo"> <xsl:text>/* </xsl:text> <xsl:apply-templates/> <xsl:text> */</xsl:text> <br/> </xsl:template> <xsl:template match="d:constraint"> <xsl:call-template name="check.id.unique"> <xsl:with-param name="linkend" select="@linkend"/> </xsl:call-template> <xsl:call-template name="check.idref.targets"> <xsl:with-param name="linkend" select="@linkend"/> <xsl:with-param name="element-list">constraintdef</xsl:with-param> </xsl:call-template> <xsl:variable name="href"> <xsl:variable name="targets" select="key('id',@linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target"/> </xsl:call-template> </xsl:variable> <xsl:text>[ </xsl:text> <xsl:choose> <xsl:when test="@role"> <xsl:value-of select="@role"/> <xsl:text>: </xsl:text> </xsl:when> <xsl:otherwise> <xsl:variable name="targets" select="key('id',@linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:if test="$target/@role"> <xsl:value-of select="$target/@role"/> <xsl:text>: </xsl:text> </xsl:if> </xsl:otherwise> </xsl:choose> <a href="{$href}"> <xsl:variable name="targets" select="key('id',@linkend)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:apply-templates select="$target" mode="title.markup"/> </a> <xsl:text> ]</xsl:text> <xsl:if test="following-sibling::d:constraint"> <br/> </xsl:if> </xsl:template> <xsl:template match="d:constraintdef"> <div> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="id.attribute"/> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="d:constraintdef/d:title"> <p><strong><xsl:apply-templates/></strong></p> </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-1_1/ebnf.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-1_1/ebnf.xsl | |||||
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/xhtml-1_1/ebnf.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. |