Small refactoring related to handling XJSText.