RE: ETA on 0.20.2

2001-09-19 Thread Michel Lehon

Hummm Hummm...
no comment... I need more sleep.

Thanks Keiron.

Michel.

 -Original Message-
 From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 19 September, 2001 11:33
 To: [EMAIL PROTECTED]
 Subject: Re: ETA on 0.20.2
 
 
 On Tue, 18 Sep 2001 16:19:50 Michel Lehon wrote:
  Hi,
  
  I just updated my local CVS copy to test a few things, and I cant build
  it.
  I get compile error in SVGObj and SVGElement.
  
  Is that normal ? Any fix?
 
 I think you just need to do a build clean first.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 

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




RE: Image location

2001-09-19 Thread Michel Lehon

Hi,

Some more info on my problem.
I've taken a look at FopImageFactory.java to see how it was handling
relative path for images
It seems like it tries to use the Configuration's baseDir value.
My problem is that the path i'd like to use as the base for relative urls is
dependent on the
request my servlet got (the ServletPath is important),
I tried setting the SystemID of the XML input (through the Locator), but
that does not change anything.
The same technique (setting the systemID works with Xalan to set the
relative paths).

Any ideas ?
Am I clear or is this completly impossible to understand (I have a hard time
explaining) ?

Thanks.

Michel Lehon
Outwares

 -Original Message-
 From: Michel Lehon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 18 September, 2001 16:33
 To: [EMAIL PROTECTED]
 Subject: Image location


 Hi,

 I'm currently trying to figure out where fop is looking for
 images (but I'd
 like to know how external resource are located).
 I'd like to be able to load images with relative paths, however I'm using
 fop from a servlet (through the Driver class).
 I'm firing SAX events myself to Fop's ContentHandler.

 and I'd like the relative path be be taken/derived from the
 SystemID of the
 SAXSource.

 How could I acheive that, or how can I set Fop's basedir at
 runtime for the
 relative paths ?

 Thanks.

 Michel Lehon.
 Outwares.


  -Original Message-
  From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, 18 September, 2001 12:03
  To: [EMAIL PROTECTED]
  Subject: Re: ETA on 0.20.2
 
 
  We should probably have a 0.21 release sometime in the next two weeks.
 
  Things that will need doing are:
  - testing for any unnoticed problems
  - building and putting the release on the server
  - update the website to reflect the new version
  - changes list, todo list, status etc.
 
  We could have a hold on new features or major changes for a few days and
  then when everything is done it will be available.
  So who is going to help out?
 
  On Mon, 17 Sep 2001 13:35:28 [EMAIL PROTECTED] wrote:
   Any ETA on  0.20.2?  I really need markers to implement
 running headers.
   Thanks,
   Lou
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
 
 
 


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





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




RE: ETA on 0.20.2

2001-09-18 Thread Michel Lehon

Hi,

I just updated my local CVS copy to test a few things, and I cant build it.
I get compile error in SVGObj and SVGElement.

Is that normal ? Any fix?

Thanks.

Michel Lehon
Outwares.

 -Original Message-
 From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 18 September, 2001 12:03
 To: [EMAIL PROTECTED]
 Subject: Re: ETA on 0.20.2


 We should probably have a 0.21 release sometime in the next two weeks.

 Things that will need doing are:
 - testing for any unnoticed problems
 - building and putting the release on the server
 - update the website to reflect the new version
 - changes list, todo list, status etc.

 We could have a hold on new features or major changes for a few days and
 then when everything is done it will be available.
 So who is going to help out?

 On Mon, 17 Sep 2001 13:35:28 [EMAIL PROTECTED] wrote:
  Any ETA on  0.20.2?  I really need markers to implement running headers.
  Thanks,
  Lou

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





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




Image location

2001-09-18 Thread Michel Lehon

Hi,

I'm currently trying to figure out where fop is looking for images (but I'd
like to know how external resource are located).
I'd like to be able to load images with relative paths, however I'm using
fop from a servlet (through the Driver class).
I'm firing SAX events myself to Fop's ContentHandler.

and I'd like the relative path be be taken/derived from the SystemID of the
SAXSource.

How could I acheive that, or how can I set Fop's basedir at runtime for the
relative paths ?

