Date: Wed, 13 Nov 2013 07:07:52 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43182 - in head: ja_JP.eucJP/share/xml share/mk share/xml zh_CN.GB2312/share/xml zh_TW.Big5/share/xml Message-ID: <201311130707.rAD77qTR009140@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Wed Nov 13 07:07:52 2013 New Revision: 43182 URL: http://svnweb.freebsd.org/changeset/doc/43182 Log: - 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. Deleted: head/share/xml/l10n.ent Modified: head/ja_JP.eucJP/share/xml/freebsd-fo.xsl head/share/mk/doc.docbook.mk head/share/xml/catalog.xml head/share/xml/freebsd-xhtml-chunk.xsl head/share/xml/freebsd-xhtml-common.xsl head/share/xml/freebsd-xhtml.xsl head/share/xml/xslt10-freebsd.dtd head/zh_CN.GB2312/share/xml/freebsd-fo.xsl head/zh_TW.Big5/share/xml/freebsd-fo.xsl Modified: head/ja_JP.eucJP/share/xml/freebsd-fo.xsl ============================================================================== --- head/ja_JP.eucJP/share/xml/freebsd-fo.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/ja_JP.eucJP/share/xml/freebsd-fo.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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 Modified: head/share/mk/doc.docbook.mk ============================================================================== --- head/share/mk/doc.docbook.mk Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/mk/doc.docbook.mk Wed Nov 13 07:07:52 2013 (r43182) @@ -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_IMA # 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 # 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" Modified: head/share/xml/catalog.xml ============================================================================== --- head/share/xml/catalog.xml Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/xml/catalog.xml Wed Nov 13 07:07:52 2013 (r43182) @@ -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" /> Modified: head/share/xml/freebsd-xhtml-chunk.xsl ============================================================================== --- head/share/xml/freebsd-xhtml-chunk.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/xml/freebsd-xhtml-chunk.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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> Modified: head/share/xml/freebsd-xhtml-common.xsl ============================================================================== --- head/share/xml/freebsd-xhtml-common.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/xml/freebsd-xhtml-common.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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> Modified: head/share/xml/freebsd-xhtml.xsl ============================================================================== --- head/share/xml/freebsd-xhtml.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/xml/freebsd-xhtml.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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> Modified: head/share/xml/xslt10-freebsd.dtd ============================================================================== --- head/share/xml/xslt10-freebsd.dtd Wed Nov 13 06:10:37 2013 (r43181) +++ head/share/xml/xslt10-freebsd.dtd Wed Nov 13 07:07:52 2013 (r43182) @@ -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 Modified: head/zh_CN.GB2312/share/xml/freebsd-fo.xsl ============================================================================== --- head/zh_CN.GB2312/share/xml/freebsd-fo.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/zh_CN.GB2312/share/xml/freebsd-fo.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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 Modified: head/zh_TW.Big5/share/xml/freebsd-fo.xsl ============================================================================== --- head/zh_TW.Big5/share/xml/freebsd-fo.xsl Wed Nov 13 06:10:37 2013 (r43181) +++ head/zh_TW.Big5/share/xml/freebsd-fo.xsl Wed Nov 13 07:07:52 2013 (r43182) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311130707.rAD77qTR009140>