crossley 2003/03/04 06:10:01
Modified: . build.xml Log: Start to bring back some of the validation stuff from build.old.xml Revision Changes Path 1.349 +39 -5 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.348 retrieving revision 1.349 diff -u -r1.348 -r1.349 --- build.xml 1 Mar 2003 17:48:18 -0000 1.348 +++ build.xml 4 Mar 2003 14:10:00 -0000 1.349 @@ -99,6 +99,25 @@ </fileset> </path> + <!-- Jing is used in various build targets for XML validation + with RELAX NG --> + <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask" + classpathref="classpath"/> + + <!-- Validate some important core config. Do default config files here, + then do them again after the blocks have been processed. --> + <jing rngfile="./src/webapp/WEB-INF/entities/any.rng"> + <fileset dir="./src/webapp/WEB-INF" includes="cocoon.xconf"/> + </jing> + <jing rngfile="./src/webapp/WEB-INF/entities/roles-v01.rng"> + <fileset dir="./src/java/org/apache/cocoon" includes="cocoon.roles"/> + </jing> +<!-- FIXME: recent sitemap changes have broken validation + <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng"> + <fileset dir="./src/webapp" includes="sitemap.xmap"/> + </jing> +--> + <!-- Build and prepare the loader =================== --> <!-- compile the loader --> @@ -626,7 +645,25 @@ <xpatch directory="${deprecated.conf}" extension="xconf" configuration="${build.webapp}/WEB-INF/cocoon.xconf"/> </target> - <target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-deprecated"/> + <target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-deprecated"> + + <!-- Validate some important core config. --> + <jing rngfile="${build.webapp}/WEB-INF/entities/any.rng"> + <fileset dir="${build.webapp}/WEB-INF" includes="cocoon.xconf"/> + </jing> +<!-- FIXME: precept.xroles has a new un-defined attribute "default-hint" + which is breaking validation. + <jing rngfile="${build.webapp}/WEB-INF/entities/roles-v01.rng"> + <fileset dir="${build}/classes/org/apache/cocoon" + includes="cocoon.roles"/> + </jing> +--> +<!-- FIXME: recent sitemap changes have broken validation + <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng"> + <fileset dir="${build.webapp}" includes="sitemap.xmap"/> + </jing> +--> + </target> <target name="war" depends="webapp"> <!-- A task to create manifest for webapp. --> @@ -683,9 +720,6 @@ if="validate.xdocs"> <echo message="Conducting validation of core XML documentation."/> <echo message="(You can turn validation off if you must, commenting out the validate.xdocs property)"/> - - <!-- Use Jing for XML validation with RELAX NG --> - <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask" classpathref="classpath"/> <echo message="Validating all **/book.xml instances using RELAX NG ..."/> <jing rngfile="${webapp}/WEB-INF/entities/book-v01.rng">