https://discuss.asciidoctor.org/Resetting-nested-attribute-reference-values-tp6690p6691.html
@trost,
By default, attribute values are not recomputed. Therefore, reassigning fruit has no affect on phrase because phrase has already been resolved.
I looked into deferring the resolution of the attribute references when defining the attribute. To do that, you would use:
:phrase: pass:c[{fruit} is a kind of fruit]
While that prevents the attribute reference from being resolved at assignment, there's no way in AsciiDoc to have it be resolved later (aside from writing an extension*). The problem is, when you reference {phrase}, it only resolves the value of phrase, not the attribute references it contains.
Unless there's something I'm not thinking of, I don't think there's a way to do what you want to do currently. AsciiDoc attributes weren't designed for that use case. We could consider a way to recursively resolve attribute references after Asciidoctor 2.0.0.
Cheers,
-Dan
You could write an inline macro extension called "resolve-deep" (e.g., resolve-deep:phrase[]) that resolves attribute references inside of an attribute value.