You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Arnaud Malguy <Ar...@xps-pro.com> on 2001/02/08 08:13:58 UTC

FOP in C++ ?

Hi,

I actually used Xalan and Xerces C++ in a big project written in C++.
I'd want to use also FOP in this project to compose output documents.
Is there any future project which consist of porting Fop in C++ ?

Thanks.
Arnaud.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


FOP distribution

Posted by Sebastian Rahtz <se...@computing-services.oxford.ac.uk>.
Is it beyond the wit of mankind (or Apache policy) to clearly
separate out the current FOP from the old stuff? looking at
http://xml.apache.org/dist/fop/, I see everything back to version 12,
with no formal indication of which is the latest and greatest. Its
fine if you are a human, but if you are an automated update process,
its annoying.


sebastian


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Eric SCHAEFFER <es...@techmetrix.net>.
Personnaly, I'll work on the Java version.
But I agree that a C/C++ version could make some people happy.
Integration with existing applications would be easier with a C/C++ 
version, but the example of WordProcessor is half wrong.

To give you my point of view, switching to C/C++, leaving the Java 
version is impossible. Simply because FOP is done in Java. You can only 
imagine another version...

Jon Smirl wrote:

> If a complete rewrite were to be done I would really consider using SVG
> as
> the conceptual intermediate language instead of direct to PDF. I would
> then
> have an independent stage that converts the SVG to PDF. This would allow
> two
> teams to work independently and it would make SVG drawing integration a
> snap. It would also make it easy to implement different output stages
> like
> screen, RTF, etc. It would also allow the FOP C implementation to be

I don't see why SVG would be better. SVG isn't desinged for page rendering.
The XSL:FO spec gives the right model : areas.

> 
> integrated into Mozilla. I brought this up a long time ago on the FOP
> list
> be we were already too far down the current path.
> 
> Jon Smirl
> jonsmirl@mediaone.net


Eric.

-- 
Cordialement,
Eric SCHAEFFER
_________________________________________________
Consultant TechMetrix Research
http://www.techmetrix.net & http://www.sqli.com

FOP, the first XSL:FO Processor
http://xml.apache.org/fop


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Christian Geisert <Ch...@isu-gmbh.de>.
Arved Sandstrom wrote:

[...]

> Pick your preference:
> 
> (1) Terminate FOP Java development after FOP 1.0; proceed with C/C++;

-1

> or
> 
> (2) Continue FOP Java development after FOP 1.0, with a parallel effort
> starting up in C/C++.

+1 

I personally like java, and platform independence (at least with FOP)
really works (I won't even think about compiling C++ on AS/400 ...)


Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Jason Russ <JR...@Korson-McGregor.com>.
> I would personally not phrase the vote that way, as being "for or against a
> C/C++ version". I want to know the context. If, however, the vote was:
>
> Pick your preference:
>
> (1) Terminate FOP Java development after FOP 1.0; proceed with C/C++;
>
> or
>
> (2) Continue FOP Java development after FOP 1.0, with a parallel effort
> starting up in C/C++.
>
> I'd vote for (2). That is, I'd vote for continued development of FOP-J in
> any case.

What about a third option:
(3) Continue FOP Java development, _without_ creating a FOP C/C++ version.


>
> I don't believe that
> the divided resource argument flies: I question as to how many current FOP
> developers and committers would be available for C/C++ work (I think very
> few), and so I think a parallel C/C++ codebase will not impact FOP-J: it
> will find its own (new) people. But I'd be interested to hear
> counter-arguments.

Other than coding, someone may be needed to coordinate the two efforts,
and to create documentation for the two efforts.  The typical communication
overhead of developing software would double.

Other than the implementation phase of FOP, I assume that work is being
done in requirements, design, and testing.  Often times, the choose of
technology will effect the creation of requirements.  Obviously, some
software architecture and design could be shared between the two projects,
however this will require some work.  There is also the risk of lowering
the quality of the design to accommodate the two systems.  Multiple bug
databases may be desired for testing the two components.  In general all
these other aspects of software development will require people,
documentation, and communication.


>
>
> I also think a vote at this stage (from all FOP developers and committers)
> is only going to indicate general preferences. I'd want to see a reasonably
> detailed requirements document based on clearly-identified user needs before
> supporting a FOP-C.

I agree.


--
Jason L. Russ
Software Consultant
Korson-McGregor, A Software Technology Company
(Formerly known as Software Architects)



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by "Peter B. West" <pb...@powerup.com.au>.
Arved Sandstrom wrote:
> 
> I would personally not phrase the vote that way, as being "for or against a
> C/C++ version". I want to know the context. If, however, the vote was:
> 
> Pick your preference:
> 
> (1) Terminate FOP Java development after FOP 1.0; proceed with C/C++;
> 
> or
> 
> (2) Continue FOP Java development after FOP 1.0, with a parallel effort
> starting up in C/C++.
> 
> I'd vote for (2). That is, I'd vote for continued development of FOP-J in
> any case.
> 
> I read all of Jon's arguments, and I agree with a lot of them. I'm
> personally not highly enthused with Java, but I can live with it. I'm no big
> fan of C++, either, when it comes right down to it. :-) I don't believe that
> the divided resource argument flies: I question as to how many current FOP
> developers and committers would be available for C/C++ work (I think very
> few), and so I think a parallel C/C++ codebase will not impact FOP-J: it
> will find its own (new) people. But I'd be interested to hear
> counter-arguments.

