JOSM preset: key depending on the type - possible?

I try to build a JOSM preset for Kneipp water cures.
https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dkneipp_water_cure

Here I need to add an item for the foot basin.
This can be type=node,closedway:

        <item name="Foot basins of a Kneipp facility" type="node,closedway" preset_name_label="true" >
            <text key="name" text="Name" default="" />
            <key key="kneipp_water_cure" value="foot" />
            
            <key key="natural" value="water" />
        </item>

The problem is the key natural=water.
It’s only allowed on closedway, in this context.

Is there any way to make the key natural=water dependet on type=closedway?
So that it’s not added if type=node.

As far as I know, there is no way to build any decision-making logic into a Preset. I’m no expert but I have developed many of my own custom presets and have often wished for a way to make simple decisions within the XML code.

Someone else may provide more information but one definition of the XML file structure is as follows: “They are plain text files that don’t do anything in and of themselves except to describe the transportation, structure, and storage of data.” That would indicate to me that the XML format was never meant to be used programmatically.

Cheers,
Dave

So I need to do, what I don’t like:

        <item name="Foot basins of a Kneipp facility" type="closedway" preset_name_label="true" >
            <text key="name" text="Name" default="" />
            <key key="kneipp_water_cure" value="foot" />
            
            <key key="natural" value="water" />
        </item>
        <item name="Foot basins of a Kneipp facility (node only)" type="node" preset_name_label="true" >
            <text key="name" text="Name" default="" />
            <key key="kneipp_water_cure" value="foot" />
        </item>

I hoped, that there is an option to tell JOSM via this XML file how to handle keys depending on the selection.
node selected: this set of keys
closedway selected: another set of keys

In this case this would help.
But I have no idea if it’s really needed often.

I understand what you want to do but I repeat: you cannot use XML to make a decision to do tag an object differently based on whether it’s a node or a closed way.