Sorry Jason I duplicate my topic from Stackoverflow: https://stackoverflow.com/questions/44458760/docx4j-variable-prepare-cause-trouble-when-open-a-saved-docx but I will add more info here.
So I need to use variablePreapre() to regroup my variable (they look like that: $variable$), and when I open my new docx there is a Word error:
We're sorry. We can't open result.docx because we found a problem with its contents.
The XML data is invalid according to the schema.
Location: Part:/word/document.xml, Line: 0, Column: 0
But ...