Xpath select parent

I'm trying to use this rule to select the parent of a element and it keep crashing even the tutorials saying that is right.

<drop content="//input[@id='fisica']/parent::span" />


Is this possible?

edit: bad indentation code didn't displayed the snippet.


I never tried parent axis but child axis is working.


<drop content="//input[@id='fisica']" />

working? Just to be sure you select the input the correct way?

Maybe you can add a css class or id to the parent element - so you can select it that way? Or by index - like this //div[3]?

yes, just

<drop content="//input[@id='fisica']" />

is working.

Because the way the project is set up my wish is use the rules.xml and modify the other files only if there is no other way.


Plone Foundation Code of Conduct