From: <don...@us...> - 2007-10-01 10:37:55
|
Revision: 7492 http://docbook.svn.sourceforge.net/docbook/?rev=7492&view=rev Author: dongsheng Date: 2007-10-01 03:37:52 -0700 (Mon, 01 Oct 2007) Log Message: ----------- Fix chm index display. Modified Paths: -------------- trunk/defguide5/zh/build.xml trunk/defguide5/zh/po/readme.txt trunk/defguide5/zh/stylesheets/chm.xsl Added Paths: ----------- trunk/defguide5/zh/stylesheets/manifest.xsl Modified: trunk/defguide5/zh/build.xml =================================================================== --- trunk/defguide5/zh/build.xml 2007-10-01 10:11:36 UTC (rev 7491) +++ trunk/defguide5/zh/build.xml 2007-10-01 10:37:52 UTC (rev 7492) @@ -60,20 +60,10 @@ </target> <target name="all" description="Generate document - html,chm,pdf"> - <antcall target="html.en"/> - <antcall target="pdf.en"/> <antcall target="html"/> <antcall target="pdf"/> </target> - <!-- target name="validate" description="Validate source document"> - <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false"> - <fileset dir="${basedir}${file.separator}src" - includes="**/*.xml"/> - </jing> - <ant dir="refpages" target="validate"/> - </target --> - <target name="xinclude.init"> <uptodate property="xinclude.isUpToDate" targetfile="build/defguide5.xml"> <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> @@ -174,15 +164,6 @@ </exec> </target> - <target name="chm.init"> - <uptodate property="chm.isUpToDate" targetfile="build/defguide5-zh_CN.chm"> - <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> - <srcfiles dir="../en/src" includes="*.xml"/> - <srcfiles dir="../en/refpages" includes="intro-elements.xml, references.xml"/> - <srcfiles dir="po" includes="zh_CN.po"/> - </uptodate> - </target> - <target name="html.init"> <uptodate property="html.isUpToDate" targetfile="build/html/.done"> <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> @@ -210,6 +191,15 @@ <touch file="build/html/.done"/> </target> + <target name="chm.init"> + <uptodate property="chm.isUpToDate" targetfile="build/defguide5-zh_CN.chm"> + <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> + <srcfiles dir="../en/src" includes="*.xml"/> + <srcfiles dir="../en/refpages" includes="intro-elements.xml, references.xml"/> + <srcfiles dir="po" includes="zh_CN.po"/> + </uptodate> + </target> + <target name="chm" depends="translate,chm.init" unless="chm.isUpToDate" description="Generate document - chm"> <fail> <condition> @@ -223,7 +213,7 @@ <copy file="stylesheets/defguide.css" todir="build/htmlhelp"/> <copy todir="build/htmlhelp/figures"> - <fileset dir="figures" includes="*.png"/> + <fileset dir="../en/figures" includes="*.png"/> </copy> <copy todir="build/htmlhelp/images"> <fileset dir="${docbook5.xsl}/images" includes="*.git,*.png,*.tif,*.svg"/> @@ -245,6 +235,9 @@ <copy todir="build/pdf/figures"> <fileset dir="../en/figures" includes="*.png,*.git,*.eps"/> </copy> + <copy todir="build/pdf/images"> + <fileset dir="${docbook5.xsl}/images" includes="*.git,*.png,*.tif,*.svg"/> + </copy> <filter token="docbook5.xsl" value="${docbook5.xsl}"/> <copy file="stylesheets/fo-import.tmpl.xsl" tofile="stylesheets/fo-import.xsl" filtering="true" overwrite="true"/> @@ -270,7 +263,7 @@ </java> <echo message="Making pdf ..."/> - <java classname="org.apache.fop.cli.Main" fork="true" dir="build/pdf" maxmemory="512m"> + <java classname="${fop.class}" fork="true" dir="build/pdf" maxmemory="512m"> <classpath refid="lib.classpath"/> <arg value="-c"/> <arg value="userconfig.xml"/> Modified: trunk/defguide5/zh/po/readme.txt =================================================================== --- trunk/defguide5/zh/po/readme.txt 2007-10-01 10:11:36 UTC (rev 7491) +++ trunk/defguide5/zh/po/readme.txt 2007-10-01 10:37:52 UTC (rev 7492) @@ -16,19 +16,19 @@ Format ------ - msgmerge --width=120 -o zh_CN_new.po zh_CN.po defguide5.pot + msgmerge --width=96 -o zh_CN_new.po zh_CN.po defguide5.pot mv -f zh_CN_new.po zh_CN.po msgmerge --sort-by-file --width=80 -o zh_CN_new.po zh_CN.po subversion.pot mv -f zh_CN_new.po zh_CN.po - msgmerge --width=120 -o Tortoise_zh_CN_new.po Tortoise_zh_CN.po Tortoise.pot + msgmerge --width=96 -o Tortoise_zh_CN_new.po Tortoise_zh_CN.po Tortoise.pot mv -f Tortoise_zh_CN_new.po Tortoise_zh_CN.po - msgmerge --width=120 -o TortoiseSVN_zh_CN_new.po TortoiseSVN_zh_CN.po TortoiseSVN.pot + msgmerge --width=96 -o TortoiseSVN_zh_CN_new.po TortoiseSVN_zh_CN.po TortoiseSVN.pot mv -f TortoiseSVN_zh_CN_new.po TortoiseSVN_zh_CN.po - msgmerge --width=120 -o TortoiseMerge_zh_CN_new.po TortoiseMerge_zh_CN.po TortoiseMerge.pot + msgmerge --width=96 -o TortoiseMerge_zh_CN_new.po TortoiseMerge_zh_CN.po TortoiseMerge.pot mv -f TortoiseMerge_zh_CN_new.po TortoiseMerge_zh_CN.po Modified: trunk/defguide5/zh/stylesheets/chm.xsl =================================================================== --- trunk/defguide5/zh/stylesheets/chm.xsl 2007-10-01 10:11:36 UTC (rev 7491) +++ trunk/defguide5/zh/stylesheets/chm.xsl 2007-10-01 10:37:52 UTC (rev 7492) @@ -10,14 +10,13 @@ <xsl:import href="chm-import.xsl"/> <xsl:include href="manifest.xsl"/> - <xsl:param name="use.extensions">1</xsl:param> <xsl:param name="tablecolumns.extension">0</xsl:param> <xsl:param name="callouts.extension">0</xsl:param> -<xsl:param name="base.dir" select="'htmlhelp/'"/> -<xsl:param name="htmlhelp.encoding" select="'UTF-8'"/> -<xsl:param name="chunker.output.encoding" select="'UTF-8'"/> +<xsl:param name="base.dir" select="'htmlhelp/'"/> +<xsl:param name="htmlhelp.encoding" select="'GB18030'"/> +<xsl:param name="chunker.output.encoding" select="'GB18030'"/> <xsl:param name="saxon.character.representation" select="'native'"/> <xsl:param name="suppress.navigation" select="0"/> <xsl:param name="suppress.footer.navigation" select="1"/> Copied: trunk/defguide5/zh/stylesheets/manifest.xsl (from rev 7490, trunk/defguide5/en/stylesheets/manifest.xsl) =================================================================== --- trunk/defguide5/zh/stylesheets/manifest.xsl (rev 0) +++ trunk/defguide5/zh/stylesheets/manifest.xsl 2007-10-01 10:37:52 UTC (rev 7492) @@ -0,0 +1,122 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" + version="1.0" + exclude-result-prefixes="doc"> + +<!-- ******************************************************************** + $Id: manifest.xsl 4856 2005-05-26 07:27:34Z bobstayton $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://nwalsh.com/docbook/xsl/ for copyright + and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:variable name="manifest.base.dir"> +</xsl:variable> + +<xsl:template name="generate.manifest"> + <xsl:param name="node" select="/"/> + <xsl:call-template name="write.text.chunk"> + <xsl:with-param name="filename"> + <xsl:if test="$manifest.in.base.dir != 0"> + <xsl:value-of select="$base.dir"/> + </xsl:if> + <xsl:value-of select="$manifest"/> + </xsl:with-param> + <xsl:with-param name="method" select="'text'"/> + <xsl:with-param name="content"> + <xsl:apply-templates select="$node" mode="enumerate-files"/> + </xsl:with-param> + <xsl:with-param name="encoding" select="$chunker.output.encoding"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="set|book|part|preface|chapter|appendix + |article + |reference|refentry + |sect1|sect2|sect3|sect4|sect5 + |section + |book/glossary|article/glossary|part/glossary + |book/bibliography|article/bibliography|part/bibliography + |colophon" + mode="enumerate-files"> + <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable> + <xsl:if test="$ischunk='1'"> + <xsl:call-template name="make-relative-filename"> + <xsl:with-param name="base.dir"> + <xsl:if test="$manifest.in.base.dir = 0"> + <xsl:value-of select="$base.dir"/> + </xsl:if> + </xsl:with-param> + <xsl:with-param name="base.name"> + <xsl:apply-templates mode="chunk-filename" select="."/> + </xsl:with-param> + </xsl:call-template> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates select="*" mode="enumerate-files"/> +</xsl:template> + +<xsl:template match="book/index|article/index|part/index" + mode="enumerate-files"> + <xsl:if test="$htmlhelp.output != 1"> + <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable> + <xsl:if test="$ischunk='1'"> + <xsl:call-template name="make-relative-filename"> + <xsl:with-param name="base.dir"> + <xsl:if test="$manifest.in.base.dir = 0"> + <xsl:value-of select="$base.dir"/> + </xsl:if> + </xsl:with-param> + <xsl:with-param name="base.name"> + <xsl:apply-templates mode="chunk-filename" select="."/> + </xsl:with-param> + </xsl:call-template> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates select="*" mode="enumerate-files"/> + </xsl:if> +</xsl:template> + +<xsl:template match="legalnotice" mode="enumerate-files"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:if test="$generate.legalnotice.link != 0"> + <xsl:call-template name="make-relative-filename"> + <xsl:with-param name="base.dir"> + <xsl:if test="$manifest.in.base.dir = 0"> + <xsl:value-of select="$base.dir"/> + </xsl:if> + </xsl:with-param> + <xsl:with-param name="base.name"> + <xsl:apply-templates mode="chunk-filename" select="."/> + </xsl:with-param> + </xsl:call-template> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files"> + <xsl:variable name="longdesc.uri"> + <xsl:call-template name="longdesc.uri"> + <xsl:with-param name="mediaobject" + select="."/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="mediaobject" select="."/> + + <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]"> + <xsl:call-template name="longdesc.uri"> + <xsl:with-param name="mediaobject" select="$mediaobject"/> + </xsl:call-template> + <xsl:text> </xsl:text> + </xsl:if> +</xsl:template> + +<xsl:template match="text()" mode="enumerate-files"> +</xsl:template> + +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |