Page 1 of 1

${xpath_eval()} not working in action xml file

Posted: Wed Oct 26, 2022 6:48 pm
by Johann
Hello,

I tried to use the variable ${xpath_eval()} directly in an action xml file in Author Web 25.0.0.0 but it seems that it does not work.

This is an example:

Code: Select all

<a:operation id="InsertFragmentOperation">
			<a:xpathCondition>descendant::gcompanionref</a:xpathCondition>
			<a:arguments>
				<a:argument name="fragment"><imagemap name="imagemap">${xpath_eval(ancestor-or-self::sheet/@id)} TEST</imagemap></a:argument>
                <a:argument name="insertLocation">descendant::gcompanionref</a:argument>
                <a:argument name="insertPosition">After</a:argument>
			</a:arguments>
		</a:operation>
The fragment is well inserted but without the expected id in the content.

Instead, I created a custom operation to handle this.

Regards,

Johann

Re: ${xpath_eval()} not working in action xml file

Posted: Thu Oct 27, 2022 12:33 pm
by Bogdan Dumitru
Hello Johann,

We managed to reproduce the problem, thank you for reporting it.

As a temporary workaround, you can define a custom AuthorOperation [0] [1] that does what you want.

[0] https://www.oxygenxml.com/InstData/Edit ... ation.html
[1] https://www.oxygenxml.com/doc/versions/ ... zb_vsy_dlb