Hi Npselvan,

I have used the xalan redirect extension for something like that - only I was creating xml files.
An example of my transform is here

<?xml version="1.0" encoding="UTF-8"?>
<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:output method="xml" indent="yes"/>

   <xsl:template match="guidance">
          <redirect:write select="outputfile.xml'))">
            <mytag>with some content</mytag>
          </redirect:write>
  </xsl:template/>
.....

I think your problem might be that you a not outputting any elements between <xalan:write> and </xalan:write>

Best regards,
Christoffer Dam Bruun

enpysoft skrev:
Hi Experts,
              I come across a different requirement. I have to create a 'n'
number of HTML files, each for the node available in XML file. Let me
explain you guys/gals with XML file and the XSLT file which has to be done.

My XML File is like this.,

<validation>
 <configuredtests>
   <test name="login"/>
   <test name="analyse"/>
   <test name="process"/>
 </configuredtests>
</validation>

Here i have to create the HTML file namely login.html, analyse.html and
process.html. These nodes are dynamically created one and not the static. So
as to create HTML file we do use XALAN:write.

In XSLT file, what i have to do this. I tried with following thing on XSLT
file and it is not working. so can u help me in how to get those things.

<xsl:stylesheet>
 <xsl:variable name="testloop" select="/validation/configuredtests/test" />
 <xsl:template match="/">
   <xsl:for-each select="$testloop">
     <xsl:variable name="testname" select="@name"/>
     <xalan:write select="concat($dir,'/',$testname)" />
   </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

But it is not creating the HTML files. Please help me out how to create the
HTML files from the values which are populated dynamically in XML file.


Thanks in Advance,
npselvan

Reply via email to