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

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

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: 5692

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

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

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

Mon Nov 14, 2016 1:53 pm

Hi Radu,

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

Best regards,
Stefan
Radu
Posts: 5692

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

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests