0 Replies Latest reply on Aug 13, 2011 3:43 AM by M Karthik

    cals table and indesign cs3 (script)

    M Karthik Level 1

      I have xml file like:


      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN/" "docbookx.dtd">
      <chapterinfo><title>Chapter 1</title></chapterinfo><title> Introduction</title>
      <title>Chapter Outline</title>
      <sect1><title>1.1 INTRODUCTION</title>
      <title>Table 1.1 Information </title>
      <tgroup cols="2">
      <row><entry><para><emphasis role="italics">Information Details</emphasis></para></entry><entry><para><emphasis role="italics">Data</emphasis></para></entry></row>


      While i import the xml file its converted to the table format. Now i need to apply the table caption style using the script.
      Here my script



      #include "glue code.jsx"
      function main(){
          if (app.documents.length != 0){
              var myDocument = app.documents.item(0);
              var myRuleSet = new Array ( new TT);
                  var elements = xmlElements;
                  __processRuleSet(elements.item(0), myRuleSet);
          alert("it's over");
              alert("No open document");
          function TT(){
              this.name = "TT";
              this.xpath = "//table/title";    
              this.apply = function(myElement, myRuleProcessor){
              insertTextAsContent("\r", XMLElementPosition.afterElement);
              applyParagraphStyle(myDocument.paragraphStyles.item("#Table title"));
                  return true;


      While run the script, its not show any error. Also it it not applying the table caption style. Please help me, what is my error....