XSL/HTML vers XSL/FO pour creation de PDF avec FOP

"Ludovic BOUGER" <[email protected]>
Newsgroups gmane.text.xml.french.tech
Message-ID <[email protected]>
Bonjour,
Voici mon souci.

Je dispose d'un fichier myFact.xml contenant les données de ma facture.
"<facture> <numero>10</numero> <date>29/06/2006</date> <montanttotalht>1
600.00</montanttotalht></facture>"

ensuite un fichier myFact.xsl me permettant d'afficher en HTML une mise en
page de mes données.
"<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="html"/>
 <xsl:template match="/">
  <HTML>
   <BODY bgcolor="white" style="font-family:verdana; font-size:10pt;">
    <TABLE
...
</TABLE>
   </BODY>
  </HTML>
 </xsl:template>
</xsl:stylesheet>"

Je voudrai maintenant à partir de ces deux fichiers pouvoir généré un pdf.

J'ai donc trouvé l'utilisation de NFOP.
Mon problème c'est que le format de mon fichier myFact.xsl n'étant pas
XSL/FO je ne peux pas créer mon pdf.
Voici le code C# que j'utilise pour effectuer celà:

private static void GeneratePDF(string foFile, string pdfFile)

{

FileInputStream streamFO = new FileInputStream(foFile);

InputSource src = new InputSource(streamFO);

FileOutputStream streamOut = new FileOutputStream(pdfFile);

Driver driver = new Driver(src, streamOut);

driver.setRenderer(1);

driver.run();

streamOut.close();

}
d'apres ce que j'ai vu je dois passer à foFile le contenu d'un fichier fo
d'une valeur de ce style : "<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:fo="
http://www.w3.org/1999/XSL/Format">  <xsl:template match="/">    <fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">      <!-- defines the layout
master -->      <fo:layout-master-set>..."

Ma question, donc est comment transformer mon fichier myFact.xsl formater en
XSL/HTML vers un fichier XSL/FO que je pourrai passer en paramètre de cette
fonction qui marche très bien.

Ou encore mieux, est-ce que quelqu'un aurait une autre solution? Et en
VB.net par hazard?

Merci à ceux qui se pencheront sur mon problème.

Ludo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.