I went to the ANT site and found instructions on adding an FOP task to a build.
(http://xmlgraphics.apache.org/fop/0.93/anttask.html)

My environment is Win2K.

The example given at the site is:
========================
<property name="fop.home" value="....path to your FOP HOME directory..."/>

<taskdef name="fop" 
         classname="org.apache.fop.tools.anttasks.Fop">
  <classpath>
    <fileset dir="${fop.home}/lib">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${fop.home}/build">
      <include name="fop.jar"/>
      <include name="fop-hyph.jar" />
    </fileset>
  </classpath>
</taskdef>
========================

My first attempt used that form, with the exception of using the real path to 
FOP_HOME.

When I ran the build.xml file, naming the target that called FOP, I got a long 
string of error messages, with this being the original:

"[fop] Error
 [fop]   DOMSource cannot be processed: check that saxon8-dom.jar is on the 
classpath"


I then modified my build.xml file thus:
========================
<property environment="env" />
<property name="fop.home" value="${env.FOP_HOME}"/>

<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
  <classpath>
    <fileset dir="${fop.home}/lib">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${fop.home}/build">
      <include name="fop.jar"/>
      <include name="fop-hyph.jar" />
    </fileset>
     <fileset dir="${env.SAXON_HOME}">
        <include name="saxon8-dom.jar"/>
     </fileset>
  </classpath>
</taskdef>
========================
Both SAXON_HOME and FOP_HOME are valid environment variables on my system.

I then modified my CLASSPATH environment variable at the system level by 
right-clicking the "My Computer" icon and editing the CLASSPATH variable to 
include 
"%SAXON_HOME%/saxon8-dom.jar".

When I re-ran the same target that called the FOP task, the execution worked, 
and a PDF file was created.

As a sanity check, I then modified the CLASSPATH variable at the system level 
in the manner already described, restoring it to its original value. When I 
re-ran the target, it failed again in the same way.

I don't wish to go to other computers in this group and modify their CLASSPATH 
environment variables in order to run this task. I'd like to make any necessary 
modifications to the build.xml file and distribute that.

Can someone please point out what the problem is?

Thanks.


-- 
Charles Knell
[EMAIL PROTECTED] - email

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to