This seems to assume that those current Java developers who voted for a
C++ (I presume - I can never quite work out what C/C++ refers to) would
then continue with the Java development line.  Why, when they see the
need for a C++ implementation, would they not be inclined to switch to
that strand?  Which way would you go?

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 12:38 PM 2/11/01 +0100, Fotis Jannidis wrote:
>> Jon Smirl
>> It really depends on where you see xsl:fo going. Is it a postscript
>> replacement or the new rendering model for web pages?
>> 
>I am not sure that this is the point it depends on, but as you 
>mentioned it: xsl:fo is not a good web format and can't compete 
>with css in respect of learning curve and ease of use. So I see the 
>use of xsl:fo rather on the print side. 
>
>Relating to the c++ version: If we would vote on this question, I 
>would be on the side of Kelly. What do the other committers and 
>developers think?
>
>Fotis

I would personally not phrase the vote that way, as being "for or against a 
C/C++ version". I want to know the context. If, however, the vote was:

Pick your preference:

(1) Terminate FOP Java development after FOP 1.0; proceed with C/C++;

or

(2) Continue FOP Java development after FOP 1.0, with a parallel effort 
starting up in C/C++.

I'd vote for (2). That is, I'd vote for continued development of FOP-J in 
any case.

I read all of Jon's arguments, and I agree with a lot of them. I'm 
personally not highly enthused with Java, but I can live with it. I'm no big 
fan of C++, either, when it comes right down to it. :-) I don't believe that 
the divided resource argument flies: I question as to how many current FOP 
developers and committers would be available for C/C++ work (I think very 
few), and so I think a parallel C/C++ codebase will not impact FOP-J: it 
will find its own (new) people. But I'd be interested to hear 
counter-arguments.

I also think a vote at this stage (from all FOP developers and committers) 
is only going to indicate general preferences. I'd want to see a reasonably 
detailed requirements document based on clearly-identified user needs before 
supporting a FOP-C.

Regards,
Arved

Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Jon Smirl <jo...@mediaone.net>.
As of CSS3 xsl:fo and CSS3 are supposed to be the same thing. In orther
words the underlying formatting models are identical. xsl:fo and CSS3 are
then only two different syntaxes describing the same underlying language.

The common library then is all of the code that converts the layout model to
pixels. Isn't this pretty close to RenderX's current C implementation?

I would rather leave FOP in Java than spilt the few developers working on
it. But I do believe that an easy to embed C based engine will be needed if
xsl:fo is ever going to move into the mainstream.