Thanks.

Michel Lehon.
Outwares.


 -Original Message-
 From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 18 September, 2001 12:03
 To: [EMAIL PROTECTED]
 Subject: Re: ETA on 0.20.2


 We should probably have a 0.21 release sometime in the next two weeks.

 Things that will need doing are:
 - testing for any unnoticed problems
 - building and putting the release on the server
 - update the website to reflect the new version
 - changes list, todo list, status etc.

 We could have a hold on new features or major changes for a few days and
 then when everything is done it will be available.
 So who is going to help out?

 On Mon, 17 Sep 2001 13:35:28 [EMAIL PROTECTED] wrote:
  Any ETA on  0.20.2?  I really need markers to implement running headers.
  Thanks,
  Lou

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





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




RE: Problem with API change in fop 0.20.1

2001-08-22 Thread Michel Lehon

Frank,

[Big SNIP]
 protected Result obtainResult(XMLServletRequestStatus status,
 OutputStream out)
 throws IOException
 {
 if(!status.isFOStyle())
 {
 return new StreamResult(out);
 }
 else
 {
 Driver driver = new Driver();
 String version = org.apache.fop.apps.Version.getVersion();
 // as of version 0.20.1

 //driver.setRenderer(org.apache.fop.render.pdf.PDFRenderer,version);
 org.apache.fop.render.Renderer rend = new
 org.apache.fop.render.pdf.PDFRenderer();
 log.msg(Renderer = +rend);
 driver.setRenderer(rend);

 driver.addElementMapping(org.apache.fop.fo.StandardElementMapping);

 driver.addElementMapping(org.apache.fop.svg.SVGElementMapping);
 // as of version 0.20.1
   //
 driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping);
   //
 driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping);
 driver.setOutputStream(out);
 status.setDriver(driver);
 return new SAXResult(driver.getContentHandler());
 }
 }

 This compiles, so at least it uses only known API's, but plugin it into
 the surrounding environment, I end up with this:

 java.lang.NullPointerException
 at
 org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167)

[SNIP]


 Which looks like the streamRenderer member in FOTreeBuilder has not been
 initialized.

 Before I start sifting thru the whole code, any quick clue from a guru?

 You might also note that I actually don't think I need SVG, put I
 didn't get
 the
 older fops to works without it.

 Thank you very much,

 Frank

If you are using the latest CVS it should work...
However you might have to call driver.setLogger()
to give FOP a LogKit Logger...

In my program I have something like this...

Driver driver;
ByteArrayOutputStream out = new ByteArrayOutputStream();

driver = new Driver();

// FOP uses Avalon LogKit for Logging, so we need to set it up.
org.apache.log.Hierarchy hierarchy =
org.apache.log.Hierarchy.getDefaultHierarchy();
org.apache.log.format.PatternFormatter formatter = new
org.apache.log.format.PatternFormatter([%{priority}]:
%{message}\n%{throwable});
org.apache.log.LogTarget target = new
org.apache.log.output.io.StreamTarget(System.out, formatter);
hierarchy.setDefaultLogTarget(target);
org.apache.log.Logger log = hierarchy.getLoggerFor(fop);
log.setPriority(org.apache.log.Priority.ERROR);
driver.setLogger(log);

driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);

ContentHandler cnth = driver.getContentHandler();
// send SAX events on cnth.


and it works with the yesterday's CVS...


Keiron, Could you take a look at the things you did for the logger
in driver, it look wierd to me as the _treeBuilder 's logger
is only set if a call to setLogger is done, otherwise I get a
NullPointerException
If you want I can take a look... just say so.



 --
 Dr. Frank Sven Nestel
 Principal Software Engineer

 COI GmbHErlanger Straße 62, D-91074 Herzogenaurach
 Phone +49 (0) 9132 82 4611
 http://www.coi.de, mailto:[EMAIL PROTECTED]
   COI - Solutions for Documents


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





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




Lastest CVS does not build

2001-08-21 Thread Michel Lehon

Hi,

