Salut ! J'ai un super gros problème qui me prend la tête depuis 2 jours. Et je me demande si ca ne viendrais pas de la version de xalan que j'ai ??
Voilà la chose : j'ai installé : xalan-j_1_2_2 et Xerces-J-bin.2.2.1.
[décompressé et rajouter le classpath comme il faut]
Et je possède sur ma machine : j2sdk1.4.0_03
Pourtant, ce bout de code tout simple me génère des erreurs et je ne sais plus quoi faire !!! ALORS A L'AIDE !!!
[Edité par Nicolas Cuny]
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.xalan.xslt.XSLTProcessorFactory; import org.apache.xalan.xslt.XSLTInputSource; import org.apache.xalan.xslt.XSLTResultTarget; import org.apache.xalan.xslt.XSLTProcessor; import org.xml.sax.SAXException; public class JCreateHTML { try { XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); // Paramètre processor.setStylesheetParam("version","'1.0'"); // Sources XML et XSL XSLTInputSource xml = new XSLTInputSource("biens.xml"); XSLTInputSource xsl = new XSLTInputSource("affiche_biens.xsl"); // Résultat XSLTResultTarget result = new XSLTResultTarget("affiche.html"); // Transformation processor.process(xml, xsl, result); } catch(SAXException se) {} }
Merci d'utiliser des balises [code].
Partager