Page 1 of 1

ancestor-or-self:: doens't work within a graphic?

Posted: Fri Nov 11, 2016 7:04 pm
by stdu
Hi,

we have a customized action to insert a <figure> element in a TEI XML document:

<figure facs="path/to/image.jpg" />

This works well and with the CSS

Code: Select all

figure:after
and

Code: Select all

url()
I can display the image.

But: I would like to allow the user to insert also a figDesc element in the figure. I created an action for that and provide the action via the context menĂ¼. I assumend that I can fire this action when I click on the image and choose the appropriate action from the context menu. But the problem seems to be that Author doesn't recognize the XPath context correctly and says "The xpath expression: 'ancestor-or-self::figure' has no result." This problem is also valid for the XPath condition for an operation (if I would like to provide this action only if a figure element is selected).

Can you reproduce this and, if yes, is there a workaround for that problem?

Thx & kind regards,
Stefan

Re: ancestor-or-self:: doens't work within a graphic?

Posted: Fri Nov 11, 2016 9:13 pm
by Radu
Hi Stefan,

Maybe that's because all TEI P5 elements are in a namespace. Have you tried ancestor-or-self::*:figure?

Regards,
Radu

Re: ancestor-or-self:: doens't work within a graphic?

Posted: Mon Nov 14, 2016 1:53 pm
by stdu
Hi Radu,

I've tried it, but it doesn't help unfortunately.

Best regards,
Stefan

Re: ancestor-or-self:: doens't work within a graphic?

Posted: Mon Nov 14, 2016 4:51 pm
by Radu
Hi Stefan,

If you contact us using our support@oxygenxml.com email address and provide a small sample XML document and a screenshot from the dialog which is used to configure the Author action, we could try to provide you with more help.

Regards,
Radu