crossley 2002/11/26 22:15:55 Modified: . Tag: cocoon_2_0_3_branch build.xml changes.xml todo.xml lib Tag: cocoon_2_0_3_branch jars.xml Added: legal Tag: cocoon_2_0_3_branch LICENSE.jing lib/optional Tag: cocoon_2_0_3_branch jing-20020724.jar src/webapp/resources/entities Tag: cocoon_2_0_3_branch book-v01.rng roles-v01.rng sitemap-v05.rng sitemap-v06.rng xslt-20020523.rng Removed: src/webapp/resources/entities Tag: cocoon_2_0_3_branch sitemap-v02.dtd Log: Backport some of the new build-time validation capability from 2.1 Use RELAX NG to conduct validation of some core important configuration files. Revision Changes Path No revision No revision 1.196.2.20 +47 -1 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.196.2.19 retrieving revision 1.196.2.20 diff -u -r1.196.2.19 -r1.196.2.20 --- build.xml 3 Oct 2002 04:27:05 -0000 1.196.2.19 +++ build.xml 27 Nov 2002 06:15:50 -0000 1.196.2.20 @@ -1897,7 +1897,53 @@ expression="../../${build.dir}/current-jars.xml"/> </style> </target> - + + <!-- =================================================================== --> + <!-- Validation of core important configuration files using RELAX NG --> + <!-- =================================================================== --> + <!-- Depends on some "prepare-*" targets, so that the sitemaps are generated + and copied to the build. + --> + <target name="validate-config" + description="Validation of core configuration files using RELAX NG" + depends="prepare-docs, prepare-webapp, prepare-webapp-scratchpad"> + <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"> + <classpath refid="anttasks.classpath"/> + </taskdef> + <echo message="Conducting validation of core configuration files."/> + + <!-- book.xml --> + <echo message="Validating all book.xml instances ..."/> + <jing rngfile="${webapp.dir}/resources/entities/book-v01.rng"> + <fileset dir="${build.context}" includes="**/book.xml"/> + </jing> + + <!-- cocoon.roles --> + <echo message="Validating all cocoon.roles instances ..."/> + <jing rngfile="${webapp.dir}/resources/entities/roles-v01.rng"> + <fileset dir="${build.dir}" includes="**/cocoon.roles"/> + </jing> + + <!-- All stylesheets **/*.xsl --> + <echo message="Validating all stylesheets ..."/> + <jing rngfile="${webapp.dir}/resources/entities/xslt-20020523.rng"> +<!-- FIXME: Need catalog entity resolver, so excluding catalog tester xsl --> +<!-- FIXME: Excluding the "hello world" SWF sitemap (minor issue) --> + <fileset dir="./src" includes="**/*.xsl" + excludes="**/catalog/style.xsl, **/simple-page2swf.xsl"/> + <fileset dir="./tools" includes="**/*.xsl"/> + </jing> + + <!-- sitemap.xmap --> + <!-- leaving this until last because it is the one most likely to break --> + <echo message="Validating all sitemap.xmap instances ..."/> +<!-- FIXME: The sitemaps and their RNG grammar still need tweaking --> + <jing rngfile="${webapp.dir}/resources/entities/sitemap-v06.rng"> + <fileset dir="${build.dir}" includes="**/sitemap.xmap"/> + </jing> + </target> + + </project> <!-- End of file --> 1.138.2.71 +7 -1 xml-cocoon2/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/changes.xml,v retrieving revision 1.138.2.70 retrieving revision 1.138.2.71 diff -u -r1.138.2.70 -r1.138.2.71 --- changes.xml 25 Nov 2002 21:51:58 -0000 1.138.2.70 +++ changes.xml 27 Nov 2002 06:15:51 -0000 1.138.2.71 @@ -39,6 +39,12 @@ </devs> <release version="@version@" date="@date@"> + <action dev="DC" type="add"> + New build target "validate-config" to conduct build-time validation of some + core important configuration files using RELAX NG (call it manually with: + <code>./build.sh validate-config</code>). Currently doing: all sitemap.xmap, + all cocoon.roles, all *.xsl stylesheets, all book.xml files. + </action> <action dev="SW" type="add"> Extend the syntax of sitemap variable substitution : variables can have a prefix which indicates an InputModule where to get the value from. For example, the expression 1.28.2.8 +2 -6 xml-cocoon2/todo.xml Index: todo.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/todo.xml,v retrieving revision 1.28.2.7 retrieving revision 1.28.2.8 diff -u -r1.28.2.7 -r1.28.2.8 --- todo.xml 4 Aug 2002 15:57:12 -0000 1.28.2.7 +++ todo.xml 27 Nov 2002 06:15:52 -0000 1.28.2.8 @@ -49,17 +49,13 @@ </action> <action context="code" assigned-to="open"> - For 2.1: Correct the sitemap DTD which is now broken and make sitemap validated. - </action> - - <action context="code" assigned-to="open"> Complete (means put everything we know of into even if it has to be commented) the cocoon.xconf file and put descriptions into it </action> <action context="code" assigned-to="open"> Complete (means put all allowed constructs and combinations) - the lint/sitemap.xmap file + the lint/sitemap.xmap file. Enhance the RELAX NG grammar for sitemap. </action> <action context="code" assigned-to="SW"> No revision No revision 1.1.2.1 +0 -0 xml-cocoon2/legal/LICENSE.jing Index: LICENSE.jing =================================================================== RCS file: /home/cvs/xml-cocoon2/legal/LICENSE.jing,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 No revision No revision 1.11.2.18 +9 -0 xml-cocoon2/lib/jars.xml Index: jars.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/lib/jars.xml,v retrieving revision 1.11.2.17 retrieving revision 1.11.2.18 diff -u -r1.11.2.17 -r1.11.2.18 --- jars.xml 21 Nov 2002 16:15:24 -0000 1.11.2.17 +++ jars.xml 27 Nov 2002 06:15:53 -0000 1.11.2.18 @@ -302,4 +302,13 @@ <lib>optional/xt-19991105.jar</lib> <homepage>http://www.blnz.com/xt/</homepage> </file> + + <file name="jing"> + <title>Jing</title> + <description>RELAX NG validator in Java</description> + <used-by>core</used-by> + <lib>optional/jing-20020724.jar</lib> + <homepage>http://www.thaiopensource.com/relaxng/jing.html</homepage> + </file> + </jars> No revision No revision 1.1.2.1 +0 -0 xml-cocoon2/lib/optional/jing-20020724.jar <<Binary file>> No revision No revision 1.1.2.1 +102 -0 xml-cocoon2/src/webapp/resources/entities/Attic/book-v01.rng 1.1.2.1 +64 -0 xml-cocoon2/src/webapp/resources/entities/Attic/roles-v01.rng 1.1.2.1 +2128 -0 xml-cocoon2/src/webapp/resources/entities/Attic/sitemap-v05.rng 1.1.2.1 +2143 -0 xml-cocoon2/src/webapp/resources/entities/Attic/sitemap-v06.rng 1.1.2.1 +897 -0 xml-cocoon2/src/webapp/resources/entities/Attic/xslt-20020523.rng
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]