I have a java program which dynamically creates an xml file and using the transformation function it translates the xml file to a word document. The transformation function also take xsl file as input to read the xml file.

The xsl file calls a htm file which contains definitions of headers and footers.

The placeholder created in the htm file to hold the header value should have a value fetched from xml file during runtime.

So the final word document generated should have header value fetched from xml file.

How can this be achieved? I have tried various methods like using dhtml onload and <script>, but nothing works. Please help