Jon Smirl
jonsmirl@mediaone.net



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Fotis Jannidis <fo...@lrz.uni-muenchen.de>.
> Jon Smirl
> It really depends on where you see xsl:fo going. Is it a postscript
> replacement or the new rendering model for web pages?
> 
I am not sure that this is the point it depends on, but as you 
mentioned it: xsl:fo is not a good web format and can't compete 
with css in respect of learning curve and ease of use. So I see the 
use of xsl:fo rather on the print side. 

Relating to the c++ version: If we would vote on this question, I 
would be on the side of Kelly. What do the other committers and 
developers think?

Fotis

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Jon Smirl <jo...@mediaone.net>.
There is more to making xsl:fo into a standard than batch transformation of
documents.  xsl:fo needs to go into editing and rendering systems. Think
about how WinWord works in page preview mode. It lets you edit the page
representation thus causing changes in the source document.  A properly
designed FOP 2.0 library could allow building a mode like WinWord's. But a
Java version of the FOP 2.0 library would never get used integrated into an
existing word processor since all existing word processors are written in
C/++.  Execing another application just doesn't work when there are hundreds
of APIs and events to integrate.

It's not a portability argument, it's a reuse argument. The basic problem is
that most existing apps are written in C and it is very difficult to
integrate a component written in Java into an existing C program. Is
xsl:fo/FOP an application or a component? The core transform of xsl:fo input
to an output stage of something like SVG is an excellent candidate for
componentization. xsl:fo is about transforming formatting objects to pixels,
not just to PDF.

You could make FOP 1.0 into a plugin for Mozilla right now. Support for Java
based plugins is already there. But there's a big difference between making
an xsl:fo plug-in and integrating xsl:fo into Mozilla's rendering engine.
Consider the issue of selection and copy; plugins can't participate. What
about progressive rendering, which SVG engine gets used FOP's or Mozilla,
etc...

It really depends on where you see xsl:fo going. Is it a postscript
replacement or the new rendering model for web pages?

Jon Smirl
jonsmirl@mediaone.net



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Kelly Campbell <ca...@merlot.channelpoint.com>.
I strongly disagree. I think changing over to C/C++ is going backwards. I
don't buy the portability argument. Yes, maybe you can get a C compiler on
more platforms, but making the code work on all those platforms is the
real pain. Java has progressed quite well in the last few years, and is
only going to get better in my opinion. 

I don't think we would be able to make a better product quicker with
C. For one we'd lose all the Java class libraries, and while I know
there's similar libraries for C, I think it would be hard to switch
everything over to use those. I also think we would lose some of the
opensourceness of the project. I cringe at having to install MSVC++ just
to build and test on Windows like I did with Apache httpd when my job
required doing that. The argument of which language is better is a rather
religious argument, but I'm of the opinion that the object oriented
features of java far exceed the hacked OOness in C++.

Right now, I rather enjoy working on FOP, but I think if I had to deal
with pointer code and memory management, it would cease to be fun
quickly. I've done enough C and C++ already, and it would take alot for me
to go back.

