Problem using new editor variables

Having trouble installing Oxygen? Got a bug to report? Post it all here.
martindholmes
Posts: 178
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Problem using new editor variables

Post by martindholmes »

Hi there,

I'm trying to reference some TEI resources from the TEI add-on in an Ant task, using the new variables. My scenario parameters include this:

Code: Select all

teiPlugin: ${frameworkDir(TEI P5)}
and I've also tried:

Code: Select all

teiPlugin ${frameworkDir(tei)}
based on the folder name of the TEI plugin. I've also tried quoting both these values. This looks like this in the xpr file:

Code: Select all


<antParameter>
<field name="name">
<String>teiPlugin</String>
</field>
<field name="description">
<String>TEI plugin location</String>
</field>
<field name="value">
<String>${frameworkDir("tei")}</String>
</field>
<field name="defaultValue">
<null/>
</field>
<field name="type">
<Integer>5</Integer>
</field>
<field name="isPredefined">
<Boolean>false</Boolean>
</field>
<field name="possibleValues">
<null/>
</field>
</antParameter>
When I then try to do this in my Ant build file:

Code: Select all

<import file="${teiPlugin}/xml/tei/stylesheet/common/teianttasks.xml"/>
I get this error:

E [ANT Validator] Cannot find /home/mholmes/DiskStation/mholmes/WorkData/english/map_of_london/xml/db/data/utilities/${teiPlugin}/xml/tei/stylesheet/common/teianttasks.xml imported from /home/mholmes/DiskStation/mholmes/WorkData/english/map_of_london/xml/db/data/utilities/buildODD.xml

I other words, it looks as though the ${teiPlugin} variable is not being expanded in the @file attribute, and in any case it's being evaluated relative to the location of the ant build file. Any idea what I might be doing wrong here?

All help appreciated,
Martin
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

Re: Problem using new editor variables

Post by alex_jitianu »

Hello Martin,

The first use of the variable is the correct one:

Code: Select all

${frameworkDir(TEI P5)}
Judging form the error message I tend to believe that the parameter is not actually received by the ANT process (so no connection with the use of the $frameworkDir variable). To see if this assumption is correct, please send a value that doesn't contain this variable to see if the transformation works or not.

Best regards,
Alex
Post Reply