2 Replies Latest reply on Oct 18, 2012 5:27 AM by Romain B

    XML import : make InDesign access external entities

    Romain B



      I'm importing XML files in InDesign via a XSLT transformation.


      The source file location is on a web server (it works perfectly, you can import an online XML file in InDesign). This is a generic source file, wich contains urls to specific XML files that will be effectively imported. This multiple-input transformation is performed in XSLT with the document() function.


      It works well with Saxon, but the InDesign's processor doesn't seem to handle that and returns : "The external entity {file.xml} cannot be found".


      I understand this is a complex operation, but is there any way to outpass this limitation within InDesign ?


      Thanks :-)

        • 1. Re: XML import : make InDesign access external entities

          Not sure this is the problem but are you making the path relative to your Indesign file-- document/or your system-- are you using http in the path? Can you provide an example of the script - removing any specific or private server addresses for privacy's sake.

          • 2. Re: XML import : make InDesign access external entities
            Romain B Level 1

            Thanks for answering.


            I've found a solution so this is just to let you know.


            I use the desktop version of InDesign. I'm importing in it, with a script, "specific" XML files located on a web server (an OAI-PMH repository). So the paths of these files start with http.

            These paths are given by a "generic" XML file also located on the repository, so its path also starts with http.


            The source file I import is the generic XML file, from which a XSLT extracts the web addresses of the specific XML files to process them.


            A template would look like :

            <xsl:template match="oai:OAI-PMH/div">






            Then the XSLT transform all the specific files to make a really big and single XML file which is the one really being imported in InDesign. It's a single transformation with multiple-input.


            The InDesign's XSLT processor can get an input from an online repository, but it doesn't seem to handle the document() function so it can't make multiple input. My solution is to let Saxon do this work. The script writes a batch file calling Saxon with some parameters, executes it and waits for the output, which is then imported in InDesign with no more processing. I would have preferred to let InDesign do the transformation but this is ok.


            I hope I was clear enough.