I have a single source of content that needs to be rendered twice (as printer ready PDFs) with a different appearance in each instance.
What is your DataSource ? Do you need to change only few "places" in text - like name&address in letter header or whole contents is in DataSource ?
c) I'm assuming that if a and b are true then becaue IDML is XML the changes could also be made by a script. Is this assumption correct?
Not per se.
IDML is an export format -- you tell InDesign to export as such, and it does. Nothing to script here (except doing the export itself). The IDML file only "lives" on the hard disk, and reloading it into ID makes it a proper InDesign document again.
On the other hand, as long as the file is active inside ID, you can make a script do (almost) everything you want.
Theoretically, you can write a script that "reads" the IDML file [*], manipulates its contents, then "writes" it back -- but that has nothing to do with IDML, as you can do this with any file at all. InDesign is not "aware" of the internal structure of an IDML file, and the scripting interface has no useful functions to work with it.
Jongware, I think the original proposal was to script the changes to the IDML in some other scripting language (e.g. perl, python, etc.), rather than to do so with InDesign scripting.
The wisdom of this approach varies a lot. Almost certainly, any manipulation to InDesign documents is easier with InDesign scripting running live under InDesign than dealing with the complex IDML file format. But if a lot of work needs to be done on the file requiring integration with external software and tools, then it might be the way to go.
So, really, we need more information. What kinds of changes are desired to the book? Give some examples?
for IDML / ZIP files you can use app.packageUCF() and app.unpackageUCF()
Thanks for the response.
When I originally posted the question I was only thinking about changes to design/appearance (color, font, etc), but other changes could include moving content around, re-naming part or chapter titles, re-ordering parts or chapters, or removing or adding content. I think it would be rare that all of these changes would be made and more likely that the design changes would be made and maybe one or two of types of content changes might be made.