3 Replies Latest reply on Dec 7, 2009 3:36 AM by Dirk Becker 

    Hypothetical Document construction using JS & XML

    Karl Randay

      I work for an ad agency that produces large technical brochures for automotive clients and we're looking for ways to automate a lot of the more data-intensive areas of content population and build.

       

      What I have is a basic idea that the client could build and populate content tables using an online application (much like excel, but with the ability to associate each cell, row or column with a particular data type [titles, bullets, rules, etc.], then this would generate a js file to tell indesign how to build a template and xml to populate it.

       

      The problem we have is that each brochure is different to a certain degree from the previous, so the process needs to be flexible upfront yet easy for the client to imput data. This element is clear. Where I struggle is in understanding the technical process of pairing xml and js and if it's totally feasible to let these work together, generate stylesheets and actually 'design' the document automatically.

       

      Is this possible using the current abilities of indesign? Is it a difficult process to get a js file to work with an xml file to get a working template with all of the tagging and structure elements of the document build?

        • 1. Re: Hypothetical Document construction using JS & XML
          Dirk Becker  Level 4

          Almost everything in the document is available to scripting. Without scripting, the file format IDML can also represent the same data. IDML is a collection of XML files, packaged into a zip file. So, InDesign can handle its part.

          As you already foresee, the problem comes with flexibility. Basically the more options you'll offer to the client, the more implementation work has to go into the glue code that ties everything together. Major components involved are the web server with its application (probably a customized content management system), its database and InDesign Server - the same program as InDesign Desktop, but with a license for web service, and faster because of optimizations and removed UI.
          The web server adds the web UI to choose from the libraries or fill in parameter sheets. These are stored in the database, so you need a management system. The server then validates user data and then also stores the whole working data, users choices and so forth in its database. It then passes an extract of the data on towards InDesign - it invokes scripts, delivers XML, it may even control InDesign through remote commands, or it produces the mentioned IDML and invokes less scripts to load and render, but that's just a technical detail, the operations are equivalent.
          You - your script, but in principle same as for manual work - will build or eventually update your documents from a library of partial templates, fill in the data and produce a first rough document. Then you will clean up the layout according to predefined rules - images should stay with their text, tables should not break except for those two, some data needs different master pages and so forth. Deliver to the client for preview, and start over again.
          Also consider that instead of web UI the client may already have the data ready in their system, so for some data it will be an import task. On the other hand, for your preparations you will soon also need a management system for all those template libraries, and rules which of them may be used together, access control so that previous year's versions are not accidentally used and so forth. Besides you may need a "workflow" mechanism to pass on the prepared product for final human corrections, or more glue code so it is imported into your existing production system.
          Everything doable, and it would be an interesting project for many people around here with enough spare time, but be prepared for much effort (team size, and duration) to get it going. Of course you can start with low budget, small steps and continuous growth. In the long run even to handle such a project requires specialized skills. On the other hand some components or a system close to your wishes may already be available from external vendors. Just to find them, to evaluate the products against your requirements can also easily cost you weeks.
          Dirk
          1 person found this helpful
          • 2. Re: Hypothetical Document construction using JS & XML
            Karl Randay Level 1

            Excellent response Dirk, and it pretty much fulfills my thoughts regarding what we can and can't do, I think it's just a matter of building the resource and expertise to actually make the project happen now.

             

            Our client uses very basic rudimentary spread sheets for currently setting up data, which is terribly primitive, but does enable us to totally overhaul the workflow mechanism. This is also a potentially useful construct for many of our other clients, so long term would definitely be a good investment, it's now just a matter of collecting the expertise and people who understand enough about how this all works to get it under way.

             

            Regards,

             

            Karl

            • 3. Re: Hypothetical Document construction using JS & XML
              Dirk Becker  Level 4

              Karl,

               

              if that is the state at the client side you can indeed make it a selling point to extend your services for their convenience, rather than just offload own tasks onto them for cost reduction, streamline the process, eliminate error causes or whatever problems you primarily intend to solve.

               

              With the move from basic print production towards integrated media services and actual handling of data in the client domain you have chances for much stronger ties with your clients. It would not be the first time that a well maintained, permanently improving external service evolves into a welcome replacement for duct-tape spreadsheets used to work around the shortcomings of the big iron in the basement of the IT dept.

               

              As we talk about it I'm almost tempted to create a little proof of concept web app. I still occasionally work in that field, but my major focus for years has been on InDesign development and I've never combined the areas. It really sounds like a neat project, and it would be interesting to follow your progress - of course also in private if you prefer that.

               

              Regards,

              Dirk

              1 person found this helpful