We need a stage which can add a format/attribute/value triple to the entity attributes on an entity.
It would need to handle the case where there was no existing container element (EntityAttributes) and also the case where there was no existing Extensions container for that.
It should probably add the given value to an existing Attribute in preference to creating a second Attribute with the same format/attribute.
We should give some thought to whether it should add the same format/attribute/value a second time, if it is already present. I'd suggest it's probably better not to (at least by default) as value duplication in attributes does tend to surprise people. If we're already doing the work to locate an existing format/attribute container, this doesn't seem like a big additional work increment.