- Enable docformatnav only when $docformatnav is set to 1.

- Set $docformatnav to 1 when $FORMATS contains "html" and "html-split" at the
  same time.
- Fix localization of docformatnav using &docnavi.{split,single};.
- Do not create <a> element which points to the document itself.
- Remove share/xml/l10n.ent.
- Fix URI of freebsd-fo-cjk.xsl.
This commit is contained in:
Hiroki Sato 2013-11-13 07:07:52 +00:00
parent 52f6d56540
commit b436d0a16d
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43182
10 changed files with 51 additions and 31 deletions

View file

@ -8,7 +8,7 @@
exclude-result-prefixes="#default">
<!-- Pull in the CJK-specific stylesheet -->
<xsl:import href="http://www.FreeBSD.org/XML/share/xsl/freebsd-fo-cjk.xsl"/>
<xsl:import href="http://www.FreeBSD.org/XML/share/xml/freebsd-fo-cjk.xsl"/>
<!--
JAPANESE-SPECIFIC PARAMETERS

View file

@ -134,6 +134,10 @@ LOCAL_CSS_SHEET= ${CSS_SHEET:T}
CLEANFILES+= ${DOC}.parsed.xml ${DOC}.parsed.print.xml
.if ${FORMATS:R:Mhtml-split} && ${FORMATS:R:Mhtml}
XSLTPROCOPTS+= --param docformatnav "'1'"
.endif
.for _curformat in ${FORMATS}
_cf=${_curformat}
@ -254,7 +258,7 @@ ${sch:T}.xsl: ${sch}
# Parsed XML -------------------------------------------------------
${DOC}.parsed.xml: ${SRCS}
${DOC}.parsed.xml: ${SRCS} ${XML_INCLUDES}
${XMLLINT} --nonet --noent --valid --dropdtd --xinclude ${MASTERDOC} > ${.TARGET}.tmp
.if defined(PROFILING)
@${ECHO} "==> Profiling"
@ -269,11 +273,11 @@ ${DOC}.parsed.xml: ${SRCS}
# XHTML -------------------------------------------------------------
index.html: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET} ${XML_INCLUDES}
${XSLTPROC} ${XSLTPROCOPTS} ${XSLXHTMLCHUNK} ${DOC}.parsed.xml
${DOC}.html: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
${LOCAL_CSS_SHEET}
${LOCAL_CSS_SHEET} ${XML_INCLUDES}
${XSLTPROC} ${XSLTPROCOPTS} ${XSLXHTML} ${DOC}.parsed.xml > ${.TARGET}
${DOC}.html-split.tar: HTML.manifest ${LOCAL_IMAGES_LIB} \
@ -295,7 +299,7 @@ ${DOC}.html.tar: ${DOC}.html ${LOCAL_IMAGES_LIB} \
# EPUB -------------------------------------------------------------
${DOC}.epub: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
${CSS_SHEET}
${CSS_SHEET} ${XML_INCLUDES}
${XSLTPROC} ${XSLTPROCOPTS} ${XSLEPUB} ${DOC}.parsed.xml
.if defined(LOCAL_IMAGES_LIB) || defined(LOCAL_IMAGES_PNG)
.for f in ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
@ -333,7 +337,7 @@ ${.CURDIR:T}.pdb.${_curcomp}: ${DOC}.pdb.${_curcomp}
# PS/PDF/RTF -----------------------------------------------------------------
${DOC}.fo: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${DOC}.parsed.xml
${DOC}.fo: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${DOC}.parsed.xml ${XML_INCLUDES}
${XSLTPROC} ${XSLTPROCOPTS} ${XSLFO} ${DOC}.parsed.print.xml > ${.TARGET}
.if ${RENDERENGINE} == "fop"

View file

@ -50,7 +50,7 @@
uri="l10n-common.ent" />
<public
publicId="-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
uri="l10n.ent" />
uri="file:///dev/null" />
<public
publicId="-//FreeBSD//DOCUMENT FreeBSD Language Neutral XSLT Library//EN"
uri="libcommon.xsl" />

View file

@ -1,5 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
"http://www.FreeBSD.org/XML/share/xml/xslt10-freebsd.dtd">
<!-- $FreeBSD$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@ -17,4 +18,5 @@
<xsl:import href="http://www.FreeBSD.org/XML/lang/share/xml/freebsd-xhtml.xsl"/>
<xsl:param name="generate.legalnotice.link" select="'1'"/>
<xsl:param name="html.chunk" select="'1'"/>
</xsl:stylesheet>

