There is a query regarding Indesign XML scripting, Is the below process is possible?
XML file is linked with the InDesign file. This means that the XML file is automatically updated/corrected (XML file should be separate) as corrections are made in InDesign (or the other way round, updates in the XML are made to the InDesign file), and will not need to be exported out of InDesign at the end of the process.
XML and InDesign are separate, but corrections made in one will be automatically updated in the other? (There should be no round tripping the XML out of the InDesign file.)
Dynamic linking is only one way from the xml content to the indesign document (and given that the import as link option is set). Any changes in the document won't be updated in the xml file automatically.
You can think of a script that would monitor changes in the layout and do export again the xml file. But that would mean setting the link in outdated mode so you would update. But then the contents would change etc.