The next step is to create all the html files from the xml files that you have written. Example 11 shows this task
Example 11. Phase two task
<!-- ================================================ -->
<!-- Generic XSLT-processor call (Website transform) -->
<!-- ================================================ -->
<target name="website" depends="layout">
<echo message="Website, second stage processing " />
<java classname="${xslt.processor.class}"
fork="yes"
dir="${in.dir}"
failonerror="true">
<classpath refid="xslt.processor.classpath" />
<arg line="-o ${out.dir}/${website.outfile}"/>
<arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-r org.apache.xml.resolver.tools.CatalogResolver"/>
<arg line="${in.dir}/${website.infile}
${website.stylesheet}
${param.args.post}" />
</java>
</target>
This example relies on running phase one first, remove this attribute to change that dependency | |
Again the process is set to stop processing on any errors | |
Output is directed to the output directory | |
The input file is |
You should see the list of files being processed scroll down as each html file is generated. Again, if you make one of the xml files invalid, the error processing should provide the information to find the error. This step of the process may be run using the command
>ant website
That's it. All that remains is to load the resulting html file to your server then everyone can see your handiwork