<iw_pt encoding="UTF-8" name="preview.tpl" /> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <iw_perl> <![CDATA[ ########## perl modules ############ use TeamSite::Config; use rogers::tpl_utils; use rogers::OpenDeploy; ########## perl modules ############ my $iwhome = TeamSite::Config::iwgethome(); my $iwmount = TeamSite::Config::iwgetmount(); ($iwcfg) = "$iwhome/bin/iwconfig"; my $dcrpath = iwpt_get_dcr_name(); $dcrpath =~ s#.iwmnt#iwmnt#g; my $dcr_name = iwpt_get_dcr_name("basename"); my $prefix = getLOB($dcrpath); my $prefDir = uc($prefix); my $templatename = getDataType($dcrpath); my $contentname = $dcr_name; $dcrpath =~ m//([^/]+)/data/; my $ofile = "generated/component/".$templatename."/".$contentname.".xm +l"; (my $hostname = `$iwcfg iwwebd host`) =~ s#n$##; my $edit_path = "http://".$hostname."/iw-cc/edit?vpath=".$dcrpath; $edit_path =~ s#$iwmount##g; (my $rogersca = `$iwcfg iwwebd rogersca`) =~ s#n$##; my $endtag = "]"."]>"; my $cdata = "<!"."[CDATA["; ############ Build the initial media lists my @media_ids = (); my $filelist = 'generated/filelist/'; my $media_file = $filelist.$contentname."_images.txt"; my @matches = getImageList( iwpt_get_dcr_name() ); ############ Build the region array my @region_array = ("default"); my $item_region = join(',',@region_array); ############ ]]> </iw_perl> <iw_comment> XML Output Generation </iw_comment> <iw_ostream file='$ofile'><content name="{iw_value name="$contentname" +/}" type="Common" location="/rogersca/TeamSite/{iw_value name='$prefD +ir'/}"> <iw_iterate list="dcr.root.default" var="item" iteration="counter"> <iw_BEA_value title="default_text_{iw_value name='$counter'/}_key" n +ame="item.key" /> <iw_BEA_value title="default_en_text_{iw_value name='$counter'/}_lab +el" name="item.label_en" /> <iw_BEA_value title="default_fr_text_{iw_value name='$counter'/}_lab +el" name="item.label_fr" /> </iw_iterate> <iw_BEA_value title="regions" name="$item_region" /> </content> </iw_ostream> <iw_include pt = '/interwoven/TeamSite/local/nested_tpl/mbintegration. +tpl' mode="ptlocal"> $iw_param{idmedia} = \@media_ids; </iw_include> <iw_ostream file = "$media_file"> <iw_iterate list="@matches" var="item"> <iw_value name="item"/> </iw_iterate> </iw_ostream> <iw_comment> Set Extended Attribs and Deploy </iw_comment> <iw_perl> <![CDATA[ ###EAs #PT #DCR my $cat = $dcrpath; $cat =~ s#(.*)/templatedata/(.*)/data/(.*)#$2#g; my $path_ofile = $1."/". $ofile; my $attrib1 = "TeamSite/Templating/PrimaryDCR"; my $attrib2 = "TeamSite/Templating/PrimaryDocumentType"; my $attrib3 = "TeamSite/Templating/PrimaryPT"; setiwextattr($path_ofile, $attrib1, $3); setiwextattr($path_ofile, $attrib2, $cat); setiwextattr($path_ofile, $attrib3, iwpt_get_pt_name("basename")); ##### DEPLOY my $source_WA = iwpt_get_flag_param("-iw_include-location"); $source_WA =~ s#.iwmnt#iwmnt#; my $dep_directory = "generated/component/".$templatename; my $odname_xml = "rogers_DEV"; my $odname_media = "rogers_Image"; $contentname = $contentname.".xml"; my @deploy_xml = opendeploy_xml($odname_xml,$source_WA,$contentname , +$dep_directory); my @deploy_img = opendeploy_img($odname_media,$source_WA,$media_fil e +); my $meta_refresh = ""; if (($deploy_xml[0] eq "1") || ($deploy_img[0] eq "1") ) { $info = qq|Deployment Failed please contact your administrator +|; if ($deploy_xml[0] eq "1") { $info .= qq|Content File failed Contentname -> $contentname $ +deploy_xml[1]|; } if ($deploy_img[0] eq "1") { $info .= qq|Content Media images Failed$deploy_img[1]|; } } else { $info = qq|<img src="/iw-icons/web/wait.gif" border="0" alt="Pleas +e wait">|; } $output = qq{ <html> <head> <title>Preview in BEA Portal</title> </head> <body> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> <center><a href="javascript:self.close()">$info</a></center> </td> </tr> </table> </body> </html> }; ]]> </iw_perl> <iw_value name="$output"/>
This code is working fine in development environment. But in staging environment it gives compilation error. I tried to use iwpt_compile.ipl (ipl is variant of perl by interwoven, so ipl) from the /iw-home/bin directory , where this file is kept, as follows
./iwpt_compile.ipl -pt /default/main/NEWROG/Common/WORKAREA/Common/tem +platedata/Component/Resource/presentation/preview.tpl
I got the error
<ERROR source='TeamSite::PT::iw_ostream'> element syntax: <iw_ostream mode='docroot' .../> In 'docroot' mode, -iw_include-location <path> must be used </ERROR>
When I try to run the iwpt_compile.ipl command from iw-home/bin dir as follows, command does not work at all and SSH Shell client is getting froze
./iwpt_compile.ipl -pt /default/main/NEWROG/Common/WORKAREA/Common/tem +platedata/Component/Resource/presentation/preview.tpl -iw_pt-dcr /def +ault/main/NEWROG/Common/WORKAREA/Common/templatedata/Component/Resour +ce/data/search/search -ocode /tmp/resource.ipl
Whats wrong with preview.tpl file ? How can I make sure its working ?

In reply to following code gives error by manishrathi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.