Ant XSLT task, passing a system property

G

guibod

Hi,

I am quite stuck with a unsolvable problem. Maybe I lack of knowledge,
here is my problem.

I am using a DITA-OT installation with some home-brewd extensions. To
manage the whole stuff to output a valid xsl:fo index i am using the
"Innodata Isogen I18N Support Library" that provide me a great support
for back-of-the-book index. This library needs the
"com.innodata.i18n.home" system property to be set.

My system is quite complex, but in short terms :
- ANT (1) calls (via <antcall>) ANT (2) that calls XSLT
I do specify the -Dcom.innodata.i18n.home="c:\my\path" to the top most
ant process. When I get to the XSLT process, the I18N library complains
:

"Saxoni18nService: ERROR: System property 'com.innodata.i18n.home' not
set. Processing will fail."

I checked and the system property is available in both ANT scripts. It
looks like the XSLT (trax) method lose the -Dcom.innodata.i18n.home
option. Any hints about it ?

The only way I found to pass throught this bug is to use <java> instead
of <xslt>. Which cause me problems because of <param if="xxx"/> is not
available...

Guillaume
 
G

Guibod

I found a solution that do not rely on <xslt> anymore. I am forced to
call explicitly saxon through <java> directive.

<java classname="net.sf.saxon.Transform" failonerror="true">
<classpath>
<pathelement path="c:\DITA\DITA-OT1.3\lib"/>
<pathelement location="c:\DITA\DITA-OT1.3\lib\saxon8.jar"/>
<pathelement location="C:\DITA\DITA-OT1.3\lib\i18n_support
\i18n_support.jar"/>
<pathelement location="c:\DITA\DITA-OT1.3\lib\resolver.jar"/ </classpath>
<!-- WE NEED TO PASS THIS ARG... No mean by the <xslt> way :( -->
<sysproperty key="com.innodata.i18n.home" value="c:\dita\dita-
ot1.3\lib\i18n_support"/>
<arg line="-r org.apache.xml.resolver.tools.CatalogResolver -x
org.apache.xml.resolver.tools.ResolvingXMLReader -y
org.apache.xml.resolver.tools.ResolvingXMLReader -o ${output} $
{dita.merged.dir}${file.separator}${dita.map.filename.root}_MERGED.xml
${args.xsl} output-related-links=${args.fo.output.rel.links} $
{xslparam}"/>
</java>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top