Hi,
if I read the instructions in the XEP reference right, I can use the ant
task for xml input files.
However, I get this output:
robert@sauerbraten:~> ant reporttask
Buildfile: build.xml
reporttask:
[xep] (document
[xep] [system-id file:/home/robert/report.xml]
[xep] (validate
[xep] [error] file:/home/robert/report.xml: line 1: Incorrect top element - should be 'root'
[xep] [validation total: 1 error]
BUILD FAILED
/home/robert/build.xml:65: java.lang.reflect.InvocationTargetException
Total time: 2 seconds
The same file can be turned to PDF by a shell script like below, so I know
it should work:
XEP_HOME="/home/robert/sw/XEP"
CP="$XEP_HOME/lib/xep.jar:$XEP_HOME/lib/saxon.jar:$XEP_HOME/lib/xt.jar"
java -classpath "$CP" \
"-Dcom.renderx.xep.CONFIG=$XEP_HOME/xep.xml" \
com.renderx.xep.XSLDriver "$@"
The XML file starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: report.xml 2060 2006-03-08 16:09:08Z robert $ -->
<!DOCTYPE SER SYSTEM "../../xml/SER.dtd" [
<!ENTITY history SYSTEM "generated/history.xml">
]>
<?xml-stylesheet type="text/xsl" href="../../xml/SERfo.xsl"?>
<SER ID="FSP">
My ant stuff is basically taken from the XEP reference guide:
<property name="xepdir" location="/home/robert/sw/XEP"/>
<path id="xep.classpath">
<fileset dir="${xepdir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<taskdef name="xep" classname="com.renderx.xepx.ant.XEPTask"
classpath="${xepdir}/lib/XEPTask.jar"/>
<target name="reporttask">
<xep in="${reportdir}/report.xml" out="${reportdir}/report.pdf" format="PDF">
<classpath refid="xep.classpath"/>
<sysproperty key="com.renderx.xep.CONFIG" value="${xepdir}/xep.xml"/>
</xep>
</target>
Changing the ant target to be just a plain java call like below also works,
but defeats the purpose of the xep task.
<target name="report">
<java
classname="com.renderx.xep.XSLDriver"
classpathref="xep.classpath">
<arg value="report.xml"/>
<sysproperty key="com.renderx.xep.CONFIG" value="${xepdir}/xep.xml"/>
</java>
</target>
Looks to me like the xep tasks tries to treat the xml as fo for some reason?
What am I missing here to get the xep task to work with the xml input file?
Thanks,
Robert
PS: I use XEP 4.4 build 20051221 on Linux with java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Thu Mar 9 12:46:04 2006
This archive was generated by hypermail 2.1.8 : Thu Mar 09 2006 - 12:46:05 PST