I am trying to do a Simple thing of creating a new html file for each iteration, so it is like i will have a n html file for n replicants. with file names from one of the feilds called "FileName" on DCT
I am not sure where i am going wrong, i am using iw_iterate AND IW_OSTREAM. Has any one implemented this before. I have attached a snippet...Is this the correct way to do?
When I try to compile my tpl
Its giving the following error
[
ERROR source='TeamSite:

T::iw_ostream'>
element syntax:
In 'docroot' mode, -iw_include-location must be used
]
I am attching my snippets can anyone please suggest..where am i going wrong.I am using TS 6.7.2 sp1 on windows server 2003
I have gome thru the documentation and gave as below:
[iw_ostream mode='docroot' file='$file_name']
Add your project Comment here
<br>use TeamSite::Config;<br>use TeamSite::JavaResourceBundle;<br>my $debug_output = "D:/Interwoven/TeamSite/local/logs/homecountry.log"; <br>debug("DEBUGGING THE HTML OUTPUT FOR THE HomeCountry TEMPLATE.....");<br>====================<br>sub debug {<br>if ($debug_output) {<br>open(OUT, ">>$debug_output") || return;<br>print OUT
@_, "\n";<br>close(OUT);<br>}<br>}<br><br>#***********assigning dcr path***********<br>my $dcrpath =iwpt_get_dcr_name(); <br><br>#***********TeamSite installation directory***********<br>my $iwhome = TeamSite::Config::iwgethome();<br>my $output_file;<br>my $wa_path="";<br>#***********Taking workarea path***********<br>$wa_path = substr($dcrpath, 0, index($dcrpath, "templatedata") - 1);<br>$wa_path =~s/\\/\//g; <br>debug("workarea:$wa_path");<br>#***********check if this is a preview call***********<br>my $previewornot = iwpt_get_flag_param('-oprefix');<br>$previewornot = "preview" if $previewornot =~ /zz.*/; <br>debug("previewornot:$previewornot");<br>my $generate_folder="/html/"; <br>my $page=qq(<html><br><body><br><p><br>this is para<br></p><br></body><br></html>);<br>debug("page:$page");<br>
my $AutogenerateName=iwpt_dcr_value('Portlet.Autogene rateName');
debug("AutogenerateName:$AutogenerateName");
my $file_name = $generate_folder.$AutogenerateName.".html";
iwpt_output("$page");
debug("ggggggggggggggg:$previewornot :$generate_folder");
]
And also from cmd I gave iwpt_compile.ipl Homecountry.tpl -iw_include-location y:default/main/safari/AM/WORKAREA/Workarea01/jt-ofile a.html]
But I got an error code 1
could not process template Homecountry.tpl
Now I debugged using and also debugged using [y:default/main/safari/AA/WORKAREA/Workarea01/templatedata/jt/HomeCountry/presentation iwpt_compile.ipl Homecountry.tpl -iw_include-location . -ocode ****.ipl ;]
Now again I got the docroot error.
Can anyone please help me in this...and suggest me where am i going wrong?
Thanks in advance