1 Reply Latest reply on Aug 16, 2011 11:13 PM by John Hawkinson

    [CS5][JSX] File from the web?

    James Robinson

      Is it possible to use a file from the web?

       

      For instance I have an xsl file I want to use that is at a domain:

       

      http://www.someserver.net/myxsl.xsl

       

      If I use File('http://www.someserver.net/myxsl.xsl') it tries to start searching for 'http://www.someserver.net/myxsl.xsl' from the scripts path:

      C:\Program Files\Adobe\Adobe InDesign CS5\Scripts\XHTML for Digital Editions\http:\someserver.net\myxml.xsl

       

      which does not exist. If I use a string it simply says

       

      ""http://www.someserver.net/myxsl.xsl""

       

      does not exist (not sure why quotes are doubled around it).

       

      The error is thrown when I go to open the XML file with the transform variable:

       

      cDoc.xmlImportPreferences.allowTransform = true;
      cDoc.xmlImportPreferences.transformFilename = defaultPathImportXSL;
      cDoc.importXML( XMLFilePath );
      

       

      defaultPathImportXSL is the variable contianing the path to to the XSL file (wrapped in File() or not -- this is the variable that is not found).

      XMLFilePath is the variable contianing the path to the XML file which works (can be found).

       

      Is there a way to use a web URL as a usable file in InDesign?