RE: Problem with XSLTInputHandler and Driver class

2007-05-10 Thread Pascal Sancho
Hi Cesar,

Just for check, can you confirm what FOP version you want to use?
Your userconfig.xml file is for FOP v0.20.5, not for current versions of FOP.

Pascal 


 -Message d'origine-
 De : Cesar Santofimia [mailto:[EMAIL PROTECTED] 
 Envoyé : jeudi 3 mai 2007 17:18
 À : fop-users@xmlgraphics.apache.org
 Objet : Re: Problem with XSLTInputHandler and Driver class 
 
 Hi Adrian,
 
 I think the contents of these files are right because when i 
 treated both xml and xsl source like File objects i hadn´t 
 any problem.
 
 The xml source is a String received as a request parameter, 
 and its code is:
 
 ?xml version=1.0
 encoding=UTF-8?informedatos_vida_laboralcuerpodatos_
 trabajadorfecha_larga1
 de
 agosto/fecha_larganombre/nombrefecha_nac/fecha_nacn
 umero_ss/numero_ssdni/dni/datos_trabajador/cuerpo/
 datos_vida_laboral/informe
 
 Is that right? Can i use this string as a InputSource 
 parameter in the XSLTInputHandler constructor method? This is 
 my first doubt...
 
 The xsl source is the atached file informe.xsl, and exists in 
 PATH_TO_XSL.
 At this moment only loads the fecha_larga value received in 
 the xml source.
 
 My userconfig.xml file only contains fonts information.
 
 And finally, the stack trace:
 
 org.apache.fop.apps.FOPException:
 javax.xml.transform.TransformerConfigurationException:
 javax.xml.transform.TransformerException: 
 java.net.MalformedURLException
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 java.lang.Throwable.init(Throwable.java:59)
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 java.lang.Throwable.init(Throwable.java:73)
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 org.apache.fop.apps.FOPException.init(FOPException.java:88)
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 org.apache.fop.apps.TraxInputHandler.initTransformer(TraxInput
 Handler.java:108)
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 org.apache.fop.apps.TraxInputHandler.init(TraxInputHandler.java:100)
 [3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr R  at
 org.apache.fop.apps.XSLTInputHandler.init(XSLTInputHandler.java:81)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 fop.negocio.FopJaGestor.ejecutar(FopJaGestor.java)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 fop.servlet.FopServlet.doGet(FopServlet.java)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.StrictServletInstance.doServic
 e(StrictServletInstance.java:110)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._servic
 e(StrictLifecycleServlet.java:174)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.IdleServletState.service(Stric
 tLifecycleServlet.java:313)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
 (StrictLifecycleServlet.java:116)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.ServletInstance.service(Servle
 tInstance.java:283)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dis
 patch(ValidServletReferenceState.java:42)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispa
 tch(ServletInstanceReference.java:40)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleW
 ebAppDispatch(WebAppRequestDispatcher.java:983)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatc
 h(WebAppRequestDispatcher.java:564)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
 (WebAppRequestDispatcher.java:200)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvo
 ker.java:119)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
 (WebAppInvoker.java:276)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.hand
 leInvocation(CachedInvocation.java:71)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationCo
 ntext.invoke(CacheableInvocationContext.java:116)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr R  at
 com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchBy
 URI(ServletRequestProcessor.java:186)
 [3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr

Re: Problem with XSLTInputHandler and Driver class

2007-05-03 Thread Adrian Cumiskey

Hi Cesar,

In order for me to try and help you with solving this problem, could you 
please provide a full stack trace of the exception, your fop.xconf 
configuration file and also the file which is referenced by PATH_TO_XSL. 
 You might also double check the contents of these two files yourself.


Adrian Cumiskey.

[EMAIL PROTECTED] wrote:

Hi,

I need help to solve a problem with XSLTInputHadler and Driver class,
working with fop 0.20.5 version.

I need to generate a pdf from a xslt source existing in my project and a
xml source received as a parameter.

I´m using this constructor method from XSLTInputHandler:

XSLTInputHandler(org.xml.sax.InputSource xmlSource,
org.xml.sax.InputSource xsltSource)


My code is:

String xmlParam = request.getParameter(XML_REQUEST_PARAM);

StringReader str = new StringReader(xmlParam);
InputSource in = new InputSource(str);

FileReader fr_xsl = new FileReader(PATH_TO_XSL);
InputSource in_xsl = new InputSource(fr_xsl);

*** XSLTInputHandler input = new XSLTInputHandler(in, in_xsl);

ByteArrayOutputStream out = new ByteArrayOutputStream();

Driver driver = new Driver();
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());


It throws a FopException in *** and the message is:
 javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: java.net.MalformedURLException


What´s my problem? What i did wrong? is this a bad use from this constructor?

Thanks,

César.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with XSLTInputHandler and Driver class

2007-05-03 Thread Cesar Santofimia
Hi Adrian,

I think the contents of these files are right because when i treated both
xml and xsl source like File objects i hadn´t any problem.

The xml source is a String received as a request parameter, and its code is:

?xml version=1.0
encoding=UTF-8?informedatos_vida_laboralcuerpodatos_trabajadorfecha_larga1
de
agosto/fecha_larganombre/nombrefecha_nac/fecha_nacnumero_ss/numero_ssdni/dni/datos_trabajador/cuerpo/datos_vida_laboral/informe

Is that right? Can i use this string as a InputSource parameter in the
XSLTInputHandler constructor method? This is my first doubt...

The xsl source is the atached file informe.xsl, and exists in PATH_TO_XSL.
At this moment only loads the fecha_larga value received in the xml
source.

My userconfig.xml file only contains fonts information.

And finally, the stack trace:

org.apache.fop.apps.FOPException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: java.net.MalformedURLException
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
java.lang.Throwable.init(Throwable.java:59)
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
java.lang.Throwable.init(Throwable.java:73)
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
org.apache.fop.apps.FOPException.init(FOPException.java:88)
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
org.apache.fop.apps.TraxInputHandler.initTransformer(TraxInputHandler.java:108)
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
org.apache.fop.apps.TraxInputHandler.init(TraxInputHandler.java:100)
[3/05/07 17:03:32:406 CEST] 7bec7bec SystemErr Rat
org.apache.fop.apps.XSLTInputHandler.init(XSLTInputHandler.java:81)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
fop.negocio.FopJaGestor.ejecutar(FopJaGestor.java)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
fop.servlet.FopServlet.doGet(FopServlet.java)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
[3/05/07 17:03:32:421 CEST] 7bec7bec SystemErr Rat