You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "John C. Turnbull" <oz...@ozemail.com.au> on 2008/08/25 14:24:21 UTC

Possible SMIL support issue

I saw this SVG mentioned in a message to the SVG Developers list and tried
it out with the latest build of Batik.  It complains that the method
cloneNode in AbstractNode does not exist.

 

What does this mean exactly?  Is this a method that Batik is supposed to
have implemented and/or is it something to do with the state of SMIL support
in Batik?

 

Thanks,

 

-JCT


RE: Possible SMIL support issue

Posted by th...@kodak.com.
Hi John,

"John C. Turnbull" <oz...@ozemail.com.au> wrote on 08/26/2008 09:02:51 
AM:

> Doing as you said does indeed stop the error but the script still 
> does not execute as intended.  The stars that appear are supposed to
> follow the path of the squiggle that is generated when you click the
> mouse.  Can you see any reason why this is not happening that way?

   Well there are two problems.  The first is that Batik doesn't 
seem to pick up the change to the path on the animateMotion element 
after it has been added to the rendering tree. This can be worked 
around by simply moving the setAttribute call before the appendChild 
call in 'makeRun'.

   The second I'm honestly not sure if it's a Batik bug or a
file bug.  It has to do with the SMIL animation stacking.
So we appear to apply the animateMotion and then we apply the 
animateTransform which I thought was correct but perhaps it's 
not.

   To be honest I'm not intimate with the animation stuff.

> "John C. Turnbull" <oz...@ozemail.com.au> wrote on 08/25/2008 08:24:21 
AM:
> 
> > I saw this SVG mentioned in a message to the SVG Developers list and
> > tried it out with the latest build of Batik.  It complains that the 
> > method cloneNode in AbstractNode does not exist. 
> > 
> > What does this mean exactly? 
> 
>    It means that the JavaScript is trying to pass a string "true" 
> to a method that takes a boolean.  If you change the call to 
> cloneNode so that it passes "true" without the quotes it seems to 
> work. 
> 
> > Is this a method that Batik is supposed to have implemented 
> > and/or is it something to do with the state of SMIL support in Batik? 
> 
>    It's more of an artifact of how Batik's Java implementation of 
> the DOM interfaces with Rhino (the Java based JavaScript interpreter). 
> Since Java is strongly typed it tries to find a method that matches 
> the call from JavaScript.  A native JavaScript implementation would 
> accept the string and since it isn't 'null' it would be treated as 
> passing 'true'.

RE: Possible SMIL support issue

Posted by "John C. Turnbull" <oz...@ozemail.com.au>.
Hi Thomas,

 

Thanks for the reply.

 

Doing as you said does indeed stop the error but the script still does not
execute as intended.  The stars that appear are supposed to follow the path
of the squiggle that is generated when you click the mouse.  Can you see any
reason why this is not happening that way?

 

Thanks,

 

John

 

From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
Sent: Tuesday, 26 August 2008 20:01
To: batik-users@xmlgraphics.apache.org
Cc: batik-users@xmlgraphics.apache.org
Subject: Re: Possible SMIL support issue

 


Hi John,

"John C. Turnbull" <oz...@ozemail.com.au> wrote on 08/25/2008 08:24:21 AM:

> I saw this SVG mentioned in a message to the SVG Developers list and
> tried it out with the latest build of Batik.  It complains that the 
> method cloneNode in AbstractNode does not exist. 
>   
> What does this mean exactly? 

   It means that the JavaScript is trying to pass a string "true" 
to a method that takes a boolean.  If you change the call to 
cloneNode so that it passes "true" without the quotes it seems to 
work. 

> Is this a method that Batik is supposed to have implemented 
> and/or is it something to do with the state of SMIL support in Batik? 

   It's more of an artifact of how Batik's Java implementation of 
the DOM interfaces with Rhino (the Java based JavaScript interpreter). 
Since Java is strongly typed it tries to find a method that matches 
the call from JavaScript.  A native JavaScript implementation would 
accept the string and since it isn't 'null' it would be treated as 
passing 'true'.


Re: Possible SMIL support issue

Posted by th...@kodak.com.
Hi John,

"John C. Turnbull" <oz...@ozemail.com.au> wrote on 08/25/2008 08:24:21 
AM:

> I saw this SVG mentioned in a message to the SVG Developers list and
> tried it out with the latest build of Batik.  It complains that the 
> method cloneNode in AbstractNode does not exist.
> 
> What does this mean exactly?

   It means that the JavaScript is trying to pass a string "true"
to a method that takes a boolean.  If you change the call to
cloneNode so that it passes "true" without the quotes it seems to
work.

> Is this a method that Batik is supposed to have implemented 
> and/or is it something to do with the state of SMIL support in Batik?

   It's more of an artifact of how Batik's Java implementation of
the DOM interfaces with Rhino (the Java based JavaScript interpreter).
Since Java is strongly typed it tries to find a method that matches
the call from JavaScript.  A native JavaScript implementation would
accept the string and since it isn't 'null' it would be treated as
passing 'true'.