Thomas Zastrow | 8 Mar 20:16
Favicon

jEuclid-problem

Hi there,

for my little project, I tried to add mathml-support to my FOP. So, as 
described in fop-0.93/examples/mathml/README, I downloaded jEuclid and 
copied the Jar-file (jeuclid-2.9.4.jar) as jeuclid.jar into FOP's  
lib-directory.

Then - please be patient, I never used ant before - I downloaded ant and 
then in the mathml-directory of FOP:

../../../ant/apache-ant-1.7.0/bin/ant -buildfile build.xml

It started to do something, but then the process failed:

----------------------------------------------------------------

Buildfile: build.xml

init:
     [echo] ------------------- MathML-FOP 0.1-CVS [2002-2004] 
----------------

jeuclid-check:

prepare:
     [echo] Preparing the build directories
    [mkdir] Created dir: /home/zastrow/fop/fop-0.93/examples/mathml/build
    [mkdir] Created dir: 
/home/zastrow/fop/fop-0.93/examples/mathml/build/src
    [mkdir] Created dir: 
(Continue reading)

Andreas L Delmelle | 8 Mar 20:53

Re: jEuclid-problem

On Mar 8, 2007, at 20:17, Thomas Zastrow wrote:

Hi Tom,

> for my little project, I tried to add mathml-support to my FOP. So,  
> as described in fop-0.93/examples/mathml/README, I downloaded  
> jEuclid and copied the Jar-file (jeuclid-2.9.4.jar) as jeuclid.jar  
> into FOP's  lib-directory.
>
> Then - please be patient, I never used ant before - I downloaded  
> ant and then in the mathml-directory of FOP:
>
> ../../../ant/apache-ant-1.7.0/bin/ant -buildfile build.xml

Hint: simply typing 'ant' will have the same net effect as the above  
command. If Ant encounters a build.xml in the directory where it is  
started, then it automatically picks it up and starts the build.

I personally only ever supply parameters to Ant if I need to run a  
specific build target.

> It started to do something, but then the process failed:
> <snip />
> compile:
>     [echo] Compiling the sources
>    [javac] Compiling 3 source files to /home/zastrow/fop/fop-0.93/ 
> examples/mathml/build/classes
>    [javac] This version of java does not support the classic  
> compiler; upgrading to modern
>    [javac] /home/zastrow/fop/fop-0.93/examples/mathml/build/src/org/ 
(Continue reading)

Andreas L Delmelle | 8 Mar 21:20

Re: jEuclid-problem

On Mar 8, 2007, at 20:53, Andreas L Delmelle wrote:

<snip />
> It only seems like the JEuclid API has changed, and is currently  
> incompatible with the FOP MathML extension...
>
> Someone on the FOP-side needs to update our extension code.

Some follow-up, should there be parties interested in contributing a  
small patch:
Did a bit of browsing in the latest JEuclid javadocs, and apart from  
easy-to-fix dropped/altered DOMMathBuilder constructor and a few  
deprecated methods in MathBase, there is one thing I'm not sure how  
to handle:

>    [javac] /home/zastrow/fop/fop-0.93/examples/mathml/build/src/org/ 
> apache/fop/mathml/MathMLElement.java:84: internal error; cannot  
> instantiate net.sourceforge.jeuclid.MathBase.<init> at  
> net.sourceforge.jeuclid.MathBase to ()
>    [javac]                 MathBase base = new MathBase(
>    [javac]                                 ^

The MathBase constructor has been changed, and now makes use of Java  
1.5 generic maps...

MathBase(Map<ParameterKey,String> params)

For the rest, it seems like only a small task to change the MathML  
extension.

(Continue reading)

Thomas Zastrow | 8 Mar 22:02
Favicon

Re: jEuclid-problem

Andreas L Delmelle schrieb:
> On Mar 8, 2007, at 20:53, Andreas L Delmelle wrote:
>
> <snip />
>> It only seems like the JEuclid API has changed, and is currently 
>> incompatible with the FOP MathML extension...
>>
>> Someone on the FOP-side needs to update our extension code.
>
> Some follow-up, should there be parties interested in contributing a 
> small patch:
> Did a bit of browsing in the latest JEuclid javadocs, and apart from 
> easy-to-fix dropped/altered DOMMathBuilder constructor and a few 
> deprecated methods in MathBase, there is one thing I'm not sure how to 
> handle:
>
>
>>    [javac] 
>>
/home/zastrow/fop/fop-0.93/examples/mathml/build/src/org/apache/fop/mathml/MathMLElement.java:84: 
>> internal error; cannot instantiate 
>> net.sourceforge.jeuclid.MathBase.<init> at 
>> net.sourceforge.jeuclid.MathBase to ()
>>    [javac]                 MathBase base = new MathBase(
>>    [javac]                                 ^
>
> The MathBase constructor has been changed, and now makes use of Java 
> 1.5 generic maps...
>
> MathBase(Map<ParameterKey,String> params)
(Continue reading)

Andreas L Delmelle | 9 Mar 10:11

Re: jEuclid-problem

On Mar 8, 2007, at 22:02, Thomas Zastrow wrote:

Hi Tom,

> Andreas L Delmelle schrieb:
<snip />
> Andreas, thank you for your help :-)

You're welcome, of course.

> I'm not sure if I can help something, I have some Java-experience  
> but don't want to mess up other's work.

If you really want to help, all that needs to be changed/updated is  
the class org.apache.fop.mathml.MathMLElement (located in examples/ 
mathml/src, to restore compatibility with the latest JEuclid.

It only seems that JEuclid, in one of the last releases, has begun  
targeting Java 1.5 as a minimum. I can't say for sure whether no  
other problems will arise. FOP and Batik both still have a minimal  
target JVM of 1.3 (release FOP 0.93 / Batik 1.6). For FOP this should  
be 1.4 by the next release. This means we can't use Java 1.5 features  
like generics or typesafe enums internally in FOP, and I'm not sure  
whether the MathBase constructor will accept a standard Map, which  
would resolve to:
Map<Object, Object>

If this latter issue is only minor, and the updated MathBase  
constructor also accepts non-generic Maps, then updating the  
extension should prove to be a cake-walk. If the issue cannot be  
(Continue reading)

Vincent Hennebert | 9 Mar 10:57
Favicon

Re: jEuclid-problem

Andreas L Delmelle a écrit :
> On Mar 8, 2007, at 22:02, Thomas Zastrow wrote:
> 
> Hi Tom,
> 
>> Andreas L Delmelle schrieb:
> <snip />
>> Andreas, thank you for your help :-)
> 
> You're welcome, of course.
> 
>> I'm not sure if I can help something, I have some Java-experience but
>> don't want to mess up other's work.
> 
> If you really want to help, all that needs to be changed/updated is the
> class org.apache.fop.mathml.MathMLElement (located in
> examples/mathml/src, to restore compatibility with the latest JEuclid.
> 
> It only seems that JEuclid, in one of the last releases, has begun
> targeting Java 1.5 as a minimum. I can't say for sure whether no other
> problems will arise. FOP and Batik both still have a minimal target JVM
> of 1.3 (release FOP 0.93 / Batik 1.6). For FOP this should be 1.4 by the
> next release. This means we can't use Java 1.5 features like generics or
> typesafe enums internally in FOP, and I'm not sure whether the MathBase
> constructor will accept a standard Map, which would resolve to:
> Map<Object, Object>

That should be ok. You would have to use Java 1.5 to run FOP with
Jeuclid. You can use a non-generic map in the FOP code, you will only
get warnings from the compiler about non-typesafe checking. But the code
(Continue reading)


Gmane