Using ${answer} with xpath_eval

Oxygen general issues.
jtakeda
Posts: 11
Joined: Sat Feb 25, 2017 1:18 am

Using ${answer} with xpath_eval

Post by jtakeda »

Hi there,

In a document template, I prompt the user for their id value using the ${ask} editor variable like so:

Code: Select all

<name ref="pers:${ask('Your xml:id', String,'', @user_id)}">
Which works perfectly well. However, when I try to use that value within an xpath_eval, it fails:

Code: Select all

${xpath_eval(doc('${people}')//*:person[@xml:id='${answer(@user_id)}']/*:persName/text())}
The '${people}' editor variables works fine as does (doc('../people.xml')), but the answer does not. I've tried escaping with multiple quotation marks and I've tried casting the answer to a string using another embedded xpath_eval (a long shot, but thought it might be worth it), but no luck. Is this something that can be done?

Thanks!

Best,
Joey
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Using ${answer} with xpath_eval

Post by sorin_carbunaru »

Hello Joey,

Unfortunately there seems to be a bug in oXygen when using ${xpath_eval} in templates. I created a new issue on our side (EXM-42892 - for reference purposes), and we will update this thread when a fix will be available.

All the best wishes,
Sorin Carbunaru
oXygen XML
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Using ${answer} with xpath_eval

Post by sorin_carbunaru »

Hello,

oXygen 21.1 has just been released a few hours ago, and it contains a fix for the problem you reported.

Best wishes,
Sorin Carbunaru
oXygen XML
Post Reply