Placeholders are just dummy text which will be replaced by your real text by overtyping. This is definitively not what you are looking for.
You didn’t describe the characteristics of your “xxx” variable data. I’ll then assume they are some intrinsic properties of the document.
You can define them as Custom Properties in File
>Properties
. Each property has a name and a (typed) value. Each property creates a field.
This field is available for Insert
>Cross-reference
in DocInformation
tab, Type Custom (expandable list).
You mention a template. If all your documents share the same properties (but obviously not their values), you can define the properties themselves in the .ott document with dummy value (such as a reminder to change it).
When you instantiate the template, the properties set is transferred into the newly created real .odtdocument and detached from the template. From now on, the properties set is specific to your document, with its own values. Even if the template is modified, the properties set will not be impacted (just like template initial text). Only styles are updated.
What I describe here is guaranteed to work with .odt, not with .doc(x). Since you did not mention OS name, LO version and save format, I give you a standard answer.