function to get dcrpath in perl for interwoven teamsite

sub getDcrPath{
    debug("getDCRPATH CALLED");
    my $currentDcrName=shift;
       debug("dcr path: $currentDcrName");
    $currentDcrName=~ s/(.*WORKAREA\/)(.*?\/)/$1$2/;
    my $workareaName=$2;
    #my $dcrPath="$iwmount/default/main/$branchName/$subBranchName/WORKAREA/$workareaName/templatedata/content/Fragments/data/";
    debug("WORKAREA ".$workareaName."==".$currentDcrName);
    return $workareaName;
hi friends here iam sharing a subroutine for reading a datacapture template in interwoven teamsite using perl script. hope this subroutine will help your requirement.

sub readDatacapture

    my $dctFile = shift;
    open INPUT, "<$dctFile";
    my @output_string = ;
    close INPUT;
    foreach my $line(@output_string) {
        if ( $line =~ /.*command.*/ ) {

            #grab just the command itself
            my @fields2 = split /=/, $line;
            my $inlineCmd = @fields2[$#fields2] ;
            $inlineCmd =~ s/\/\>//; #strip off trailing tag
            $inlineCmd =~ s/\"//g; #strip off quotes

            #print "XXX" . $inlineCmd . "XXX\n";
            my @Results = `$inlineCmd 2>&1`;
            my $Result = join ('', @Results);
            chomp ($Result);   

            #remove the double substitution tags, since it maybe a normal inline that has substitution on it
            $Result =~ s/\//;
            $Result =~ s/\<\/substitution\>//;

            #remove xml declaration that would normally come across an inline
            $Result =~ s/\<\?xml.*\>?//;

            #Now substitute result for inline command
            print $Result;
            #debug("The result of $inlineCmd ");
            #print " IN ELSE ========== > $line\n";
            print $line;
in interwowen teamsite we can able to integrate java applications with content.Teamsite content management system is more efficient than other different cms available now.Today i will explain how we can create html pages with content and how we are storing that content in cms and how we integrating that pages with java applications.

in teamsite , for creating a html we need that html data(data contains any information together with page contents and html tags).first we need to capture this data/content in an xml format.For capturing data in teamsite we are using some templates ,called datacapture template.
With the help of datacapture template we are storing our content in xml format.

The points to be remebered before starting page generation in teamsite.

1)create entry in templating.cfg for the new datacap