InDesign Scripting: Is "Remap Break, Whitespace and Special Characters" scriptable?

I’m trying to determine whether the “Remap Break, Whitespace and Special Characters” option in InDesign’s Export XML dialog can be controlled via scripting.

The scripting DOM exposes:

app.xmlExportPreferences.characterReferences = true;

and the property is readable/writable. However, after extensive testing in InDesign 2024/2026, setting it to true or false:

  • does not change the state of the Export XML checkbox,
  • does not change the exported XML, and
  • app.xmlExportPreferences.remapBreakWhitespace is undefined.

Has anyone successfully scripted this particular Export XML option, or is it simply not exposed through the InDesign scripting API?

you need to set/get then on the document level:

tell application "Adobe InDesign 2026" to tell document 1 to set character references of XML export preferences to true

OMG! Thank you, Leo!

I can’t believe (or maybe I can knowing me) that I overlooked this.

Thanks again!

-Jeff

It’s easy to overlook. Plus, since XML export prefs is indeed a property of both application and document, it’s unclear why you can’t modify it as the app’s property. So, in my view, it’s actually a bug.