Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.

2003-02-27 Thread Laurent Forêt
It's a good idea I am gonna try this.
Thanks.
Laurent.
- Original Message -
From: Jeremias Maerki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 5:38 PM
Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.


 A good idea to find out what's wrong is to disable FOP and serialize the
 generated XSL-FO to a file at the place where you normally pipe the SAX
 events over to FOP. Then, check the generated file if it's what you
 expected.

 On 26.02.2003 17:02:39 Laurent Forêt wrote:
  I 've written too fast. I have now, no more exception. And, It seems to
work
  properly, but the result disappoints me. As a result I have a pdf file
with
  a blank page.
 
  Indeed, I made a test with a simple stylesheet, which write all PCDATA
node
  in a block (tested with a simple xml file using fop.bat) :

 snip/

  Everything seems to be ok, all events seem to be generated by
  SimpleDatasheetReader. The parse and the rendering seem ok, but the
result
  is a blank page. I am going to try to put more debugs but if someone
have an
  idea.


 Jeremias Maerki


 -
 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 using ExampleObj2PDF using Oracle 9iasOC4J.

2003-02-27 Thread Laurent Forêt
Finally, it was a stupid problem of encoding using a writer in the jsp, I
use now an OutputStream. And it works.

thanks a lot, regards, Laurent Forêt.

- Original Message -
From: Jeremias Maerki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 5:38 PM
Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.


 A good idea to find out what's wrong is to disable FOP and serialize the
 generated XSL-FO to a file at the place where you normally pipe the SAX
 events over to FOP. Then, check the generated file if it's what you
 expected.

 On 26.02.2003 17:02:39 Laurent Forêt wrote:
  I 've written too fast. I have now, no more exception. And, It seems to
work
  properly, but the result disappoints me. As a result I have a pdf file
with
  a blank page.
 
  Indeed, I made a test with a simple stylesheet, which write all PCDATA
node
  in a block (tested with a simple xml file using fop.bat) :

 snip/

  Everything seems to be ok, all events seem to be generated by
  SimpleDatasheetReader. The parse and the rendering seem ok, but the
result
  is a blank page. I am going to try to put more debugs but if someone
have an
  idea.


 Jeremias Maerki


 -
 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]



Problem using ExampleObj2PDF using Oracle 9iasOC4J.

2003-02-26 Thread Laurent Forêt
Hello,

I have tried a program like the ExampleObj2PDF using the
AbstractObjectReader and the EasyContent...Proxy. It was working fine.

Now, Itry to deploy an EJB using the same code in a 9IAS OC4J server.
The problem is now that the jaxp2 lib used in OC4J is not Xerces2 but an
Oracle implementation and I have the following exception :

Rendering ...
java.lang.ClassCastException:
com.clipack.foprenderer.datasheet.SimpleDatasheetReader
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:207)
at
com.clipack.foprenderer.FOPRendererManager.render(FOPRendererManager.java:62
)
at
com.clipack.foprenderer.ejb.impl.FOPRendererBean.render(FOPRendererBean.java
:59)
at
FOPRenderer_StatelessSessionBeanWrapper0.render(FOPRenderer_StatelessSession
BeanWrapper0.java:90)
at
com.clipack.portal.presentation.renderer.SimpleDatasheetRenderer.render(Simp
leDatasheetRenderer.java:85)
at _jsp._fopRenderer._jspService(_fopRenderer.java:59)
at
com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispa
tcher.java:721)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletReq
uestDispatcher.java:306)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandle
r.java:767)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:797)
at java.lang.Thread.run(Thread.java:484)


SimpleDatasheetReader is the equivalent in my program of
ProjectTeamXmlReader which extends AbstractObjectReader which implements
org.xml/sax.XMLReader. As the both implementation (xerces and
oracleXMLParserV2) respect the jaxp and sax2 interface I don't understand
why, there is this exception.

Is there somebody who has an idea to make the code appliable to the oracle
parser, or is there somebody who knows how to tell fop using the good parser
(xerces2) without passing through the classpath (Xerces2 will be always
after OracleXmlparserV2 in the classpath) ?

regards, Laurent.

PS : I can post the code if somebody needs .



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



Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.

2003-02-26 Thread Laurent Forêt
TransformerFactory factory = new
org.apache.xalan.processor.TransformerFactoryImpl();

Works fine, thanks a lot.

Laurent.

PS: I am very glad to please you ! It was exactly corresponding to my needs.

