> Von: Joshua Slive <[EMAIL PROTECTED]>
> Datum: Sat, 27 Jul 2002 08:13:24 -0700 (PDT)
> Betreff: RE: Issues with XML / XSLT stuff
>
> On Sat, 27 Jul 2002, Joshua Slive wrote:
>
>>> Can you tell I haven't been properly validating my xml ;-)
>
> What would be optimal is if we could get Ant/Xalan to validate as part of
> the transformation process, but I can't figure out how to make that
> happen.
Hi Joshua !
The xml files could easily be validated with a few changes to the build.xml
file. Just insert a new target and let the xslt-target depend on it. For
example:
<target name="validate"
description="Validate the XML source files">
<!-- Validate the root directory of the manual -->
<xmlvalidate lenient="false" failonerror="false" warn="true">
<fileset dir="../"
includes="*.xml *.xml.ja"/>
</xmlvalidate>
<!-- Validate the mod directory (.en + .ja) -->
<xmlvalidate lenient="false" failonerror="false" warn="true">
<fileset dir="../mod/"
includes="*.xml *.xml.ja"/>
</xmlvalidate>
</target>
If you're using the ant logging capabilities there will be a nice output
(even in xml). So the results of the validation/trasformation can be easily
controlled. For example call ant with the following parameters (in
build.sh):
ant -logger org.apache.tools.ant.XmlLogger \
-verbose \
-logfile buildlog.xml \
-Dant.XmlLogger.stylesheet.uri=log.xsl
(this stylesheet can be found in path_to/ant/etc/log.xsl; just copy to
manual/style)
For transforming the resulting logfile to html, you could use the following
in build.sh:
java org.apache.xalan.xslt.Process -IN buildlog.xml \
-OUT buildlog.html
If appreciated I could prepare a complete build-environment for the
validation/transformation/logging - proccess...just let me know if it would
help you.
-erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]