<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:redirect="http://xml.apache.org/xalan/redirect" extension-element-prefixes="redirect"><xsl:template match="/"> <html> <body> <xsl:value-of select="title"/> <redirect:write select="secondary-output.html"> <xsl:value-of select="node/to/secondary/output"/> </redirect:write> </body> </html></xsl:template></xsl:stylesheet>
From Form Api using call server call an ipl file and execute below mentioned code, it will generate as many no. of Output files you desire.Eg:my $strTplPathHtml = 'Y:/default/main/"Path of the TPl/XSLt file";my $strhomeHtmlPath = Y:/default/main/"Path of the Output File ";my $strAddress = "DCR Address";$mycmd = `iwpt_compile.ipl -pt $strTplPathHtml -iw_pt-dcr $strAddress -smartwrite -iw_include-location . -ofile $strhomeHtmlPath -oenc UTF-8`;
Alternatively is it possible to use Form Api to call the below line more than once in the onGenerate function?IWPageGeneration.setOutputFile(strOutputFileName, true);I've tried to just call it in successive lines between setting the different PT and output file name, but this doesn't seem to work either.
Unfortunately the successive calls through formAPI didn't work out, but what did end up working was calling the "urlgenerate" url command as many times as needed.[HTML]https://servername/iw-cc/urlgenerate?dcr=/store/main/branch/WORKAREA/workarea/templatedata/category/datatype/data/dcr.xml&pt=/store/main/branch/WORKAREA/workarea/templatedata/category/datatype/presentation/template.xsl&output=/store/main/branch/WORKAREA/workarea/outputfile.html&override=true[/HTML]This thread has a few more details on calling this:http://devnet.interwoven.com/forums_vb/showthread.php?t=28837&forumid=13