David Shane Holden wrote:
 > I tried to modify build.xml so that all the english docs would be built
 > in one shot, but the result was pretty borked.  My best guess before I
 > gave up in frustration was that the style-sheet preloading in Ant was
 > causing the relative-path variable to be expanded incorrectly for some
 > docs.

The attached patch should allow you to do just that, but for every language
not just English.  It works for me on Win2k and I didn't notice a problem
with relative-path.

Shane

Works great for me. Joshua, I would suggest to use this, since the patternsets
make the whole build-process somewhat clearer.


I have prepared a new patch which includes Davids one and some additional
cleanups (idendation; comments). see attached file.

Erik
Index: build.xml
===================================================================
RCS file: /home/cvspublic/site-tools/httpd-docs-build/build.xml,v
retrieving revision 1.4
diff -u -r1.4 build.xml
--- build.xml   17 Aug 2002 18:13:51 -0000      1.4
+++ build.xml   18 Aug 2002 13:43:26 -0000
@@ -7,110 +7,98 @@
         </fileset>
     </path>
 
-
-<!-- This target is for output of HTML pages via XSLT -->
-  <!-- Requires JAXP/1.1 (all three JARs) or Xerces+Xalan -->
-  <target name="xslt"
-   description="Render HTML Pages via XSLT">
-
-    <!-- Additional dependencies -->
-    <dependset>
-      <targetfilelist dir="../mod/"
-                      files="directives.html.en"/>
-      <srcfileset dir="../mod/"
-                  includes="*.xml"
-                  excludes="allmodules.xml index.xml"/>
-    </dependset>
-
-    <dependset>
-      <targetfilelist dir="../mod/"
-                      files="index.html.en"/>
-      <srcfilelist dir="../mod/"
-                   files="allmodules.xml"/>
-    </dependset>
-
-    <dependset>
-      <targetfileset dir="../mod/"
-                     includes="*.html.*"
-                     excludes="*-dict.html.*"/>
-      <srcfilelist dir="../style/"
-                   files="common.xsl"/>
-    </dependset>
-
-    <!-- Transform the modules directory -->
-    <style   basedir="../mod/"
-             destdir="../mod/"
-           extension=".html"
-               style="../style/manual.en.xsl"
-            includes="*.xml"
-            excludes="allmodules.xml">
-      <mapper type="glob" from="*.xml" to="*.html.en"/>
-      <param name="relative-path" expression="."/>
-    </style>
-    <style   basedir="../mod/"
-             destdir="../mod/"
-           extension=".html"
-               style="../style/manual.ja.xsl"
-            includes="*.xml.ja"
-            excludes="allmodules.xml.ja">
-      <mapper type="glob" from="*.xml.ja" to="*.html.ja.jis"/>
-      <param name="relative-path" expression="."/>
-    </style>
-
-    <!-- Transform the howto directory -->
-    <style   basedir="../howto/"
-             destdir="../howto/"
-           extension=".html"
-               style="../style/manual.en.xsl"
-            includes="*.xml"
-            excludes="allmodules.xml">
-      <mapper type="glob" from="*.xml" to="*.html.en"/>
-      <param name="relative-path" expression="."/>
-    </style>
-    <style   basedir="../mod/"
-             destdir="../mod/"
-           extension=".html"
-               style="../style/manual.ja.xsl"
-            includes="*.xml.ja"
-            excludes="allmodules.xml.ja">
-      <mapper type="glob" from="*.xml.ja" to="*.html.ja.jis"/>
-      <param name="relative-path" expression="."/>
-    </style>
-
-   <!-- Transform the root directory of the manual -->
-    <style   basedir="../"
-             destdir="../"
-           extension=".html"
-               style="../style/manual.en.xsl"
-            includes="*.xml">
-      <mapper type="glob" from="*.xml" to="*.html.en"/>
-      <param name="relative-path" expression="."/>
-    </style>
-    <style   basedir="../"
-             destdir="../"
-           extension=".html"
-               style="../style/manual.ja.xsl"
-            includes="*.xml.ja">
-      <mapper type="glob" from="*.xml.ja" to="*.html.ja.jis"/>
-      <param name="relative-path" expression="."/>
-    </style>
-    <style   basedir="../"
-             destdir="../"
-           extension=".html"
-               style="../style/manual.de.xsl"
-            includes="*.xml.de">
-      <mapper type="glob" from="*.xml.de" to="*.html.de"/>
-      <param name="relative-path" expression="."/>
-    </style>
-
-  </target>
-  <target name="validate"
-      description="Validate the XML source files">
-      <!-- Validate almost all XML files in all languages -->
-      <xmlvalidate lenient="false" failonerror="false" warn="true">
-          <fileset dir="../"
-                   includes="**/*.xml **/*.xml.*"
-                   excludes="mod/allmodules.xml mod/allmodules.xml.* 
style/**"/>
-      </xmlvalidate>
-  </target>
+    <patternset id="excludes">
+        <exclude name="build/*.xml" />
+        <exclude name="mod/allmodules.xml*" />
+        <exclude name="style/*.xml" />
+    </patternset>
+ 
+    <patternset id="en-allxml">
+        <include name="**/*.xml" />
+        <patternset refid="excludes" />
+    </patternset>
+  
+    <patternset id="de-allxml">
+        <include name="**/*.xml.de" />
+        <patternset refid="excludes" />
+    </patternset>
+  
+    <patternset id="ja.jis-allxml">
+        <include name="**/*.xml.ja" />
+        <patternset refid="excludes" />
+    </patternset>
+  
+    <patternset id="allxml">
+        <patternset refid="en-allxml" />
+        <patternset refid="de-allxml" />
+        <patternset refid="ja.jis-allxml" />
+    </patternset>
+
+    <!-- This target is for output of HTML pages via XSLT -->
+    <!-- Requires JAXP/1.1 (all three JARs) or Xerces+Xalan -->
+    <target name="xslt"
+            description="Render HTML Pages via XSLT">
+
+        <!-- Additional dependencies -->
+        <dependset>
+            <targetfilelist dir="../mod/"
+                            files="directives.html.en"/>
+            <srcfileset dir="../mod/"
+                        includes="*.xml"
+                        excludes="allmodules.xml index.xml"/>
+        </dependset>
+
+        <dependset>
+            <targetfilelist dir="../mod/"
+                            files="index.html.en"/>
+            <srcfilelist dir="../mod/"
+                         files="allmodules.xml"/>
+        </dependset>
+
+        <dependset>
+            <targetfileset dir="../mod/"
+                           includes="*.html.*"
+                           excludes="*-dict.html.*"/>
+            <srcfilelist dir="../style/"
+                         files="common.xsl"/>
+        </dependset>
+    
+        <!-- Transform all English documents -->
+        <style basedir="../"
+               destdir="../"
+               style="../style/manual.en.xsl">
+            <mapper type="glob" from="*.xml" to="*.html.en" />
+            <param name="relative-path" expression="." />
+            <patternset refid="en-allxml" />
+        </style>
+    
+        <!-- Transform all Japanese documents -->
+        <style basedir="../"
+               destdir="../"
+               style="../style/manual.ja.xsl">
+            <mapper type="glob" from="*.xml.ja" to="*.html.ja.jis" />
+            <param name="relative-path" expression="." />
+            <patternset refid="ja.jis-allxml" />
+        </style>
+    
+        <!-- Transform all German documents -->
+        <style basedir="../"
+               destdir="../"
+               style="../style/manual.de.xsl">
+            <mapper type="glob" from="*.xml.de" to="*.html.de" />
+            <param name="relative-path" expression="." />
+            <patternset refid="de-allxml" />
+        </style>
+    </target>
+
+    <!-- This target is for validating almost all the XML -->
+    <!-- source files in all languages -->
+    <target name="validate"
+            description="Validate the XML source files">
+        <xmlvalidate lenient="false" failonerror="false" warn="true">
+            <fileset dir="../">
+                <patternset refid="allxml" />
+            </fileset>
+        </xmlvalidate>
+    </target>
 </project>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to