If Jon's idea to do a C++ version is just so that people who write in C
can call into FOP, then I'm sure there's another solution that would
allow them to call into it currently. It can be as simple as exec("java
-jar fop.jar") or something like the java plugin. Mozilla can run java
processes already via that. 

If it's because you think java is too slow, then that also is a hot
argument with data both ways. I know we have alot of work left to do on
fop performance-wize. We're trying to get the functionality done first. We
need to profile it and see where we can improve. I can use an example of
one project I worked on where web page requests which were processed via
xalan and xslt were taking up to 5 seconds each. Profiling the code showed
where I could make a 25 lines of code change that brought the response
time under a second. We'd have to do the same type of profiling and
performance tuning with a C version, plus additional memory leak
detection. 

Debugging user problems would also be exponentially harder. When we get a
null pointer right now, the users can send us a stack trace with the line
number where it occured. I cringe thinking about asking the users for a
core dump, or to install gdb.

So I would give this proposal a very strong -1 in a vote.

-Kelly




On Sun, Feb 11, 2001 at 12:26:14AM -0400, Arved Sandstrom wrote:
> 
> For future directions (FOP 2.0) I'm pretty much with you, but I'd like to get a
> developer vote going on this, because I cut my teeth on C (well, FORTRAN
> actually, but I go way back with C) and it's a bad idea for me to set the tone
> on this...maybe for you, too, since it sounds like you're also more of a C/C++
> type.
> 
> Your points about C are well-taken. From a single codebase we can provide Java
> through JNI, Perl through XS or SWIG, all of Perl, Python, Tcl, Guile, Ruby etc
> through SWIG (OK, it depends on the relative maturity of SWIG support for some
> of those), and really, a whole bunch of others (Eiffel anyone?) because most
> languages can extend using C. C is more portable than Java also, and there is
> no difficulty in getting good free compilers these days.
> 
> Definitely needs some serious thought. I don't think there is much question
> that after FOP 1.0 we want to assess the codebase and future directions, and
> it's probably a good time to start thinking about things now.
> 
> Regards,
> Arved
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

-- 
Kelly A. Campbell              Software Engineer
<ca...@merlotxml.org>           ChannelPoint, Inc.
<ca...@channelpoint.com>        Colorado Springs, Co.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
On Sat, 10 Feb 2001, Jon Smirl wrote:
> I didn't mean to abandon FOP 1.0 in Java. The idea was to do FOP 2.0 in C
> and provide a JNI wrapper. I'm not in favor of the split developer resources
> that is occurring with Xalan/Xerces and two parallel implementations. It's
> hard enough to get the resources for one version. The only reason
> Xalan/Xerces gets aways with it is because IBM is funding fifteen+ people to
> work on it.
> 
> For a library like FOP C is the better implementation language. This isn't
> about speed or ease of coding, it's about getting these standards accepted
> by the widest possible audience. Java can access C via JNI but the reverse
> isn't true. Implementing in Java shuts out the entire non-Java world.

For future directions (FOP 2.0) I'm pretty much with you, but I'd like to get a
developer vote going on this, because I cut my teeth on C (well, FORTRAN
actually, but I go way back with C) and it's a bad idea for me to set the tone
on this...maybe for you, too, since it sounds like you're also more of a C/C++
type.

Your points about C are well-taken. From a single codebase we can provide Java
through JNI, Perl through XS or SWIG, all of Perl, Python, Tcl, Guile, Ruby etc
through SWIG (OK, it depends on the relative maturity of SWIG support for some
of those), and really, a whole bunch of others (Eiffel anyone?) because most
languages can extend using C. C is more portable than Java also, and there is
no difficulty in getting good free compilers these days.

Definitely needs some serious thought. I don't think there is much question
that after FOP 1.0 we want to assess the codebase and future directions, and
it's probably a good time to start thinking about things now.

Regards,
Arved

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Hani Elabed <ha...@elabed.net>.
+1  here.... Let's finish Java Implementation
then people can implement it in Perl if they wanted to...

Eric Deandrea wrote:

> I think that before switching from Java to another language that the rest of
> the formatting object spec should be implemented...Right now we do not even
> have the entire Formatting Objects spec implemented in Java...
>
> -Eric
>
> =============================================
> Eric Deandrea
> Software Engineer              (617) 557-4573
> Harrison ? Troxell, Inc.       ericd@hnt.com
> 2 Faneuil Hall Marketplace
> Boston, MA 02109
>
> ? -----Original Message-----
> ? From: Jon Smirl [mailto:jonsmirl@mediaone.net]
> ? Sent: Saturday, February 10, 2001 8:04 PM
> ? To: fop-dev@xml.apache.org
> ? Subject: Re: FOP in C++ ?
> ?
> ?
> ? I didn't mean to abandon FOP 1.0 in Java. The idea was to do FOP 2.0 in C
> ? and provide a JNI wrapper. I'm not in favor of the split
> ? developer resources
> ? that is occurring with Xalan/Xerces and two parallel implementations. It's
> ? hard enough to get the resources for one version. The only reason
> ? Xalan/Xerces gets aways with it is because IBM is funding
> ? fifteen+ people to
> ? work on it.
> ?
> ? For a library like FOP C is the better implementation language. This isn't
> ? about speed or ease of coding, it's about getting these standards accepted
> ? by the widest possible audience. Java can access C via JNI but the reverse
> ? isn't true. Implementing in Java shuts out the entire non-Java world.
> ?
> ? SVG is a prime example of something that sorely needs a C based
> ? implementation. The only C based version I know of is Adobe's and it's not
> ? open source. If an open source C version existed I'd start
> ? plugging it into
> ? Mozilla tomorrow. I'd also be interested in looking at supporting
> ? xsl:fo in
> ? mozilla but you can't do this with a Java implementation.
> ?
> ? There are hundreds of existing apps that could be easily modified to
> ? incorporate C versions of FOP and Batik. Making these same apps call a
> ? subsystem in Java is complex to nearly impossible.
> ?
> ? Jon Smirl
> ? jonsmirl@mediaone.net
> ?
> ?
> ?
> ? ---------------------------------------------------------------------
> ? To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> ? For additional commands, email: fop-dev-help@xml.apache.org
> ?
> ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: FOP in C++ ?

Posted by Eric Deandrea <er...@hnt.com>.
I think that before switching from Java to another language that the rest of
the formatting object spec should be implemented...Right now we do not even
have the entire Formatting Objects spec implemented in Java...

-Eric

=============================================
Eric Deandrea
Software Engineer              (617) 557-4573
Harrison & Troxell, Inc.       ericd@hnt.com
2 Faneuil Hall Marketplace
Boston, MA 02109

> -----Original Message-----
> From: Jon Smirl [mailto:jonsmirl@mediaone.net]
> Sent: Saturday, February 10, 2001 8:04 PM
> To: fop-dev@xml.apache.org
> Subject: Re: FOP in C++ ?
>
>
> I didn't mean to abandon FOP 1.0 in Java. The idea was to do FOP 2.0 in C
> and provide a JNI wrapper. I'm not in favor of the split
> developer resources
> that is occurring with Xalan/Xerces and two parallel implementations. It's
> hard enough to get the resources for one version. The only reason
> Xalan/Xerces gets aways with it is because IBM is funding
> fifteen+ people to
> work on it.
>
> For a library like FOP C is the better implementation language. This isn't
> about speed or ease of coding, it's about getting these standards accepted
> by the widest possible audience. Java can access C via JNI but the reverse
> isn't true. Implementing in Java shuts out the entire non-Java world.
>
> SVG is a prime example of something that sorely needs a C based
> implementation. The only C based version I know of is Adobe's and it's not
> open source. If an open source C version existed I'd start
> plugging it into
> Mozilla tomorrow. I'd also be interested in looking at supporting
> xsl:fo in
> mozilla but you can't do this with a Java implementation.
>
> There are hundreds of existing apps that could be easily modified to
> incorporate C versions of FOP and Batik. Making these same apps call a
> subsystem in Java is complex to nearly impossible.
>
> Jon Smirl
> jonsmirl@mediaone.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Jon Smirl <jo...@mediaone.net>.
I didn't mean to abandon FOP 1.0 in Java. The idea was to do FOP 2.0 in C
and provide a JNI wrapper. I'm not in favor of the split developer resources
that is occurring with Xalan/Xerces and two parallel implementations. It's
hard enough to get the resources for one version. The only reason
Xalan/Xerces gets aways with it is because IBM is funding fifteen+ people to
work on it.

For a library like FOP C is the better implementation language. This isn't
about speed or ease of coding, it's about getting these standards accepted
by the widest possible audience. Java can access C via JNI but the reverse
isn't true. Implementing in Java shuts out the entire non-Java world.

SVG is a prime example of something that sorely needs a C based
implementation. The only C based version I know of is Adobe's and it's not
open source. If an open source C version existed I'd start plugging it into
Mozilla tomorrow. I'd also be interested in looking at supporting xsl:fo in
mozilla but you can't do this with a Java implementation.

There are hundreds of existing apps that could be easily modified to
incorporate C versions of FOP and Batik. Making these same apps call a
subsystem in Java is complex to nearly impossible.

Jon Smirl
jonsmirl@mediaone.net



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
On Sat, 10 Feb 2001, Jon Smirl wrote:

> I've been trying to talk the Xalan/Xerces Java heads into this but they
> won't go along. What about shifting all FOP development to C/C++ and
> abandoning the Java version. The Java community would be served via a JNI
> wrapper for the C/C++ code. This actually ends up with a higher performance
> solution for the Java users.

We're too far down the Java road. The prospects of a FOP 1.0 will be delayed
badly by a switch to C++. In any case we have to also consider that not all
current developers and committers will want to code in C or C++. And if they
have no experience with either (particularly C++) it'll take at least a year
before they are proficient with it. That's not just a wild-assed guess; that's a
minimum industry estimate. I'd personally say that it takes 2 years of solid
C++ before you're really good at it.

> If a complete rewrite were to be done I would really consider using SVG as
> the conceptual intermediate language instead of direct to PDF. I would then
> have an independent stage that converts the SVG to PDF. This would allow two
> teams to work independently and it would make SVG drawing integration a
> snap. It would also make it easy to implement different output stages like
> screen, RTF, etc. It would also allow the FOP C implementation to be
> integrated into Mozilla. I brought this up a long time ago on the FOP list
> be we were already too far down the current path.

Perhaps we could start an offshoot FOP sub-project now - FOP-C. Requirements,
design, etc. I'm sure there are folks interested in FO implementations who
don't want to play with Java. Maybe you can put some thought into how we ought
to proceed on this front (operating under the assumption that FOP-J is not
going to go away...I just can't see that happening).

Regards,
Arved Sandstrom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Jon Smirl <jo...@mediaone.net>.
I've been working a lot with Apache Xerces/Xalan lately in both the Java and
C++ versions. My take from that experience is that sticking the Java code in
the C compiler and fixing the errors will result in workable code, but it
will be slow.

Java wants everything in the system to be a first class object. This is not
what you want to do with strings in C++. Xalan now globally allocated large
blocks of memory and uses an operator new override to handle string
allocation.

Another trap not to fall into; don't design the internal DOM around the W3C
DOM spec. The DOM is better off being custom built for FOP's internal use
and then exposing a W3C compatible API if needed. FOP already doesn't do
this.

The basic problem is that optimizations that help Java don't help C and vice
versa. C has pointers and structs, Java doesn't. Xalan is slow because it
processes lots of objects. The current CVS version of Xalan-C has used
pointers and structs to eliminate thousands of objects that are necessary in
the Java version. The result is that Xalan-C is now twice as fast as the
initial port.

I've been trying to talk the Xalan/Xerces Java heads into this but they
won't go along. What about shifting all FOP development to C/C++ and
abandoning the Java version. The Java community would be served via a JNI
wrapper for the C/C++ code. This actually ends up with a higher performance
solution for the Java users.

If a complete rewrite were to be done I would really consider using SVG as
the conceptual intermediate language instead of direct to PDF. I would then
have an independent stage that converts the SVG to PDF. This would allow two
teams to work independently and it would make SVG drawing integration a
snap. It would also make it easy to implement different output stages like
screen, RTF, etc. It would also allow the FOP C implementation to be
integrated into Mozilla. I brought this up a long time ago on the FOP list
be we were already too far down the current path.

Jon Smirl
jonsmirl@mediaone.net



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP in C++ ?

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 08:13 AM 2/8/01 +0100, Arnaud Malguy wrote:
>I actually used Xalan and Xerces C++ in a big project written in C++.
>I'd want to use also FOP in this project to compose output documents.
>Is there any future project which consist of porting Fop in C++ ?
>
>Thanks.
>Arnaud.

I'd like to see FOP as a project expand in a number of directions, myself. 
One direction would be to explore and implement processors in other 
langauges, and C++ would be an obvious candidate. I don't think I'd use the 
word "port", though - it's probably a better approach to use FOP-J 
experience to help inform the requirements, architecture and high-level 
design of other implementations, but to do clean-room coding.

Regards,
Arved Sandstrom
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org