I’d like to set up a tikz style, say `/uml/interface`, that would modify the node content following some macro of my choosing. For example, it would prefix the node text with some text of my choosing. I would use it as follows.

```
\path node[/uml/interface] (MyInterface) {MyInterface};

```

And as a result of applying the `/uml/interface` style the node content would become `<<interface>> \\ MyInterface`.

I have used the font change command, as follows.

```
\tikzset{/uml/interface/.style={rectangle, draw, every text node/.style={font=\bfseries}}}

```

But I did not find in the PGF manual how to programmatically modify the node text itself.

Ideally, I would do something like this:

```
\tikzset{/uml/interface/.style={…, every text node/.style={applyMacro=\umlinterface}}}

```

and

```
\newcommand{\umlinterface}[1]{<<interface>> \\ \textbf{#1}}

```

. As a workaround I could typeset my node as follows:

```
\path node[/uml/interface] (MyInterface) {\umlinterface{MyInterface}};

```

, but I’d prefer having a clean node content part (for consistence, maintenance, readability, and avoiding refactoring all my related node commands when I decide to add a prefix).