I just checked out the lastest CVS version of FOP (to get the fix for the
Driver.getContentHandler, BTW thanks for taking care of this).
but it does not build...
The reason is quite simple.
in Build.bat (yes I'm on Windows) the second line for the localclasspath
reads
set
LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar;%LIBDIR\logkit-1.0b4.
jar;%LIBDIR%\avalon-framework-4.0.jar
however the  before logkit-1.0b4.jar should be a % for the thing to work.

Thanks.

Michel Lehon

Partner, Outwares sprl.
SAS Data Warehousing and Web Enablement.


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




RE: svg probs with 0.19.0

2001-08-14 Thread Michel Lehon

I thought FOP 0.19.0 + used Batik for SVG.

Am I Wrong ?

Michel.

 -Original Message-
 From: Alex McLintock [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 14 August, 2001 10:22
 To: [EMAIL PROTECTED]
 Subject: Re: svg probs with 0.19.0


  --- Maring, Steve [EMAIL PROTECTED] wrote:
  I'm not sure why this is happening.  Maybe somebody can help me?  My svg
  gets improperly generated through FOP 0.19.0 (I have not tried
 others).  The
  viewBox seems to be ignored and fill-rule:evenodd does not
 work.  Is this a
  Batik thing?  When I run the rasterizer in Batik 1.0 it seems
 to understand
  what I'm asking for.  The Adobe SVG viewer thinks my svg is OK too.
 

 I don't know for certain but I don't think viewBox is implemented yet -
 though I could be thinking of V 0.18

 I think it is fair to say that a lot of the SVG spec is not yet
 implemented.

 Alex


 =
 Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London
 OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
 SF and Computing Book News and Reviews: http://news.diversebooks.com/
 Get Your XML T-Shirt t-shirt/ at http://www.inversity.co.uk/

 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie

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





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




RE: Release Process Improvements, Versioning etc

2001-08-14 Thread Michel Lehon

 From: Weiqi Gao [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 14 August, 2001 05:27
 To: [EMAIL PROTECTED]
 Subject: Re: Release Process Improvements, Versioning etc
 
 
 On 13 Aug 2001 22:08:50 +, Arved Sandstrom wrote:
  
  I invite everyone to submit ideas as to how we can improve the
  release process: versioning, builds and testing. It seems like
  almost everytime a 0.X.0 release comes out, there is almost
  instantaneously a showstopper bug that necessitates a 0.X.1
  release, as happened this time.
 
 If making a release reveals bugs, then there should be more releases.
 Release early, release often is one of the tenets of Open Source.
 
  I don't want to dictate how things would work - we have a lot of
  good developers here who do configuration management, source
  control and testing in real life just as I do - but here are a
  few obvious ideas.
  
  1) Believe it or not I can actually guarantee to do builds on a
  given date, now that I have a system for doing the CHANGES file
  rather rapidly. So once we have decided on a given date for a
  release, I suggest that we mandate a code freeze starting N days
  before the release. At the start of the freeze I build a pre-release
  distro, and it will be labelled as a pre-release (PR suffix maybe?)
  During those N days (2 days, 3 days?) everyone will have an 
  opportunity to test the release, and find those bad bugs that
  somehow never showed up before.
 
 That sounds like a very good idea.  And I have seen other Apache
 projects doing it.  (Except that they are not calling it PR.  This is
 another instance where Apache management should probably dictate all sub
 projects to use a uniform name for the pre-releases.)

How about beta releases ? like they do for Tomcat, Cocoon, ...
The beta cycle would be nice for bug fixes, user feedback, and integration
with other projects.
For examples I think Cocoon 2 will be hit by the same problem as I had
(removed methods, NullPointerException when using the ContentHandler),
and for which I submitted a patch (Ok, it was not a diff)

 
  2) More comprehensive build tests. I am not so much concerned with
  how the PDF looks as just making sure we get no exceptions. Petr
  Andrs' font embedding examples, if used as build tests, would have
  caught a bad bug, for example. This testing is complementary to the
  testing Keiron Liddle has laid the groundwork for, which is oriented
  towards conformance testing.
 
 I have not used the testing framework.  I tried ./build.sh test once
 and it threw me some error message.  It would be benefitial if the
 testing frame work can be made to work in a way similar to the make;
 make check sequence for GNU projects.  That way more people would run
 the test.
 
 Make it a rule that absolutely nothing will be committed without
 clearing all the tests.
 
 If feasible, solicit donations to the test case .fo files directory from
 other applications, authors of XML books, the W3C recommendation
 authors, and FOP users in general.  The idea is to build a formidable
 set of real world examples of .fo files, and .xml/.xslt files so as to
 1) test FOP, and 2) show case FOP's capabilities.  Wouldn't it be nice
 if after building and testing FOP from a source download, the user gets
 a subset of the W3C XSL 1.0 Recommendation (or a section of the DocBook
 Definitive Guide, or Chapter 17 of the XML Bible) in PDF format ready to
 be viewed, searched, and printed.

