Hi,
 
I have the following XML file:
 
<root>
    ....
    <content name="Dutch" locale="locale_nl">
        <constant name="stupidlabeltext">Dutch text</constant>
    </content>
    <content name="French" locale="locale_fr">
 <constant name="stupidlabeltext">French text</constant>
    </content>
    ...
</root>
I have the following Ant file:
 
    <xmltask source="test.xml" dest="test-new.xml" failWithoutMatch="true">
        <call path="//content" target="echoprops">
             <param name="locale" path="@locale"/>
             <param name="constantname" path="[EMAIL PROTECTED]"/>
             <param name="constantvalue" path="constant[text()]"/>
        </call>
   </xmltask>
 
 <target name="echoprops">
      <echo message="Constant: ${locale} - ${constantname} - ${constantvalue}"/>
 </target>
 
The output I receive on an example xml file is:

Constant: locale_nl - ${constantname} - ${constantvalue}

It seems that it's not possible to specify an XPath referencing children inside a param. Or am I doing something wrong? Or is there another way I should try?

Purpose of this is to convert constants in legacy xml files to standard resourcebundles...

I'm using the latest XMLTask 1.12 version.

kind regards,

Wim Bervoets

 



-----Disclaimer-----

This message may contain confidential information intended solely for the use of the named addressee. If you are not the intended recipient, you should not read, use, disclose or reproduce the content of this message. If you have received this message by mistake, please notify the sender immediately. Any views or opinions presented in this message are solely those of the author and do not necessarily represent those of AXA Belgium, AXA Bank Belgium, AXA Tech Belgium GIE - ESV or any other entity of the AXA Group, unless otherwise stated by the sender and duly authorized by the said companies.

---------------------

Reply via email to