1. Mozno je lesie pouzit templates:
TransformerFactory transFact = TransformerFactory.newInstance();
Templates templates = transFact.newTemplates("test.xsl");
Transformer transformer = templates.newTransformer();
2. nebude chyba v tom, ze nevie najst test.xsl ? Nema tam byt "/test.xsl"
>
>
> ------- Předaná zpráva -------
> Od: "Jaroslav Kuba" <[EMAIL PROTECTED]>
> Komu: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Předmět: XALAN
> Datum: Thu, 18 Aug 2005 18:52:51 +0200
>
>
> Mam problem s pouzitim xalanu na linuxu
> Mam servlet ktery bezi na Windows pod Tomcatem 4.01
> a dela transformaci xslt sablony pomoci procesoru XALAN
> transformaci vytvarim takto
>
>
> TransformerFactory tFactory = TransformerFactory.newInstance();
> DocumentBuilderFactory dbFactory =
> DocumentBuilderFactory.newInstance();
> Document xmlDoc = dbFactory.newDocumentBuilder().newDocument();
> Source XSLSource = new StreamSource("test.xsl");
>
> Properties prop = new Properties();
> prop.put("indent", "yes");
> prop.put("ident-amount", "5");
> prop.put("method", "xml");
>
> Transformer transformer = null;
>
> **************************************************************
> T A D Y T O A S I P A D N E na
> na TransformerConfigurationException "Can't init default
> templates"
> transformer = tFactory.newTransformer(XSLSource);
>
> ***************************************************************
> transformer.setOutputProperties(prop);
> System.out.println("Transformace");
> transformer.transform
> (new StreamSource("test.xml"), new StreamResult(new
> FileOutputStream("test.html")));
> System.out.println("OK");
>
>
>
> --
> Delphi 6 SP1 WinXP SP1
>
> Jaroslav Kuba
> [EMAIL PROTECTED]
>
> Tresoft s.r.o
> Průmyslová 1137
> Jičín
> 506 01
>
> +420777172420
> ICQ:156901864
>
>