That would really be great.

 
  3) Versioning and build numbers: I hate putting up FOP-0.20.0, and
  24 hours later putting up FOP-0.20.1, just for a bug fix. Granted,
  it was an important defect, and needed to be addressed right away,
  but I don't think it rates that kind of revision increment. I don't
  have any good suggestions (I know how I do things at work, but that's
  different). Any thoughts?
 
 0.20.1 is fine.  I don't have any issues with it.  If another bug was
 found and fixed tomorrow, I would be glad to use a 0.20.2.  As it is
 right now, I don't think that we are making a full use of the third
 number anyway.

That could be avoided using a beta cycle... however that should not
prevent a 0.20.1 or 0.20.2 to happen.

 
  I am sure there is other stuff also. My goal here is to develop a
  formal process document that describes exactly what I do, so that
  anyone with commit privileges can easily duplicate the complete
  release process.
 
 A pre-release communication with other Open Source projects, like
 Cocoon2, about API changes and other changes that may potentially impact
 them is also critical.

Again a beta cycle would be nice.

and last, how about a zip file for windows users (I know winzip can handle 
.tar.gz), I would be easier and would not put off normal windows users.



Michel Lehon
[EMAIL PROTECTED]
Partner, Outwares sprl. 
SAS Data Warehousing and Web Enablement.

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

RE: Problem with FOP 0.20.0 when using the ContentHandler to feed SAX events...

2001-08-14 Thread Michel Lehon

Hi,

I noticed that I did not update some of the comments in the Javadoc
to reflect the changes I made...
If those changes are accepted, I'll be glad to update the Comments
and take a look at some of the docs about embedding.

Michel.

 -Original Message-
 From: Michel Lehon [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 13 August, 2001 15:24
 To: [EMAIL PROTECTED]
 Subject: Problem with FOP 0.20.0 when using the ContentHandler to feed
 SAX events...


 Hi,

 I just upgraded our program to use FOP 0.20.0
 We embedded FOP and used the old official method to call it.

 I mean using somthing like this :
 Driver driver = new Driver();
 driver.setRenderer(Driver.RENDER_PDF);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 driver.setOutputStream(out);

 ContentHandler cnth = driver.getContentHandler();
 sendSAXEvents(cnth);

 driver.format();
 driver.render();

 byte[] content = out.toByteArray();

 However this not longer works with 0.20.0
 for a few reasons:
 1°) there is no driver.format() method.
 2°) there is no driver.render() method (there are two version with
 parameters).

 Still removing those two method calls still does not work as
 using the ContentHandler returned by driver.getContentHandler
 generates a NullPointException because the
 _treeBuilder.setStreamRenderer(streamRenderer)
 is not called (and the FOTreeBuilder needs it).

 so I changed a few lines in Driver.java to fix this...
 I added a method driver.prepareRender() that setups the _treeBuilder
 I changed both render method to use the new prepareRender
 so my program now looks like this (and works).

 Driver driver= new Driver();
 driver.setRenderer(Driver.RENDER_PDF);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 driver.setOutputStream(out);
 driver.prepareRender();

 ContentHandler cnth = driver.getContentHandler();
 sendSAXEvents(cnth);

 byte[] content = out.toByteArray();

 What do you think ? Was it a good idea ? anyother idea on how to acheive
 this ?

 I though about putting back the render() method (without
 parameters), but I
 tough it was
 weird as it would need to be called before the SAX events are generated.

 Michel Lehon
 [EMAIL PROTECTED]
 SAS Data Warehousing and Web Enablement.



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




