[oXygen-user] What is "When this XPath expression is true" action parameter relative to?

Mark Baker mbaker at analecta.com
Tue Feb 26 11:07:52 CST 2013


What is the "When this XPath expression is true" parameter of an action
definition evaluated relative to? The docs just say "an XPath expression
that applies to elements and attributes;" but they don't say what the
current element is at the time the xpath is evaluated.

 

My reason for asking is this: I want to create a button to add an element to
a document. But since this element is only allowed once inside its parent
element, I would like the button to either disappear or be disabled if the
parent element already contains the element that the button inserts.

 

Ideally, I would like to do this using the stylesheet to remove the button
when the child element already exists, but CSS does not provide a selector
for an element that contains (or does not contain) another element, so there
does not seem to be a way to do that. (Enhancement request for an Oxygen CSS
extension for this purpose)

 

So since that does not work, my next approach is to invalidate the button if
the child element already exists. To do this, I think I would need the "When
this XPath expression is true" parameter to be evaluated relative to the
path specified in the "insertLocation" parameter, but that does not seem to
be how it works.

 

So, what is the current element when "When this XPath expression is true"
parameter is evaluated.

 

And, more generally, can anyone think of a way to do what I am trying to do
here?

 

Thanks,

 

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20130226/2f7878a8/attachment.html 


More information about the oXygen-user mailing list