[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] jdk 1.5 and docbook xsl
Hi Pierre, I still don't understand enough of your problem. First, let's figure out if this is a docbook problem. Can you run any XSLT transformation using your setup? If you use a very simple XML document and trivial XSL stylesheet? If that doesn't work, then your class setup is having the problem. If the simple one works, and the DocBook stylesheet doesn't, then we need to find out where "db2html" is coming from. As far as I can tell, that isn't part of Java 1.5, and it isn't part of the DocBook XSL distribution. Is there some DocBook toolkit in your CLASSPATH? I didn't see where you described your CLASSPATH. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Pierre Attar" <pat@tireme.fr> To: <docbook-apps@lists.oasis-open.org> Sent: Thursday, January 27, 2005 12:01 PM Subject: RE: [docbook-apps] jdk 1.5 and docbook xsl Hi all, I just repost my answer because I really do not understand what's happening. Before, I was using saxon plus xerces but in my idea, JDK 1.5 should enable me not to deal with two product lines (saxon and xerces) wich is quite usefull for me. That's the reason why I would really be pleased to find a solution to this import problem. Regards, ierre At 09:49 24/01/2005, you wrote: >Here are the answers to environment questions. > >Pierre > >>Sorry, but it is very difficult to help without more information. In your >>original post, you refer to problems with a translet called "db2html", but >>you need to provide more details about that. >> >>Exactly how you start the transformation (command line, your own Java class, >>...)? > > >I start from My own class and I'me now able to have a best message error : > >javax.xml.transform.TransformerConfigurationException: Chargement >impossible de la classe translet 'db2html'. >at >com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTransletCl asses(TemplatesImpl.java:315) >at >com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInsta nce(TemplatesImpl.java:333) >at >com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(T emplatesImpl.java:366) >at >com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTran sformer(TransformerFactoryImpl.java:620) >at >fr.tireme.utilities.xml.xslt.ProcessFromCommandLine.main(ProcessFromCommand Line.java:111) > >Line 111 corresponds to the following code line : >Transformer transformer = tfactory.newTransformer(new >StreamSource(xslFileName)); > >The stylesheet I use is the folowing one where, for test purpose, I've >simplfied up to the simplest import. >NOTE that if I use the docbook.xsl it works, it is only while importing >that it does not works ! > > ><?xml version="1.0" encoding="UTF-8"?> ><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >xmlns="http://www.w3.org/1999/xhtml" version="1.0" >xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" >exclude-result-prefixes="doc"> > <xsl:import href="../docbook-xsl/xhtml/docbook.xsl"/> ></xsl:stylesheet> > > > >>What is on your classpath? What does your source XML look like? Did >>you try a different (perhaps non-Java) processor to see if the stylesheets >>work with it? > >Standard within an eclipse environment : only the JDK which meands rt.jar, >etc. > > >Note, the Java class looks like : > > try { > PrintWriter resultWriter; > StreamResult strResult; > > if (null != outFileName) { > strResult = new StreamResult(new > FileOutputStream(outFileName)); > strResult.setSystemId(outFileName); > } else { > strResult = new StreamResult(System.out); > } > > TransformerFactory tfactory = TransformerFactory.newInstance(); > Transformer transformer = tfactory.newTransformer(new > StreamSource( > xslFileName)); > > int nParams = params.size(); > > for (int ii = 0; ii < nParams; ii += 2) { > transformer.setParameter((String) params.elementAt(ii), > (String) params.elementAt(ii + 1)); > } > > transformer.transform(new StreamSource(inFileName), strResult); > > } > > > > >Pierre Attar (mailto:pat@tireme.fr) >Consultant en informatique documentaire XML >Consultant in Structured Document engineering > >Projet "Mutualiser l'effort de montée en compétences sur XML" >http://www.mutu-xml.org/index.html > Pierre Attar (mailto:pat@tireme.fr) Consultant en informatique documentaire XML Consultant in Structured Document engineering Projet "Mutualiser l'effort de montée en compétences sur XML" http://www.mutu-xml.org/index.html
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]