- Original Message -
From: Jeremias Maerki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 10:49 AM
Subject: Re: Problem using ExampleObj2PDF using Oracle 9iasOC4J.


 Good to see that my code was worth the time and it gets used. :-)

 Let's see: What you do here has relatively little to do with the XML
 parser (Xerces or whatever). We're doing an XSL transformation here. FOP
 uses Apache Xalan per default. Oracle seems to have its own
 implementation. I don't have any idea why there's a ClassCastException
 without having the ability to debug in your environment. If you have the
 source code from JXTransformer, see if you can find out what it expects
 at line 207.

 As a workaround, try the following:
 Make sure you've got Xalan in your classpath. Then switch this line:

 TransformerFactory factory = TransformerFactory.newInstance();

 with this:

 TransformerFactory factory = new
org.apache.xalan.processor.TransformerFactoryImpl();

 This should make sure you get a Xalan transformer and not the JAXP
 default. (Disclaimer: not tested, just a shot from the hip)

 I hope this helps. Maybe someone else familiar with the Oracle
 enviroment has an idea.

 On 26.02.2003 10:07:42 Laurent Forêt wrote:
  Hello,
 
  I have tried a program like the ExampleObj2PDF using the
  AbstractObjectReader and the EasyContent...Proxy. It was working fine.
 
  Now, Itry to deploy an EJB using the same code in a 9IAS OC4J
server.
  The problem is now that the jaxp2 lib used in OC4J is not Xerces2 but an
  Oracle implementation and I have the following exception :
 
  Rendering ...
  java.lang.ClassCastException:
  com.clipack.foprenderer.datasheet.SimpleDatasheetReader
  at
oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:207)
  at
 
com.clipack.foprenderer.FOPRendererManager.render(FOPRendererManager.java:62
  )
  at
 
com.clipack.foprenderer.ejb.impl.FOPRendererBean.render(FOPRendererBean.java
  :59)
  at
 
FOPRenderer_StatelessSessionBeanWrapper0.render(FOPRenderer_StatelessSession
  BeanWrapper0.java:90)
  at
 
com.clipack.portal.presentation.renderer.SimpleDatasheetRenderer.render(Simp
  leDatasheetRenderer.java:85)
  at _jsp._fopRenderer._jspService(_fopRenderer.java:59)
  at
  com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
  at
  oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispa
  tcher.java:721)
  at
 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletReq
  uestDispatcher.java:306)
  at
 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandle
  r.java:767)
  at
 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
  at
 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
  at
 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
  va:797)
  at java.lang.Thread.run(Thread.java:484)
 
 
  SimpleDatasheetReader is the equivalent in my program of
  ProjectTeamXmlReader which extends AbstractObjectReader which implements
  org.xml/sax.XMLReader. As the both implementation (xerces and
  oracleXMLParserV2) respect the jaxp and sax2 interface I don't
understand
  why, there is this exception.
 
  Is there somebody who has an idea to make the code appliable to the
oracle
  parser, or is there somebody who knows how to tell fop using the good
parser
  (xerces2) without passing through the classpath (Xerces2 will be always
  after OracleXmlparserV2 in the classpath) ?
 
  regards, Laurent.
 
  PS : I can post the code if somebody needs .


 Jeremias Maerki


 -
 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: getParser deprecated but still in sevelt example?

2003-02-10 Thread Laurent Forêt
There are new example without deprecated apis accessible from cvs at this
url :
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/
Attic/

regards, Laurent.

