The Java binding for the SVG Document Object Model definitions is available at:
http://www.w3.org/TR/2002/WD-SVG11-20020215/java-binding.zip
When scripting SVG with a language such as ECMAScript, it is
possible to embed script code directly in the SVG content
using the 'script' element and the event attributes (e.g.,
'onload' or 'onclick'). For programming languages with a
binary delivery format, such as Java, it is not possible to
embed the code into the 'script' element or within the event
attributes. Therefore there is a need to specify how such
languages can bind to and handle events in the SVG document.
The following technique describes how this should be done
when using Java and what is expected of the User Agent that
supports dynamic SVG content through Java .
<script type="application/java-archive" xlink:href="myJavaHandlers.jar" />
***************************************************** Manifest-Version: 1.1 SVG-Handler-Class: org.example.svg.SVGHandler *****************************************************
public interface EventListenerInitializer { /** * Registers the listeners needed */ void initializeEventListeners(SVGDocument doc) { /* Initialization of event handlers using the DOM goes here */ } }
The event binding of other binary programming languages is
not specified.