0 Replies Latest reply on Jan 19, 2009 1:49 PM by GagnonEric

    CS2 AS: possible to corrupt a document with misuse of xml scripting.

    GagnonEric Level 1
      I havent tested in newer version and i have found a solution already, but i decided to leave a trace here in case someone ever encounter a similar problem...

      So i had a script that was creating a simplified version of document, including removing the xml structure. I have realised later that the modified document that had DTD's in them where crashing Indesign when opening the structure view (just opening the document was ok), while document without DTD where letting the opening of structure window occur but there where not root anymore (!) and creating a new xml node was then crashing indesign....

      I did some basic testing and it doesnt look like it's possible to recover the corrupted documents with simple manual operation (save a copy by ex.).

      After a quick check, i have found that the problematic script was:

      a)
      tell every xml element
      untag
      end tell

      The corrected script:

      b)
      tell every xml element of xml element 1 (root)
      untag
      end tell

      What is surprising is that the a) script alone in a new script is making indesign crash while it generate no runtime error when integrated in the complete batch script (containing other operation but not related to the xml). It doesnt seem to be related to use of "try" statement...

      Eric