>
> Does anyone (particularly people working on translations) have an
> objection to changing the default ant build target to only build "en", and
> have separate targets to build the other languages? This would speed up
> the build for most people, and would also prevent people from accidentally
> screwing up work in languages they don't understand.
>
> Joshua.
>
I had a bit spare time and tried to incorporate the proposed additions to build.xml. See the attached patch. For now 'en' is built as default. All other languages are invoked by using their abbreviations (de, ja, pt-br, ru). The validation process remained the same as before. Additionally I introduced an new target 'all' to get all languages built at once.
I also added the russian build targets submitted by Ilia Soldis <[EMAIL PROTECTED]>.
For me everything is working fine, but please test on your own system with your working language thoroughly before anybody commits this. I haven't had the time to test every case and I don't want to disturb the build-process another time :-)
BTW we will have to do a rewrite of the dependsets when all the files are xml-ized. Up to now only the mod-directory correctly depends on the stylesheets/language-files.
Another point came from an email from Michael Shroepl: > I am +1 for the idea as well, and would love to have the > target names available being documented in some short "how > to build Apache HTML files from XML".
I we're going to commit this, I'm +1 on documenting the new language-dependent build-process and even the validation process in some (short) way in httpd-site/xdocs/docs-project/translations.xml
For any other additions or ideas, please speak up ;-)
Erik
Index: build.xml
===================================================================
RCS file: /home/cvspublic/site-tools/httpd-docs-build/build.xml,v
retrieving revision 1.9
diff -u -r1.9 build.xml
--- build.xml 6 Sep 2002 16:50:47 -0000 1.9
+++ build.xml 14 Sep 2002 18:32:36 -0000
@@ -3,7 +3,7 @@
<!-- Initialization properties -->
<path id="classpath">
<fileset dir="./lib">
- <include name="**/*.jar"/>
+ <include name="**/*.jar" />
</fileset>
</path>
@@ -32,44 +32,55 @@
<include name="**/*.xml.pt-br" />
<patternset refid="excludes" />
</patternset>
-
+
+ <patternset id="ru.koi8-r-allxml">
+ <include name="**/*.xml.ru" />
+ <patternset refid="excludes" />
+ </patternset>
+
<patternset id="allxml">
<patternset refid="en-allxml" />
<patternset refid="de-allxml" />
<patternset refid="ja.jis-allxml" />
<patternset refid="pt-br-allxml" />
+ <patternset refid="ru.koi8-r-allxml" />
</patternset>
- <!-- This target is for output of HTML pages via XSLT -->
- <!-- Requires JAXP/1.1 (all three JARs) or Xerces+Xalan -->
+ <!-- The following targets are for output of the HTML pages via XSLT. -->
+ <!-- There is one target for every language to easily transform only -->
+ <!-- the desired docs. All targets require JAXP/1.1 (all three JARs) -->
+ <!-- or Xerces+Xalan. -->
+
+ <!-- Default target for all English documents -->
<target name="xslt"
description="Render HTML Pages via XSLT">
<!-- Additional dependencies -->
<dependset>
<targetfilelist dir="../mod/"
- files="directives.html.en"/>
+ files="directives.html.en" />
<srcfileset dir="../mod/"
includes="*.xml"
- excludes="allmodules.xml index.xml"/>
+ excludes="allmodules.xml index.xml *-dict.xml" />
</dependset>
<dependset>
<targetfilelist dir="../mod/"
- files="index.html.en"/>
+ files="index.html.en" />
<srcfilelist dir="../mod/"
- files="allmodules.xml"/>
+ files="allmodules.xml" />
</dependset>
<dependset>
<targetfileset dir="../mod/"
- includes="*.html.*"
- excludes="*-dict.html.*"/>
- <srcfilelist dir="../style/xsl/"
- files="common.xsl"/>
+ includes="*.html.en" />
+ <srcfileset dir="../style/xsl/"
+ includes="*.xsl" />
+ <srcfilelist dir="../style/lang/"
+ files="en.xml" />
</dependset>
-
- <!-- Transform all English documents -->
+
+ <!-- Transform all English documents by default -->
<style basedir="../"
destdir="../"
style="../style/manual.en.xsl">
@@ -95,7 +106,39 @@
<mapper type="glob" from="*.xml" to="*.html.en" />
<patternset refid="en-allxml" />
</style>
-
+
+ </target>
+
+ <!-- Target for all Japanese documents -->
+ <target name="ja"
+ description="Render HTML Pages via XSLT (ja)">
+
+ <!-- Additional dependencies -->
+ <dependset>
+ <targetfilelist dir="../mod/"
+ files="directives.html.ja.jis" />
+ <srcfileset dir="../mod/"
+ includes="*.xml.ja"
+ excludes="allmodules.xml.ja index.xml.ja" />
+ </dependset>
+
+ <dependset>
+ <targetfilelist dir="../mod/"
+ files="index.html.ja.jis" />
+ <srcfilelist dir="../mod/"
+ files="allmodules.xml.ja" />
+ </dependset>
+
+ <dependset>
+ <targetfileset dir="../mod/"
+ includes="*.html.ja.jis"
+ excludes="*-dict.html.ja.jis"/>
+ <srcfileset dir="../style/xsl/"
+ includes="*.xsl" />
+ <srcfilelist dir="../style/lang/"
+ files="ja.xml" />
+ </dependset>
+
<!-- Transform all Japanese documents -->
<style basedir="../"
destdir="../"
@@ -123,6 +166,22 @@
<patternset refid="ja.jis-allxml" />
</style>
+ </target>
+
+ <!-- Target for all German documents -->
+ <target name="de"
+ description="Render HTML Pages via XSLT (de)">
+
+ <!-- Additional dependencies -->
+ <dependset>
+ <targetfileset dir="../mod/"
+ includes="*.html.de" />
+ <srcfileset dir="../style/xsl/"
+ includes="*.xsl" />
+ <srcfilelist dir="../style/lang/"
+ files="de.xml" />
+ </dependset>
+
<!-- Transform all German documents -->
<style basedir="../"
destdir="../"
@@ -150,6 +209,20 @@
<patternset refid="de-allxml" />
</style>
+ </target>
+
+ <!-- Target for all Portuguese-BR documents -->
+ <target name="pt-br"
+ description="Render HTML Pages via XSLT (pt-br)">
+
+ <!-- Additional dependencies -->
+ <dependset>
+ <targetfileset dir="../mod/"
+ includes="*.html.pt-br" />
+ <srcfileset dir="../style/xsl/"
+ includes="*.xsl" />
+ </dependset>
+
<!-- Transform all Portuguese-BR documents -->
<style basedir="../"
destdir="../"
@@ -177,6 +250,53 @@
<patternset refid="pt-br-allxml" />
</style>
+ </target>
+
+ <!-- Target for all Russian KOI8-R documents -->
+ <target name="ru"
+ description="Render HTML Pages via XSLT (ru)">
+
+ <!-- Additional dependencies -->
+ <dependset>
+ <targetfileset dir="../mod/"
+ includes="*.html.ru.koi8-r" />
+ <srcfileset dir="../style/xsl/"
+ includes="*.xsl" />
+ </dependset>
+
+ <!-- Transform all Russian KOI8-R documents -->
+ <style basedir="../"
+ destdir="../"
+ style="../style/manual.ru.xsl">
+
+ <mapper type="glob" from="*.xml.ru" to="*.html.ru.koi8-r" />
+ <patternset>
+ <include name="mod/directives.xml.ru" />
+ <include name="mod/index.xml.ru" />
+ </patternset>
+ </style>
+
+ <style basedir="../"
+ destdir="../"
+ style="../style/manual.ru.xsl">
+ <mapper type="glob" from="*.xml.ru" to="*.html.ru.koi8-r" />
+ <depth min="1" max="1" />
+ <patternset refid="ru.koi8-r-allxml" />
+ </style>
+
+ <style basedir="../"
+ destdir="../"
+ style="../style/manual.ru.xsl">
+ <mapper type="glob" from="*.xml.ru" to="*.html.ru.koi8-r" />
+ <patternset refid="ru.koi8-r-allxml" />
+ </style>
+
+ </target>
+
+ <!-- This target is a dummy target to use all the language- -->
+ <!-- dependent targets above to transform all languages at once -->
+ <target name="all" depends="xslt,ja,de,pt-br,ru"
+ description="Render HTML Pages via XSLT (all languages)">
</target>
<!-- This target is for validating almost all the XML -->--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
