From: <don...@us...> - 2007-10-08 03:59:07
|
Revision: 7504 http://docbook.svn.sourceforge.net/docbook/?rev=7504&view=rev Author: dongsheng Date: 2007-10-07 20:59:03 -0700 (Sun, 07 Oct 2007) Log Message: ----------- Update ant building of defguide5: * list-elements sort fix. * correct main classname of saxon 6.5. * some chm fix. Modified Paths: -------------- trunk/defguide5/build-common.xml trunk/defguide5/en/build.xml trunk/defguide5/en/refpages/build.xml trunk/defguide5/zh/build.xml trunk/defguide5/zh/po/readme.txt trunk/defguide5/zh/stylesheets/chm.xsl trunk/defguide5/zh/stylesheets/fo-import.tmpl.xsl trunk/defguide5/zh/stylesheets/fo.xsl trunk/defguide5/zh/stylesheets/html-import.tmpl.xsl Added Paths: ----------- trunk/defguide5/.hgignore Added: trunk/defguide5/.hgignore =================================================================== --- trunk/defguide5/.hgignore (rev 0) +++ trunk/defguide5/.hgignore 2007-10-08 03:59:03 UTC (rev 7504) @@ -0,0 +1,24 @@ +syntax: glob +*~ +*.7z +*.[ad]sc +*.[ao] +*.bz? +*.class +*.deb +*.gz +*.jar +*.mo +*.py[co] +*.rpm +*.tbz +*.tgz +*.tmp +*.rar +*.zip +.svn +.bzr +.git +build +build-common.properties +*-import.xsl Modified: trunk/defguide5/build-common.xml =================================================================== --- trunk/defguide5/build-common.xml 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/build-common.xml 2007-10-08 03:59:03 UTC (rev 7504) @@ -21,10 +21,10 @@ </and> </condition> <fail message="RELAX NG Support(jing) NOT Present !" unless="rng.present"/> - + <condition property="saxon.present"> <and> - <available classname="org.apache.bsf.BSFManager" classpathref="lib.classpath"/> + <available classname="com.icl.saxon.StyleSheet" classpathref="lib.classpath"/> <available classname="net.sf.saxon.Transform" classpathref="lib.classpath"/> </and> </condition> Modified: trunk/defguide5/en/build.xml =================================================================== --- trunk/defguide5/en/build.xml 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/en/build.xml 2007-10-08 03:59:03 UTC (rev 7504) @@ -18,7 +18,7 @@ <property file="../build-common.properties"/> <import file="../build-common.xml"/> - <property name="doc.name" value="defguide5-en"/> + <property name="doc.name" value="defguide5"/> <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/> @@ -36,13 +36,15 @@ </target> <target name="init" depends="init-avail" description="Check runtime class"/> - - <target name="validate" description="Validate source document"> + + <target name="validate" depends="xinclude" description="Validate document"> <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false"> <fileset dir="${basedir}${file.separator}src" includes="**/*.xml"/> </jing> - <!--ant dir="refpages" target="validate"/--> + <!--ant dir="refpages" target="validate"/--> + <jing rngfile="${docbook5.home}/rng/docbookxi.rng" + file="../en/build/defguide5.xml"/> </target> <target name="all" description="Generate document - html,chm,pdf"> Modified: trunk/defguide5/en/refpages/build.xml =================================================================== --- trunk/defguide5/en/refpages/build.xml 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/en/refpages/build.xml 2007-10-08 03:59:03 UTC (rev 7504) @@ -40,7 +40,7 @@ for(xml : xmls) { name = xml.getName(); if(name.startsWith("db.") && name.endsWith(".xml")) { - path = "<xi:include href='elements/build/" + name + "'/>\n"; + path = db_element.getName() + "/" + name; if(db_element.getName().equals("ANY")) any.add(path); else @@ -50,23 +50,19 @@ } } - cmp = new Comparator() { - int compare(p1, p2) { - p1 = p1.substring(p1.indexOf('.') + 1, p1.length()); - if(p1.charAt(0) == '_') p1 = p1.substring(1); - - p2 = p2.substring(p2.indexOf('.') + 1, p2.length()); - if(p2.charAt(0) == '_') p2 = p2.substring(1); - - return p1.compareTo(p2); - } - }; files = files.toArray(new String[files.size()]); - Arrays.sort(files, cmp); + Arrays.sort(files); + for(f : files) { + file.write("<xi:include href='elements/build" + + f.substring(f.indexOf('/')) + "'/>\n"); + } + any = any.toArray(new String[any.size()]); - Arrays.sort(any, cmp); - for(f : files) file.write(f); - for(f : any) file.write(f); + Arrays.sort(any); + for(f : any) { + file.write("<xi:include href='elements/build" + + f.substring(f.indexOf('/')) + "'/>\n"); + } file.write("\n</reference>\n"); @@ -155,14 +151,20 @@ </target> <target name="validate" description="Validate source document"> - <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false"> + <jing rngfile="${docbook5.home}/rng/docbookxi.rng" checkid="false"> <fileset dir="${basedir}${file.separator}elements" includes="**/*.xml" excludes="build/**"/> </jing> </target> - <!-- attavlue: db.area.xml, db.areaset.xml, db.areaspec.xml --> - <target name="validate-build" description="Validate generated document"> + <!-- itemizedlist: + <itemizedlist spacing="compact" role="element-synopsis"/> + + db.html.col.xml, db.html.colgroup.xml, db.html.informaltable.xml, + db.html.table.xml, db.html.tbody.xml, db.html.td.xml, db.html.tfoot.xml, + db.html.th.xml, db.html.thead.xml, db.html.tr.xml + --> + <target name="validate-build" depends="elements" description="Validate generated document"> <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false"> <fileset dir="${basedir}${file.separator}elements${file.separator}/build" includes="**/*.xml"/> Modified: trunk/defguide5/zh/build.xml =================================================================== --- trunk/defguide5/zh/build.xml 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/build.xml 2007-10-08 03:59:03 UTC (rev 7504) @@ -46,17 +46,19 @@ <delete file="stylesheets/chm-import.xsl"/> <delete file="stylesheets/fo-import.xsl"/> <delete file="stylesheets/html-import.xsl"/> + <delete dir="../en/build"/> <delete file="../en/bookinfo.xml"/> - <!-- ant dir="../en/refpages" target="clean"/ --> + <!-- dir="../en" target="clean"/ --> </target> <target name="init" depends="init-avail" description="Check runtime class"/> <target name="validate" depends="xinclude" description="Validate document"> - <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false"> - <fileset dir="build" - includes="defguide5.xml"/> - </jing> + <jing rngfile="${docbook5.home}/rng/docbook.rng" + file="../en/build/defguide5.xml"/> + <!-- Don't uncomment this unless xml2po support namespace ! --> + <!--jing rngfile="${docbook5.home}/rng/docbook.rng" + file="../en/build/defguide5-zh_CN.xml"/--> </target> <target name="all" description="Generate document - html,chm,pdf"> @@ -64,39 +66,10 @@ <antcall target="pdf"/> </target> - <target name="xinclude.init"> - <uptodate property="xinclude.isUpToDate" targetfile="build/defguide5.xml"> - <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> - <srcfiles dir="../en/src" includes="*.xml"/> - <srcfiles dir="../en/refpages" includes="intro-elements.xml, references.xml"/> - </uptodate> + <target name="xinclude" description="XInclude processing on document"> + <ant dir="../en" target="xinclude"/> </target> - <target name="xinclude" depends="xinclude.init" unless="xinclude.isUpToDate" description="XInclude processing on document"> - - <copy todir="build/figures"> - <fileset dir="../en/figures" includes="*.png,*.git,*.eps"/> - </copy> - - <copy file="list-elements.xml" todir="../en/refpages" overwrite="true"/> - - <exec dir="." executable="xsltproc"> - <arg value="--nonet"/> - <arg value="--output"/> - <arg value="../en/bookinfo.xml"/> - <arg value="../en/VERSION.xml"/> - <arg value="../en/VERSION.xml"/> - </exec> - - <exec dir="." executable="xmllint"> - <arg value="--nonet"/> - <arg value="--xinclude"/> - <arg value="--output"/> - <arg value="build/defguide5.xml"/> - <arg value="../en/book.xml"/> - </exec> - </target> - <target name="pot.init"> <uptodate property="pot.isUpToDate" targetfile="po/defguide5.pot"> <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> @@ -105,7 +78,7 @@ </uptodate> </target> - <target name="pot" depends="pot.init,xinclude" unless="pot.isUpToDate" description="Generate document - pot"> + <target name="pot" depends="xinclude,pot.init" unless="pot.isUpToDate" description="Generate document - pot"> <fail> <condition> <or> @@ -116,16 +89,16 @@ </fail> <echo message="Making defguide5.pot ..."/> - <exec dir="." executable="python"> + <exec dir="${basedir}" executable="python"> <arg value="xml2po.py"/> <arg value="-e"/> <arg value="-o"/> <arg value="po/defguide5.pot"/> - <arg value="build/defguide5.xml"/> + <arg value="../en/build/defguide5.xml"/> </exec> <echo message="Merging zh_CN.po ..."/> - <exec dir="." executable="msgmerge"> + <exec dir="${basedir}" executable="msgmerge"> <arg value="--no-wrap"/> <arg value="-o"/> <arg value="po/zh_CN.po.new"/> @@ -136,7 +109,7 @@ </target> <target name="translate.init" depends="pot"> - <uptodate property="translate.isUpToDate" targetfile="build/defguide5-zh_CN.xml"> + <uptodate property="translate.isUpToDate" targetfile="../en/build/defguide5-zh_CN.xml"> <srcfiles dir="../en" includes="book.xml, VERSION.xml"/> <srcfiles dir="../en/src" includes="*.xml"/> <srcfiles dir="../en/refpages" includes="intro-elements.xml, references.xml"/> @@ -145,22 +118,22 @@ </target> <target name="translate" depends="translate.init" unless="translate.isUpToDate" description="Translate document"> - <exec dir="." executable="msgfmt"> + <exec dir="${basedir}" executable="msgfmt"> <arg value="po/zh_CN.po"/> <arg value="-o"/> <arg value="po/zh_CN.mo"/> </exec> <echo message="Translating defguide5-zh_CN.xml ..."/> - <exec dir="." executable="python"> + <exec dir="${basedir}" executable="python"> <arg value="xml2po.py"/> <arg value="-l"/> <arg value="zh-cn"/> <arg value="-t"/> <arg value="po/zh_CN.mo"/> <arg value="-o"/> - <arg value="build/defguide5-zh_CN.xml"/> - <arg value="build/defguide5.xml"/> + <arg value="../en/build/defguide5-zh_CN.xml"/> + <arg value="../en/build/defguide5.xml"/> </exec> </target> @@ -169,24 +142,26 @@ <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="../en/refpages/elements" includes="*/*.xml" excludes="build/*"/> <srcfiles dir="po" includes="zh_CN.po"/> </uptodate> </target> <target name="html" depends="translate,html.init" unless="html.isUpToDate" description="Generate document - html"> + <copy file="stylesheets/defguide.css" todir="build/html"/> <copy todir="build/html/figures"> <fileset dir="../en/figures" includes="*.png,*.git,*.eps"/> </copy> - <filter token="docbook5.xsl" value="${docbook5.xsl}"/> + <filter token="docbook5.xsl.url" value="${docbook5.xsl.url}"/> <copy file="stylesheets/html-import.tmpl.xsl" tofile="stylesheets/html-import.xsl" filtering="true" overwrite="true"/> <echo message="Making html ..."/> - <exec dir="build/html" executable="xsltproc"> + <exec dir="${basedir}${file.separator}build${file.separator}html" executable="xsltproc"> <arg value="--nonet"/> <arg value="../../stylesheets/html.xsl"/> - <arg value="../defguide5-zh_CN.xml"/> + <arg value="../../../en/build/defguide5-zh_CN.xml"/> </exec> <touch file="build/html/.done"/> </target> @@ -196,6 +171,7 @@ <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="../en/refpages/elements" includes="*/*.xml" excludes="build/*"/> <srcfiles dir="po" includes="zh_CN.po"/> </uptodate> </target> @@ -219,19 +195,54 @@ <fileset dir="${docbook5.xsl}/images" includes="*.git,*.png,*.tif,*.svg"/> </copy> - <exec dir="${basedir}${file.separator}build" executable="xsltproc" failonerror="true"> - <arg value="--nonet"/> - <arg value="${basedir}${file.separator}stylesheets${file.separator}chm.xsl"/> - <arg value="${basedir}${file.separator}build${file.separator}defguide5-zh_CN.xml"/> - </exec> + <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}${file.separator}build" + failonerror="true" maxmemory="512m"> + <classpath refid="lib.classpath"/> + <arg value="../../en/build/defguide5-zh_CN.xml"/> + <arg value="../stylesheets/chm.xsl"/> + </java> + + <!--exec dir="${basedir}${file.separator}build" executable="xsltproc" failonerror="true"> + <arg value="- -nonet"/> + <arg value="../stylesheets/chm.xsl"/> + <arg value="../../en/build/defguide5-zh_CN.xml"/> + </exec--> + <exec dir="${basedir}${file.separator}build" executable="hhc" failonerror="false"> <arg value="htmlhelp.hhp"/> </exec> - <delete dir="build/htmlhelp"/> + <!--delete dir="build/htmlhelp"/> + <delete file="build/toc.hhc"/> + <delete file="build/index.hhk"/> + <delete file="build/htmlhelp.hhp"/--> </target> - <target name="pdf" depends="translate" description="Generate document - html"> + <target name="pdf.init"> + <uptodate property="pdf.isUpToDate" targetfile="build/defguide5-zh_CN.pdf"> + <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="../en/refpages/elements" includes="*/*.xml" excludes="build/*"/> + <srcfiles dir="po" includes="zh_CN.po"/> + </uptodate> + </target> + + <target name="pdf" depends="translate,pdf.init" unless="pdf.isUpToDate" description="Generate document - html"> + + <filter token="docbook5.xsl.url" value="${docbook5.xsl.url}"/> + <copy file="stylesheets/fo-import.tmpl.xsl" tofile="stylesheets/fo-import.xsl" filtering="true" overwrite="true"/> + + <echo message="Making fo ..."/> + <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}" + failonerror="true" maxmemory="512m"> + <classpath refid="lib.classpath"/> + <arg value="-o"/> + <arg value="build/pdf/defguide5-zh_CN.fo"/> + <arg value="../en/build/defguide5-zh_CN.xml"/> + <arg value="stylesheets/zh_CN/fo.xsl"/> + </java> + <copy todir="build/pdf/figures"> <fileset dir="../en/figures" includes="*.png,*.git,*.eps"/> </copy> @@ -239,9 +250,6 @@ <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"/> - <copy todir="build/pdf"> <fileset dir="${fonts.dir}"> <include name="*.ttf"/> @@ -250,30 +258,20 @@ <fileset dir="${fop.home}/conf"> <include name="*.xml"/> </fileset> + <fileset file="build/defguide5-zh_CN.fo"/> </copy> - <echo message="Making fo ..."/> - <java classname="com.icl.saxon.StyleSheet" fork="true" - failonerror="true" maxmemory="512m"> - <classpath refid="lib.classpath"/> - <arg value="-o"/> - <arg value="build/pdf/defguide5-zh_CN.fo"/> - <arg value="build/defguide5-zh_CN.xml"/> - <arg value="stylesheets/zh_CN/fo.xsl"/> - </java> - <echo message="Making pdf ..."/> - <java classname="${fop.class}" fork="true" dir="build/pdf" maxmemory="512m"> + <java classname="${fop.class}" fork="true" maxmemory="512m" + dir="${basedir}${file.separator}build${file.separator}pdf"> <classpath refid="lib.classpath"/> <arg value="-c"/> <arg value="userconfig.xml"/> <arg value="defguide5-zh_CN.fo"/> - <arg value="defguide5-zh_CN.pdf"/> + <arg value="../defguide5-zh_CN.pdf"/> </java> - <delete> - <fileset dir="build/pdf" excludes="**/*.pdf, **/*.fo"/> - </delete> + <delete dir="build/pdf"/> </target> </project> Modified: trunk/defguide5/zh/po/readme.txt =================================================================== --- trunk/defguide5/zh/po/readme.txt 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/po/readme.txt 2007-10-08 03:59:03 UTC (rev 7504) @@ -1,3 +1,12 @@ +Resource +-------- + https://docbook.org + https://docbook.sourceforge.net + https://sourceforge.net/projects/docbook + + https://docbook.svn.sourceforge.net/svnroot/docbook/trunk + + Update ------ #msgmerge --no-wrap --sort-by-file --update zh_CN.po defguide5.pot @@ -38,12 +47,10 @@ Using po-merge.py from subversion ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subversion/tools/dev/po-merge.py zh_CN.po < zh_CN-other.po - msgmerge --no-wrap --update zh_CN.po example.pot Using pomerge from translation tookit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pomerge -i zh_CN-other.po -o zh_CN-new.po -t zh_CN.po - msgmerge --no-wrap --update zh_CN.po example.pot Commit Modified: trunk/defguide5/zh/stylesheets/chm.xsl =================================================================== --- trunk/defguide5/zh/stylesheets/chm.xsl 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/stylesheets/chm.xsl 2007-10-08 03:59:03 UTC (rev 7504) @@ -6,19 +6,22 @@ xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/" version="1.0" exclude-result-prefixes="doc exsl set fm"> - + <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="'GB18030'"/> -<xsl:param name="chunker.output.encoding" select="'GB18030'"/> +<xsl:param name="l10n.gentext.language" select="'zh_cn'"/> +<xsl:param name="htmlhelp.encoding" select="'UTF-8'"/> +<xsl:param name="chunker.output.encoding" select="'UTF-8'"/> + <xsl:param name="saxon.character.representation" select="'native'"/> -<xsl:param name="suppress.navigation" select="0"/> + +<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="suppress.navigation" select="1"/> <xsl:param name="suppress.footer.navigation" select="1"/> <xsl:param name="htmlhelp.hhc.show.root" select="0"/> <xsl:param name="htmlhelp.button.locate" select="1"/> @@ -29,8 +32,8 @@ <xsl:text>DocBook: The Definitive Guide</xsl:text> </xsl:param> -<xsl:param name="VERSION" select="string(document('../VERSION.xml')//fm:Version[1])"/> -<xsl:param name="htmlhelp.chm" select="'defguide5-en.chm'"/> +<xsl:param name="VERSION" select="string(document('../../en/VERSION.xml')//fm:Version[1])"/> +<xsl:param name="htmlhelp.chm" select="'defguide5-zh_CN.chm'"/> <xsl:param name="htmlhelp.generate.index" select="1"/> Modified: trunk/defguide5/zh/stylesheets/fo-import.tmpl.xsl =================================================================== --- trunk/defguide5/zh/stylesheets/fo-import.tmpl.xsl 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/stylesheets/fo-import.tmpl.xsl 2007-10-08 03:59:03 UTC (rev 7504) @@ -1,3 +1,3 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> - <xsl:import href="@docbook5.xsl@/fo/docbook.xsl"/> + <xsl:import href="@docbook5.xsl.url@/fo/docbook.xsl"/> </xsl:stylesheet> Modified: trunk/defguide5/zh/stylesheets/fo.xsl =================================================================== --- trunk/defguide5/zh/stylesheets/fo.xsl 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/stylesheets/fo.xsl 2007-10-08 03:59:03 UTC (rev 7504) @@ -8,7 +8,9 @@ <!-- These extensions are required for table printing and other stuff --> <xsl:param name="use.extensions">1</xsl:param> - <xsl:param name="tablecolumns.extension">0</xsl:param> + <xsl:param name="tablecolumns.extension">1</xsl:param> + <xsl:param name="callouts.extension">1</xsl:param> + <xsl:param name="fop.extensions">1</xsl:param> <xsl:param name="fop1.extensions">0</xsl:param> Modified: trunk/defguide5/zh/stylesheets/html-import.tmpl.xsl =================================================================== --- trunk/defguide5/zh/stylesheets/html-import.tmpl.xsl 2007-10-08 01:57:30 UTC (rev 7503) +++ trunk/defguide5/zh/stylesheets/html-import.tmpl.xsl 2007-10-08 03:59:03 UTC (rev 7504) @@ -1,3 +1,3 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> - <xsl:import href="@docbook5.xsl@/html/chunk.xsl"/> + <xsl:import href="@docbook5.xsl.url@/html/chunk.xsl"/> </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |