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

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
stdu
Posts: 81
Joined: Mon Mar 05, 2012 5:23 pm

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

Post by stdu » Fri Nov 11, 2016 7:04 pm

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

Radu
Posts: 6395
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Fri Nov 11, 2016 9:13 pm

Hi Stefan,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

stdu
Posts: 81
Joined: Mon Mar 05, 2012 5:23 pm

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

Post by stdu » Mon Nov 14, 2016 1:53 pm

Hi Radu,

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

Best regards,
Stefan

Radu
Posts: 6395
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Mon Nov 14, 2016 4:51 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply