My EA's values are coming out of the DCR. so i have to get them and set them later. I have trouble getting the areapath and the DCR name, if can get this i can use iwextattr -s attibute=value.
No the piece of code i have provided above is from the tpl not from the workflow. In the workflow want the EA's aleady set on the DCR so that i can manipulate them as i wanted. I want to incoporate iwextattr in the tpl itself.Has anyone implemented any such thing.Thanks
my $dcr_path_name = iwpt_get_dcr_name();iwpt_output($dcr_path_name);my $setTitle = "$IWExtAttr -s \"Title\"=\""iwpt_dcr_value('dcr.Title')" "$dcr_path_name";
Thank you i totally forgot that. And my setting EA's is working fine from CLT. But the same path is not working inside the tpl.Please advice. my $dcr_path_name = iwpt_get_dcr_name();iwpt_output($dcr_path_name);my $setTitle = "$IWExtAttr -s \"Title\"=\""iwpt_dcr_value('dcr.Title')" "$dcr_path_name";
my $setTitle = qq[$IWExtAttr -s "Title=]. iwpt_dcr_value('dcr.Title') . qq[" "$dcr_path_name"];iwpt_output("CMD: $setTitle"); # for debugging purposesmy @results = qx($setTitle 2>&1);iwpt_output("ERROR? @results") if ($?); # for debugging purposes
Thanks all. OK here is the deal,from the tpl its quite evident that EA's are set when ever there is a preview or a generate functionality run on the DCR. As per my design the this apart is taken care i the workflow. Now i am in a situation where EA's on DCR should be set before the actual generation of html file because i am generating the file based on the Publishingdate which i am retrieving it from the EA's on the DCR. So if the date is 07/24/2006 i would generate my html file in 2006 folder. I am assuming that i am confused on my logic. One more thing which i was thinking of maybe i have to include a task int he workflow which exclusively sets the EA's followed by a task which collects them for manipulation. There is no way that these too things can be done in one single task..Any thoughts please.Thank you
In my case i really doubt it. Because i am collecting the EA from the DCR to create the html, and i can't set EA unless i generate an html. So i need an additional External task which would do what i wanted to get done.Thanks
$rootnode = TeamSite:CRnode->new($xml_string); $city = $rootnode->value('dcr.PressReleaseDate'); #07/24/2006
use TeamSite:CRnode;$rootnode = TeamSite:CRnode->new($xml_string); $city = $rootnode->value('dcr.PressReleaseDate');
open(IN, "<$file") || die " '$file' ($!)";{local $/ = undef;$xml_code= ;my $parser = TeamSite:CRparser->new(); # create a DCRparser my $rootnode = $parser->parse($xml_code); # get root DCRnode object if (!defined $rootnode) { print "BAD XML in DCR ".$file."\n"; close(IN); exit(0); }}$city = $rootnode->value('dcr.PressReleaseDate');
For this example use TeamSite:CRnode;$rootnode = TeamSite:CRnode->new($xml_string); $city = $rootnode->value('dcr.PressReleaseDate'); $xml_string is entire path to the DCR right?"Y:\default\main\branch\workarea\datatype\data\DCRNAME"butsome how this is not working for me. Can any one comment on this?Thank you
...my $dcr = "/file/system/path/to/DCR";open(IN, '<', $dcr) || die " '$dcr' ($!)";my $xml_string = do { local $/; };close(IN);my $rootnode = TeamSite:CRnode->new($xml_string);...
#my $file= "Y:/default/main/NECELAM/WORKAREA/Web/templatedata/MainPage/PressRelease/data/PressRelease2005";my$file="PressRelease2005";my $dcr = $file;open(IN, '<', $dcr) || die " '$dcr' ($!)";my $xml_string = do { local $/; };close(IN);my $rootnode = TeamSite:CRnode->new($xml_string);$city = $rootnode->value('dcr.PressReleaseDate');
I tried all the paths hard coding them as $file, none worked, it seems like i am making mistake somewhere. can anyone point me where i am going wrong.Thanks #my $file= "Y:/default/main/NECELAM/WORKAREA/Web/templatedata/MainPage/PressRelease/data/PressRelease2005";my$file="PressRelease2005";my $dcr = $file;open(IN, '<', $dcr) || die " '$dcr' ($!)";my $xml_string = do { local $/; };close(IN);my $rootnode = TeamSite:CRnode->new($xml_string);$city = $rootnode->value('dcr.PressReleaseDate');
my $xml_string = do { local $/; <IN> };
my $city = $rootnode->value('dcr.PressReleaseDate'); print LOG "$city\n";
my $city = $rootnode->value('record.PressReleaseDate'); print LOG "$city\n";
OK now its kind of working but, i think my statement here is not rightmy $city = $rootnode->value('dcr.PressReleaseDate'); print LOG "$city\n";here is my DCR
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE record SYSTEM "dcr4.5.dtd"><record name="PressRelease2005" type="content"> <!-- ... --> <item name="PressReleaseDate"> <value>07/24/2006</value> </item> <!-- ... --> <item name="BodyCopy"> <value> <font color="#000080"> <p> </font>hgdhgfdhgfdhgfdhgfd<font color="#000080"> </p> </font> </value> </item></record>
i am assuming that this has to be my $city = $rootnode->value('record.PressReleaseDate'); print LOG "$city\n";Please adviceThank you
use TeamSite:CRnode;my $file="Y:\default\main\NECELAM\WORKAREA\Web\templatedata\MainPage\PressRelease\data\PressRelease2005";#my $file="Y:/default/main/NECELAM/WORKAREA/Web/templatedata/MainPage/PressRelease/data/PressRelease2005";my $dcr = $file;open(IN, '<', $dcr) || die " '$dcr' ($!)";my $xml_string = do { local $/; };close(IN);my $rootnode = TeamSite:CRnode->new($xml_string);$city = $rootnode->value('dcr.PressReleaseDate'); print "$city\n";
C:\Interwoven\TeamSite\iw-perl\bin>iwperl testme1.iplMissing braces on \N{} at testme1.ipl line 2, within stringExecution of testme1.ipl aborted due to compilation errors.