RE: Problem with FOP 0.20.0 when using the ContentHandler to feed SAX events...

2001-08-14 Thread Michel Lehon

Peter,

It works fine if you use one of the render methods...
which I can't since I'm firing SAX events myself.
sadly using the ContentHandler returned by
driver.getContentHandler() throws a NullPointerException
(as I explained in my previous mails).

The Docs you a refering to (and the ones in 0.20.0, I did not check 0.20.1
yet)
are outdated (i.e. they still talk about the driver.format() method).

Michel.

PS: Nice to see other belgians out here :).


 -Original Message-
 From: Peter Jacobs [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 14 August, 2001 11:25
 To: [EMAIL PROTECTED]
 Subject: RE: Problem with FOP 0.20.0 when using the ContentHandler to
 feed SAX events...


 Hi,

 as far as I understand, there has been a change in the public API
 because of
 Mark's patch, so the old method doesn't work anymore.

 You can see the new code in examples/embedding. It works fine for me.
 or more info:
 http://xml.apache.org/fop/embedding.html


 BTW: the html-docs included in the FOP_0_20 distribution are for FOP 0.18
 ???

 Peter
 
 Peter Jacobs
 Freelance multimedia programmeur
 De Budetstraat 8
 B-3201 Aarschot
 [EMAIL PROTECTED]
 016/573257


  -Original Message-
  From: Michel Lehon [mailto:[EMAIL PROTECTED]]
  Sent: maandag 13 augustus 2001 15:24
  To: [EMAIL PROTECTED]
  Subject: Problem with FOP 0.20.0 when using the ContentHandler to feed
  SAX events...
 
 
  Hi,
 
  I just upgraded our program to use FOP 0.20.0
  We embedded FOP and used the old official method to call it.
 
  I mean using somthing like this :
  Driver driver = new Driver();
  driver.setRenderer(Driver.RENDER_PDF);
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  driver.setOutputStream(out);
 
  ContentHandler cnth = driver.getContentHandler();
  sendSAXEvents(cnth);
 
  driver.format();
  driver.render();
 
  byte[] content = out.toByteArray();
 
  However this not longer works with 0.20.0
  for a few reasons:
  1°) there is no driver.format() method.
  2°) there is no driver.render() method (there are two version with
  parameters).
 
 


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





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




Problem with FOP 0.20.0 when using the ContentHandler to feed SAX events...

2001-08-13 Thread Michel Lehon

Hi,

I just upgraded our program to use FOP 0.20.0
We embedded FOP and used the old official method to call it.

I mean using somthing like this :
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
ByteArrayOutputStream out = new ByteArrayOutputStream();
driver.setOutputStream(out);

ContentHandler cnth = driver.getContentHandler();
sendSAXEvents(cnth);

driver.format();
driver.render();

byte[] content = out.toByteArray();

However this not longer works with 0.20.0
for a few reasons:
1°) there is no driver.format() method.
2°) there is no driver.render() method (there are two version with
parameters).

Still removing those two method calls still does not work as
using the ContentHandler returned by driver.getContentHandler
generates a NullPointException because the
_treeBuilder.setStreamRenderer(streamRenderer)
is not called (and the FOTreeBuilder needs it).

so I changed a few lines in Driver.java to fix this...
I added a method driver.prepareRender() that setups the _treeBuilder
I changed both render method to use the new prepareRender
so my program now looks like this (and works).

Driver driver= new Driver();
driver.setRenderer(Driver.RENDER_PDF);
ByteArrayOutputStream out = new ByteArrayOutputStream();
driver.setOutputStream(out);
driver.prepareRender();

ContentHandler cnth = driver.getContentHandler();
sendSAXEvents(cnth);

byte[] content = out.toByteArray();

What do you think ? Was it a good idea ? anyother idea on how to acheive
this ?

I though about putting back the render() method (without parameters), but I
tough it was
weird as it would need to be called before the SAX events are generated.

Michel Lehon
[EMAIL PROTECTED]
SAS Data Warehousing and Web Enablement.

 Driver.java

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