From: <bo...@us...> - 2013-02-03 12:40:28
|
Revision: 515 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=515&view=rev Author: bodewig Date: 2013-02-03 12:40:21 +0000 (Sun, 03 Feb 2013) Log Message: ----------- XSLTC throws an NPE when creating the user guide, use xsltproc Modified Paths: -------------- branches/xmlunit-1.x/docbook.xml Modified: branches/xmlunit-1.x/docbook.xml =================================================================== --- branches/xmlunit-1.x/docbook.xml 2013-02-03 11:29:17 UTC (rev 514) +++ branches/xmlunit-1.x/docbook.xml 2013-02-03 12:40:21 UTC (rev 515) @@ -37,6 +37,7 @@ <!-- location of Docbook Stylesheets and dblatex --> <property name="db5.xsl" location="../../docbook/docbook5-xsl-1.72.0"/> <property name="dblatex" value="/usr/bin/dblatex"/> + <property name="xsltproc" value="/usr/bin/xsltproc"/> <property name="html.dir" location="${userguide.docs.dir}/html"/> <property name="user.guide" value="XMLUnit-Java"/> @@ -52,11 +53,36 @@ targetfile="${html.dir}/index.html"/> </target> - <target name="users-guide-html" depends="-html-needs-refresh?" - unless="HTML is up-to-date" - description="Creates HTML version of the User's Guide"> + <target name="-xsltproc-available?" depends="-html-needs-refresh?"> + <available property="xsltproc available" + file="${xsltproc}"/> + <condition property="run TraX"> + <not> + <or> + <isset property="xsltproc available"/> + <isset property="HTML is up-to-date"/> + </or> + </not> + </condition> + <condition property="run xsltproc"> + <and> + <isset property="xsltproc available"/> + <not> + <isset property="HTML is up-to-date"/> + </not> + </and> + </condition> + </target> + + <target name="-users-guide-html-pre" depends="-html-needs-refresh?" + unless="HTML is up-to-date"> <delete dir="${html.dir}" quiet="true"/> <mkdir dir="${html.dir}"/> + </target> + + <target name="-users-guide-html-trax" + depends="-xsltproc-available?,-users-guide-html-pre" + if="run TraX"> <xslt basedir="${src.userguide.dir}" destdir="${html.dir}" @@ -66,10 +92,34 @@ <param name="section.autolabel" expression="1"/> <param name="section.label.includes.component.label" expression="1"/> </xslt> - <copy file="${src.dir}/site/xmlunit.png" toDir="${html.dir}"/> <delete file="${html.dir}/${user.guide}.html" quiet="true"/> </target> + <target name="-users-guide-html-xsltproc" + depends="-xsltproc-available?,-users-guide-html-pre" + if="run xsltproc"> + <exec command="${xsltproc}" failonerror="true"> + <arg value="-o"/> + <!-- xsltproc needs the trailing slash to work properly --> + <arg value="${html.dir}/"/> + <arg value="--param"/> + <arg value="section.autolabel"/> + <arg value="1"/> + <arg value="--param"/> + <arg value="section.label.includes.component.label"/> + <arg value="1"/> + <arg file="${db5.xsl}/html/chunk.xsl"/> + <arg file="${src.userguide.dir}/${user.guide}.xml"/> + </exec> + </target> + + <target name="users-guide-html" + depends="-users-guide-html-trax,-users-guide-html-xsltproc" + unless="HTML is up-to-date" + description="Creates HTML version of the User's Guide"> + <copy file="${src.dir}/site/xmlunit.png" toDir="${html.dir}"/> + </target> + <target name="-check-os"> <condition property="isWindows"> <os family="windows"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |