This content has been marked as final. Show 7 replies
as your script shows, the events afterImport and beforeImport are triggered by placing a file onto the layout, not by importing an xml-file.
What exactly do you want to do with the xml before and after the import?
Before the import you may want to transform the xml with XSL. And having imported the xml into the document you may work with XML-Rules before placing it in a textframe. Once you have it placed in the textframe you can use the powerful combination of GREP and XML rules.
I am sure you will be able to process those footnotes.
Actuall i added beforeimport just for test. I wrote some script to process the footnote tags in xml (both in normal text and the one with in table) and to add footnotes in indesign. I tested the script from script panel. Now what I need is, I want to execute that script auomatically after importing the xml (into our template), instead of user runs it.
Could you please tell me how can i achieve this
If I understand right, the user is doing the xml Import ? Can you not add a dialog for the user to choose the xml, import the xml, do you footnote processing all in one script ?
Yes user will open the template and import the xml with File - Import XML menu option.
Iam processing all the footnote tags of xml in one script file
What Stefan is saying is: create a script that leads the user through the process. If you do this, you don't have to worry about event listeners/event handlers at all. Since there is no specific event generated by the Import XML process, this seems like a good approach.
To do everything in one script, is there any possibility of getting the standard import xml code and appeding my script to that as a continution. If so where can find thats
You can find an example of importing XML in the ImportXML.jsx script that's in the Scripting Guide scripts archive. Direct link: