4 Replies Latest reply on Mar 24, 2015 9:43 PM by tanujad54435002

    Issues while importing xml using javascript



      I am importing an xml file in Indesign using javascript.  I have been able to map most of the tags to their proper styles.  The issue that need to be resolved are:

      1.  How to apply bullet paragraph style to tags?     

           When I apply the style called "bullet" to <ul> tag, then Indesign script goes in a loop. It just goes on placing empty textframes forever... 

      2.  I can import table structures.  But when the text in a cell is longer than the place available, it shows an empty cell there along with a red dot marking error.

           How to provide for 'autoflow' of text within  the table cells? 


      Any help will be greatly appreciated.  I have spent a lot of time searching the web for the same, but have found nothing... 


      Thanks in advance,

        • 1. Re: Issues while importing xml using javascript
          Laubender Adobe Community Professional & MVP

          @tanvis – answering your issue 2. is difficult. Cell oversets can mean a lot of things to check and control before placing text.

          Here are some:


          1. Is the cell width big enough to hold the single hyphenated chunk of a word?
          2. Is the cell height big enough to hold the text?

          3. Is the cell of fixed height?

          4. And if it is not of fixed height, how are the settings for max and min height?
          5. Font size of the formatted text?

          6. Hyphenation off or on for formatted text?

          7. Do come image containers along with text?

          8. Are there other anchored objects that come along with the text?

          9. Inset values for the cells? Too big? And factoring in min and max height settings cannot hold text of point size x.


          This list is not exhaustive. Just some points on an "endless" list what can go wrong…





          • 2. Re: Issues while importing xml using javascript
            Loic.Aigon Adobe Community Professional



            For the list issue, you can apply a style without bullets like a dummy one and once the import is done, remove this dummy style with the bullet one.


            For cell overflows, I am afraid you have to expand columns until there is no longer overflows ( Expand > Overflow ? > Expand > Overflow ? > etc. ).




            • 3. Re: Issues while importing xml using javascript
              tanvis58867412 Level 1

              I could solve the bulleted list problem.  It was the problem in style definition.  I had mistakenly checked 'No Linebreak' box in paragraph style for Bullets.


              If  I break the string in table cells in little chunks programmatically, and then import the xml in indesign, it works.  But then I have to manually correct all the table cell text to lay it properly.  Is there a way in which I can define table cell default attributes ? Because I am importing xml in a template only. So I can define the default table in it.



              • 4. Re: Issues while importing xml using javascript
                tanujad54435002 Level 1



                Please check the minimum and maximum value of row Height of that particular cell. If the row height minimum and maximum value are less than the quantity of data it can fit then for overflow content it will show red dot. To resolve this issue

                open that template -> Select the cell where issue exist -> Right click -> Cell Options -> Rows and Columns -> increase the value of Row Height Maximum value

                You can also apply a check in your script if the table cell content overflows then increase it's row height maximum value.


                Hope this would hep you to resolve your problem