View file

@ -1,5 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
"http://www.FreeBSD.org/XML/share/xml/xslt10-freebsd.dtd">
<!-- $FreeBSD$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@ -33,6 +34,7 @@
<xsl:param name="make.valid.html" select="1"/>
<xsl:param name="html.cleanup" select="1"/>
<xsl:param name="make.clean.html" select="1"/>
<xsl:param name="docformatnav" select="0"/>
<xsl:param name="local.l10n.xml" select="document('')"/>
<i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0">
@ -53,6 +55,7 @@
</xsl:template>
<xsl:template name="docformatnav">
<xsl:variable name="docformatnav.type" />
<xsl:variable name="single.fname">
<xsl:choose>
<xsl:when test="/db:book">book.html</xsl:when>
@ -61,8 +64,25 @@
</xsl:variable>
<div class="docformatnavi">
[ <a href="index.html">Split HTML</a> /
<a href="{$single.fname}">Single HTML</a> ]
[
<xsl:choose>
<xsl:when test="$html.chunk = 0">
<a href="index.html">&docnavi.split-html;</a>
</xsl:when>
<xsl:otherwise>
&docnavi.split-html;
</xsl:otherwise>
</xsl:choose>
/
<xsl:choose>
<xsl:when test="$html.chunk = 0">
&docnavi.single-html;
</xsl:when>
<xsl:otherwise>
<a href="{$single.fname}">&docnavi.single-html;</a>
</xsl:otherwise>
</xsl:choose>
]
</div>
</xsl:template>
@ -250,13 +270,17 @@
<!-- Hook in format navigation at the end of the titlepage -->
<xsl:template name="book.titlepage.separator">
<xsl:call-template name="docformatnav"/>
<xsl:if test="not($docformatnav = 0)">
<xsl:call-template name="docformatnav" />
</xsl:if>
<hr/>
</xsl:template>
<xsl:template name="article.titlepage.separator">
<xsl:call-template name="docformatnav"/>
<xsl:if test="not($docformatnav = 0)">
<xsl:call-template name="docformatnav" />
</xsl:if>
<hr/>
</xsl:template>

View file

@ -1,5 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
"http://www.FreeBSD.org/XML/share/xml/xslt10-freebsd.dtd">
<!-- $FreeBSD$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@ -12,4 +13,6 @@
<xsl:import href="http://www.FreeBSD.org/XML/share/xml/freebsd-xhtml-common.xsl"/>
<xsl:import href="http://www.FreeBSD.org/XML/lang/share/xml/freebsd-xhtml.xsl"/>
<xsl:param name="html.chunk" select="'0'"/>
</xsl:stylesheet>

View file

@ -1,13 +0,0 @@
<!-- -*- sgml -*-
Language Specific Entities for Localization.
An entity here can be overridden with the localized version
when the entity is defined in
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
in language-specific directory. Otherwise the following entity
set is used by default.
This file should be empty.
$FreeBSD$
-->

View file

@ -23,12 +23,12 @@
<!ENTITY % l10n.ent
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Entities//EN"
"l10n.ent">
"http://www.FreeBSD.org/XML/lang/share/xml/l10n.ent">
%l10n.ent;
<!ENTITY % l10n-common.ent
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Language Specific Common Entities//EN"
"l10n-common.ent">
"http://www.FreeBSD.org/XML/share/xml/l10n-common.ent">
%l10n-common.ent;
<!ENTITY % common.ent

View file

@ -8,7 +8,7 @@
exclude-result-prefixes="#default">
<!-- Pull in the CJK-specific stylesheet -->
<xsl:import href="http://www.FreeBSD.org/XML/doc/share/xsl/freebsd-fo-cjk.xsl"/>
<xsl:import href="http://www.FreeBSD.org/XML/share/xml/freebsd-fo-cjk.xsl"/>
<!--
CHINESE-SPECIFIC PARAMETERS

View file

@ -8,7 +8,7 @@
exclude-result-prefixes="#default">
<!-- Pull in the CJK-specific stylesheet -->
<xsl:import href="http://www.FreeBSD.org/XML/doc/share/xsl/freebsd-fo-cjk.xsl"/>
<xsl:import href="http://www.FreeBSD.org/XML/share/xml/freebsd-fo-cjk.xsl"/>
<!--
CHINESE-SPECIFIC PARAMETERS