ancestor-or-self:: doens't work within a graphic?
Posted: 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 and 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
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
Code: Select all
url()
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