この付録は参考であって、規定ではない。
SVG DOM 定義に対する Java 言語バインディングは次の URL から入手できる: The Java language binding for the SVG Document Object Model definitions is available at:
http://www.w3.org/TR/2011/REC-SVG11-20110816/java-binding.zip
この言語バインディングが公式のものでないことに注意。 IDL 定義が SVG DOM を構成する公式のものになる。 Note that this language binding is not normative. The IDL Definitions are the normative parts of the SVG DOM.
ECMAScript などの言語による SVG に対するスクリプトにおいては ‘script’ 要素とイベント属性(例えば ‘onload’ や ‘onclick’ など)を利用して SVG 内容にスクリプトコードを直接書き込める。 一方、 Java 言語などの実行形式がバイナリのプログラミング言語ではコードを ‘script’ 要素やイベント属性に埋め込むことはできない。 したがって、そのような言語をどのように SVG 文書に結びつけてイベント処理させるかを指定する必要がある。 次の技法では Java 言語の場合にこれをどのようにして行うべきか、 Java 言語を通して動的な SVG 内容をサポートする UA には何が求められるのかを述べる。 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 the Java language, 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 the Java language and what is expected of the User Agent that supports dynamic SVG content through the Java language.
<script type="application/java-archive" xlink:href="myJavaHandlers.jar"/>
Manifest-Version: 1.1 SVG-Handler-Class: org.example.svg.SVGHandler
public interface EventListenerInitializer {
void initializeEventListeners(SVGDocument doc);
}
他のバイナリ・プログラミング言語に対するイベント・バインディングは定められていない。 The event binding of other binary programming languages is not specified.