Hi Helder, I switched my dependency to 1.6R5 and still have problems. So I can't make the "right" version of Rhino work, much less the latest one. I'm using the final 1.7 release, so no SVN builds like John. My error is still "SVG Error: Unknown language: text/ecmascript". Yes, the xmlns is for the SVG namespace. The file renders fine; it's just having problems now that I've added some JavaScript to it. Is there something I have to do to "register" the JAR with Batik so it knows it can do JavaScript? I see that the BridgeContext class tries to find an interpreter in a HashMap, but I don't know how that HashMap is populated. Michael
________________________________ From: Helder Magalhães [mailto:[email protected]] Sent: Wed 6/17/2009 12:57 AM To: [email protected] Subject: Re: JavaScript issues? Hi Michael, > I'm trying to incorporate JavaScript into one of my SVG files and I'm running > into trouble. I'm sure it's something I've done because it's a custom canvas > class and I'm directly using Rhino: > > The SVG: > > <svg contentScriptType="text/ecmascript" ...> > <script type="text/ecmascript"> > <![CDATA[ ... ]]> > </script> > </svg> Yeah, this should work fine, assuming that the "xmlns" for SVG is part of the "...", of course. ;-) > I'm building with Maven so my project has a dependency on Rhino 1.7R1 for the > js.jar. This may be the issue: Batik might not be ready for this yet. Please see a relevant post [1] about a Rhino-related issue which ended up with a change [2] in order to support Rhino versions above the currently shipped (1.6R5). Note that using Rhino 1.7R1 and above implies Java 1.5 support (as stated by Cameron [3] and in the Rhino release notes [4]). > Do I have to use the js.jar that comes with Batik? Apparently not, but using any version above 1.6R7 might not work without a bit of hacking (more testing is needed). Of course that, if you manage to make Rhino 1.7R1+ work, even without any (Batik) code changes, please share! ;-) > Thanks for any help. > Michael Hope this helps, Helder [1] http://www.nabble.com/Batik-and-Rhino-1.6R7-ts19434372.html [2] http://svn.apache.org/viewvc?view=rev&revision=701300 [3] http://www.nabble.com/Java-version-requirements-and-upgrading-external-libraries-(was-%22Re%3A-Batik-and-Rhino-1.6R7%22)-ts19795908.html#a19812503 [4] https://developer.mozilla.org/en/New_in_Rhino_1.7R1 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