- Original Message -
From: Matthew Lancashire [EMAIL PROTECTED]
To: Fop-User-Help (E-mail) [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 11:06 AM
Subject: getParser deprecated but still in sevelt example?


 Why do I get the errors
 getParser is deprecated and getInputSource is not a class within
 XSLTInputHandler?

 public void convertXML2PDF(String xml, String xslt)
 throws IOException, FOPException, TransformerException
 {
 driver.setRenderer(Driver.RENDER_PDF);
 XSLTInputHandler xmlDoc = new XSLTInputHandler(xml,xslt);
 ByteArrayOutputStream pdf = new ByteArrayOutputStream();
 driver.setOutputStream(pdf);
 try
 {
 driver.render (xmlDoc.getParser(), xmlDoc.getInputSource()) ;



 Matthew Lancashire
 IT Project Manager
 Intitial Electronic Security Ltd

 Tel: +44 1282 473554
 Fax: +44 1254 267552


 -
 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: Web page embedding

2003-01-30 Thread Laurent Forêt
I am new to this mailing list, and sorry if I ask very known question ?
But, I have tried the Servlet exmple code and it seems that it uses
deprecated methods :
com/clipack/portal/util/FOPRenderer.java [40:1] warning: getParser() in
org.apache.fop.apps.XSLTInputHandler has been deprecated

driver_.render(inputHandler.getParser(),inputHandler.getInputSource());
 ^
com/clipack/portal/util/FOPRenderer.java [40:1] warning: getInputSource() in
org.apache.fop.apps.XSLTInputHandler has been deprecated

driver_.render(inputHandler.getParser(),inputHandler.getInputSource());
  ^
2 warnings

Is there any other example using xsl without these deprecated methods ?

I have searched an apidocs on the site and in the folder of my distribution,
I didn't find it. Are we obliged to download the sources and make our
Apidocs or I have not searched well ?

regards all,

Laurent Forêt.


- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 29, 2003 10:00 PM
Subject: Re: Web page embedding


 Matthew Lancashire wrote:
  Is there an example of an applet.

 You should be able to use the servlet example as starting point.
 There is also some general documentation in
   http://xml.apache.org/fop/embedding.html

 J.Pietschmann


 -
 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: Web page embedding

2003-01-30 Thread Laurent Forêt
OK thanks a lot.
Now I am lookinkg to the ExampleObj2XML at
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/
Attic/ExampleObj2XML.java?rev=1.1.2.1content-type=text/vnd.viewcvs-markup

And We don't have the code for the ProjectTeam class, specially
getSourceForProjectTeam() method.

Source src = team.getSourceForProjectTeam();

My question is now, how can we transform a custom Object (ProjectTeam in the
example) into a Source object ?

regards,
Laurent Forêt.

- Original Message -
From: Jeremias Maerki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 10:17 AM
Subject: Re: Web page embedding


 Yes, FOP 0.20.5 will contain a set of examples that uses JAXP. They are
 currently only accessible via CVS.

 Here's an URL to the example you need:

http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/
Attic/ExampleXML2PDF.java?rev=1.1.2.1content-type=text/vnd.viewcvs-markup

 Here's the documentation (see bottom of the page):
 http://xml.apache.org/fop/embedding.html

 On 30.01.2003 09:32:11 Laurent Forêt wrote:
  Is there any other example using xsl without these deprecated methods ?


 Jeremias Maerki


 -
 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: Web page embedding

2003-01-30 Thread Laurent Forêt
Not exactly, my question was more simple :
Can I use XMLReaderAdapter (from the SAX package) instead of
AbstractObjectReader given in your example?
I think yes, but is there something I missed?

regards,
Laurent Forêt.

- Original Message -
From: Jeremias Maerki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 11:48 AM
Subject: Re: Web page embedding


 I'm not sure that I understand you correctly. The AbstractObjectReader
 has namespaces disabled per default (See constructor). If you don't use
 namespaces you don't have to do anything but generating XML content (not
 using any namespace prefixes just like in the example). If you need to
 use namespaces it'll get a bit more complicated. Does that answer your
 question?



 Link to SAX homepage:
 http://www.saxproject.org/?selected=namespaces

 On 30.01.2003 11:41:40 Laurent Forêt wrote:
  I have now well read your embedding example, ExampleObj2PDF.
  And I am going to use the same process, I have a litlle question about
using
  which abstract class extending XMLReader :
  Your own (AbstractObjectReader) or the SAX1 adapter given in sax package
  (XMLReaderAdapter), knowing that I don't use namespaces ?


 Jeremias Maerki


 -
 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: Web page embedding

2003-01-30 Thread Laurent Forêt
I have missed something. I didn't have understood the mecanism between
AbstractObjectReader and EasyGenerationContentHandlerProxy.
Now, if I have well understood the object which extends AbstractObjectReader
will treat the event generated by himself throuh the handler of type
 EasyGenerationContentHandlerProxy. That's right ?

Laurent Forêt.

- Original Message -
From: Laurent Forêt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 2:37 PM
Subject: Re: Web page embedding


 Not exactly, my question was more simple :
 Can I use XMLReaderAdapter (from the SAX package) instead of
 AbstractObjectReader given in your example?
 I think yes, but is there something I missed?

 regards,
 Laurent Forêt.

 - Original Message -
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 30, 2003 11:48 AM
 Subject: Re: Web page embedding


  I'm not sure that I understand you correctly. The AbstractObjectReader
  has namespaces disabled per default (See constructor). If you don't use
  namespaces you don't have to do anything but generating XML content (not
  using any namespace prefixes just like in the example). If you need to
  use namespaces it'll get a bit more complicated. Does that answer your
  question?
 


  Link to SAX homepage:
  http://www.saxproject.org/?selected=namespaces
 
  On 30.01.2003 11:41:40 Laurent Forêt wrote:
   I have now well read your embedding example, ExampleObj2PDF.
   And I am going to use the same process, I have a litlle question about
 using
   which abstract class extending XMLReader :
   Your own (AbstractObjectReader) or the SAX1 adapter given in sax
package
   (XMLReaderAdapter), knowing that I don't use namespaces ?
 
 
  Jeremias Maerki
 
 
  -
  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]




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