5 Replies Latest reply on Oct 14, 2016 8:47 AM by Janus Bahs Jacquet

    ‘Open file’ dialog box pops up for every href attribute when importing XML

    Janus Bahs Jacquet Level 1

      (InDesign CC2014/version 9.0; Mac OS X 10.11.6)


      I am importing a rather large XML file into InDesign.


      The file contains lots and lots of tables, which are formatted in the InDesign table model; an example of a simple table with one header row and two body rows:


      <Table aid:table="table" aid5:tablestyle="[Basic Table]" aid:tcols="4" aid:trows="3">
        <Cell aid:table="cell" aid:theader="" aid:ccolwidth="76.545">Header1</Cell>
        <Cell aid:table="cell" aid:theader="" aid:ccolwidth="266.49">Header2</Cell>
        <Cell aid:table="cell" aid:theader="" aid:ccolwidth="36.855">Header3</Cell>
        <Cell aid:table="cell" aid:theader="" aid:ccolwidth="36.855" aid5:cellstyle="Highlight">Header4</Cell>
        <Cell aid:table="cell"><element href="http://www.example.com">Content1-1</element></Cell>
        <Cell aid:table="cell">Content1-2</Cell>
        <Cell aid:table="cell">Content1-3</Cell>
        <Cell aid:table="cell">Content1-4</Cell>
        <Cell aid:table="cell"><element href="http://www.example.com">Content2-1</element></Cell>
        <Cell aid:table="cell">Content2-2</Cell>
        <Cell aid:table="cell">Content2-3</Cell>
        <Cell aid:table="cell">Content2-4</Cell>


      Note the two Cell elements that have a href attribute.


      Importing this works almost perfectly: it imports the XML file and lays out the table as it’s supposed to. But, it only does so after being extremely annoying. My flow is:


      • Go to “Import XML...”
      • Select the file (and check “Merge content”, “Show XML import options”, and “Import Into Selected Element”)
      • Set the import settings the way I want them (for present purposes, I just tick “Import text elements into tables” and leave everything else empty)
      • Click “OK”


      At this point, InDesign throws up the “Open File” dialog box and forces me to choose a file. Only some files are choosable—all CS/CC documents are, but .txt and .xml documents aren’t, for instance. It doesn’t seem to matter which file I choose. There are no options in the dialog box. When I click “Open”, anywhere from a few milliseconds to about a quarter of a second passes, and then the same dialog box opens again.


      This happens exactly once per element in the XML file that has a href attribute. So in the example above, where two of the Cell elements have a href attribute, it pops up twice. Once I’ve selected a file the required number of times, the XML import completes and flows perfectly. If I click “Cancel” in any of the dialog boxes, the import cancels completely.


      While I’ve been testing and laying out, I’ve only been using small files that require me to choose a file (for no apparent reason) a few times, and it’s only been a minor irritation. Now that I have to import the actual file, which contains more than 4,000 hyperlinks, I would really, really like to get rid of having to do this.


      Does anyone have any idea why the *#%@ InDesign wants me to select a file (apparently without using it for anything) for every table body row in my XML file? Is it not recognising http:// as a valid protocol for links to the Internet and wants me to find the target manually?


      Even more importantly: how can I make it stop?