2 Replies Latest reply on Jan 3, 2009 8:27 AM by (Venkateswara_Rao)

    Duplicating a page - problem in  CS3 - Using Javascript

      Hi,<br /><br />I am trying to replace images on my page (indesign tempalate) using "importXML" method.<br /><br />I have added tags and XML looks like this<br /><br /><?xml version="1.0" encoding="UTF-8" standalone="yes"?><br /><Root><br />  <container><br />    <imagefile></imagefile><br />    <att_1></att_1><br />  </container><br /> <container><br />    <imagefile></imagefile><br />    <att_1></att_1><br />  </container><br /></Root><br /><br />Now when I am duplicating a page which contains items as mentioned in above xml and when I exported a whole document xml to a file the final xml looks like this.<br /><br /><?xml version="1.0" encoding="UTF-8" standalone="yes"?><br /><Root><br /><br />  <container><br />    <imagefile></imagefile><br />    <att_1></att_1><br /><br />    <imagefile></imagefile><br />    <att_1></att_1><br /><br />  </container><br /><br />  <container><br /><br />    <imagefile></imagefile><br />    <att_1></att_1><br />     <br />    <imagefile></imagefile><br />    <att_1></att_1><br /><br />  </container><br /><br /> <container> </container><br /> <container> </container><br /></Root><br /><br />The container element is not properly duplicated. <br /><br />Can you please tell me how to fix this problem.<br /><br />Actually I will get dynamic xml (like above) from my server which may have<br />1 or any number and I have indesign template that contains a single page with 2 images boxes + 2 text boxes.<br /><br />So if I get 6 images in xml, then I have duplicate the 1st page twice so that it will become 3 pages (3 x 2 = 6).<br /><br />I am facing problem while duplicating page. Please help.<br /><br />Thanks,<br />Venky
        • 1. Re: Duplicating a page - problem in  CS3 - Using Javascript
          Loic.Aigon Adobe Community Professional
          Hi,

          Maybe, you have a matter with your process itself. You shouldn't duplicate pages by yourself but get the duplication process by the xml import itself.
          I am learning with this book :
          "A designer's guide to Adobe indesign and XML" from JJ Maivald and Cathy Palmer.
          In general, they spend time on structuring the tagging process and page elements. With a frame on the master spread and page set to master.
          At the end, they import the xml (selecting the root element on the structure). And then they drop the root element onto the page frame.
          At first the text frame has overset. But clicking on the plus icon, adding a page and maj click on the next frame autoflow all the xml elements. So you don't care about duplicating the pages, indesign does it for you.
          I don't know if it answers your problem. But there is a chance you get a proper xml export this way.
          Loic
          • 2. Re: Duplicating a page - problem in  CS3 - Using Javascript
            Level 1
            Loic,

            Thank you very much for your reply.

            Regards,
            Venky