SVG Tiny 1.2 – 20081222

A SVG Micro DOM (uDOM)

目次

この付録は規定である。 This appendix is normative.

A.1 概要

SVG Mobile 1.1 仕様 [SVGM11] の近年の開発段階の中、実装の重荷を軽減するために SVG と XML DOM のサブセット化が必要なことが明らかになってきた。 SVG Tiny 1.2 では SVG Tiny の実装に相応しくありつつ必要な機能性が可能な限り得られる新しい特色機能を uDOM に盛り込む。 During the later stages of development of the SVG Mobile 1.1 specification [SVGM11] it became obvious that there was a requirement to subset the SVG and XML DOM in order to reduce the burden on implementations. SVG Tiny 1.2 adds new features to the uDOM, allowing for as much necessary functionality as possible, still being suitable for SVG Tiny implementations.

更に、 SVG Tiny 1.1 をサポートする機器には uDOM が実装可能な筈である。 この場合、( SVG Tiny 1.1 はインラインスクリプトの利用をサポートしていないので)スクリプトは SVG 文書の外部の利用になるが。 Furthermore, it should be possible to implement the uDOM on devices that support SVG Tiny 1.1 although, in this case, the scripting would be external to the SVG document (since SVG Tiny 1.1 does not support inline scripting).

uDOM 定義の目標は、最も有用な SVG の特色機能(変換行列など)のみならず、従来の SVG DOM と比してインターフェースの数を減らし, 必要なコア XML DOM の特色機能を利用する実行時メモリ領域を節約するために、属性とプロパティの初期値と算出値へのアクセスを可能にする API を提供する所にある。 uDOM の( SVG Tiny 1.1 に対応する)サブセットはすでに JSR 226: Scalable 2D Vector Graphics API for J2ME の様々な実装により、成功裏に実装されており、その互換性は uDOM [JSR226] のもう一つの目標になる。 The goal of the uDOM definition is to provide an API that allows access to initial and computed attribute and property values, to reduce the number of interfaces compared to the traditional SVG DOM, to reduce run-time memory footprint using necessary features of the core XML DOM, as well as the most useful SVG features (such as transformation matrices). A subset of the uDOM (corresponding to SVG Tiny 1.1) is already successfully implemented by various implementations of JSR 226: Scalable 2D Vector Graphics API for J2ME, compatibility with which is another goal of the uDOM [JSR226].

uDOM は DOM Level 2 Events [DOM2EVENTS] を規範として参照し, 参考として [DOM3EVENTS] を参照する。 DOM Level 3 Events は発行時点ではまだ勧告になっていないので、 uDOM には携帯機器に現在実装されているような機能を指定する DOM Level 3 Events の最小のサブセットが含められている。 DOM Level 3 Events には現在のウェブ環境のニーズを反映するように変更が加わることが予想され、その相反する変更は後の SVG 仕様においてここに指定される機能性に取って代わることになる。 The uDOM makes normative reference to DOM Level 2 Events [DOM2EVENTS], and informative reference to DOM Level 3 Events [DOM3EVENTS]. A minimal subset of DOM Level 3 Events was included in the uDOM to specify functionality as currently implemented on mobile devices, since DOM Level 3 Events was not yet a Recommendation at the time of publication. It is anticipated that DOM Level 3 Events may change to reflect the needs of the current Web environment, and any conflicting changes will supersede the functionality specified here for later SVG specifications.

uDOM の IDL 定義 が提供されている。 The IDL definition for the uDOM is provided.

この付録は次に挙げる部分から構成される: This appendix consists of the following parts:

A.2 SVG uDOM 概観

以下の節では、 SVG uDOM の主要な特色機能と制約の知識情報的概観を与える。 The following sections provides an informative overview of the SVG uDOM's key features and constraints.

注記:他の W3C DOM 定義同様、 SVG uDOM はプログラミング言語に依存しない。 この付録の例は ECMAScript と Java 言語のみからなるが、 SVG uDOM は他のプログラミング言語とも互換性がある。 Note: Like other W3C DOM definitions, the SVG uDOM is programming-language independent. Although this appendix only contains ECMAScript and Java language examples, the SVG uDOM is compatible with other programming languages.

A.2.1 文書へのアクセス

SVG uDOM は他の機能へのアクセスの起点になる Document オブジェクトへのアクセスを提供する。 Document オブジェクトが利用できるまでになる経緯は利用する文脈に依存する。 Java などの一部の言語では Document オブジェクトは EventListenerInitializer2 インターフェースの実装により得られる。 SVG-UA は一旦スクリプトが読み込まれて文書に結びつける準備が整い次第、実装の initializeEventListeners メソッドを呼び出す。 Document オブジェクトへは他の手段、例えば ECMAScript のグローバルオブジェクトに存在する AbstractView::document メンバを通してアクセスできる場合もある。 The SVG uDOM offers access to a Document object which is the root for accessing other features. The way the Document object becomes available depends on the usage context. In some languages, such as Java, the Document object can be obtained by implementing the EventListenerInitializer2 interface. The SVG user agent will invoke the implementation's initializeEventListeners method once the script has been loaded and is ready to bind to the document. The Document object is sometimes accessible through other means, for example through the AbstractView::document member which is available on the global object in ECMAScript.

A.2.2 木のナビゲーション

SVG uDOM では DOM 木のナビゲーションは文書ノードと要素ノードに対してのみ可能である。 要素階層のナビゲーションには2つの方法がある。 The SVG uDOM only allows navigation of the document node and the element nodes in the DOM tree. Two options are available for navigating the hierarchy of elements:

ElementTraversal インターフェースが提供する firstElementChild, lastElementChild, previousElementSibling, nextElementSibling [ET] は、とりわけ制約のある機器に適している。 これらのトラバースの仕組みは、空白のみからなるテキストノードなど、要素ノード間に割り込んでいるノードを飛ばす。 The ElementTraversal interface provides firstElementChild, lastElementChild, previousElementSibling and nextElementSibling, which are particularly suitable for constrained devices [ET]. These traversal mechanisms skip over intervening nodes between element nodes, such as text nodes which might only contain white space.

A.2.3 要素の作成

SVG uDOM では Document インターフェースの createElementNS メソッドを用いて新しい要素を作成できる。 The SVG uDOM allows the creation of new elements using the createElementNS method of the Document interface.

Example: 要素の作成( Java )
String svgNS = "http://www.w3.org/2000/svg";
Element myRect = document.createElementNS(svgNS, "rect");

A.2.4 要素の挿入

要素は親になる NodeappendChild または insertBefore メソッドを呼び出して文書木に挿入できる。 Elements can be inserted into the document tree by calling the appendChild or insertBefore methods on the Node that is to be the parent.

Example: 要素の挿入( ECMAScript )
var svgNS = "http://www.w3.org/2000/svg";
// 新しい <rect> 要素を作成
var myRect = document.createElementNS(svgNS, "rect");
// 追加前に種々の <rect> プロパティを設定
...

// 要素を文書のルートに追加
var svgRoot = document.documentElement;
svgRoot.appendChild(myRect);

// 新しい <ellipse> 要素を作成
var myEllipse = document.createElementNS(svgNS, "ellipse");

// 挿入前に種々の <ellipse> プロパティを設定
...

// 矩形の前に楕円を挿入
svgRoot.insertBefore(myEllipse, myRect);

A.2.5 要素の除去

要素は親の NoderemoveChild メソッドを呼び出して文書木から除去できる。 An element can be removed from the document tree by calling the removeChild method on its parent Node.

Example: 要素の除去( ECMAScript )
var myRect = ...;
var myGroup = document.getElementById("myGroup");
myGroup.appendChild(myRect);
...
myGroup.removeChild(myRect);

A.2.6 属性とプロパティへのアクセス

SVG Tiny 1.2 uDOM は XML 属性と CSS プロパティへアクセスする2つの方法をサポートする: Element インターフェースの getAttributeNSsetAttributeNS を用いる標準的な方法と traits と呼ばれる新しい概念による方法がある。 The SVG Tiny 1.2 uDOM supports two ways of accessing XML attributes and CSS properties; the standard way via getAttributeNS and setAttributeNS on the Element interface, and via a new concept called traits.

trait とは、 XML 属性や CSS プロパティを介して要素に結びつけられた、型付けされた値(例えば単なる文字列ではない数値など)である。 SVG uDOM における trait の機能は、一定の属性やプロパティ値への強く型付けされたアクセスを可能にする。 例えば、 getAttributeNS メソッドでは常に文字列が返されるのに比して getFloatTrait メソッドでは属性やプロパティの値を直接 float として取得する。 SVG uDOM の trait の機能は SVG 要素 を表現するすべての DOM オブジェクトに実装される TraitAccess インターフェースで利用できる。 A trait is the typed value (e.g. a number, not just a string), associated with an element by an XML attribute or a CSS property. The trait facilities in the SVG uDOM allow for strongly-typed access to certain attribute and property values. For example, there is a getFloatTrait method for getting an attribute or property value directly as a float, in contrast with the getAttributeNS method which always returns a string. The trait facilities in the SVG uDOM are available on the TraitAccess interface, which is implemented by all DOM objects representing SVG elements.

Example: trait アクセス( Java )
float width = myRect.getFloatTrait("width");
width += 10;
myRect.setFloatTrait("width", width);

(他のすべての trait ゲッタメソッドも併せて) getTraitNSgetAttributeNS の重要な違いは getTraitNS が属性の算出値を返すのに対し、 getAttributeNS は属性の指定値( 属性/プロパティの正規化 で述べるように UA による値の正規化が生じ得るので、元の指定値と一致するとは限らない)を返す所にある。 An important difference between getTraitNS (along with all other trait getter methods) and getAttributeNS is that getTraitNS returns the computed attribute value but getAttributeNS returns the specified attribute value (which might not exactly match the original specified value due to the possibility of user agent value normalization as described in Attribute/property normalization).

Example: getTraitNSgetAttributeNS の差異
<g fill="red">
  <rect id="r1" x="1" y="1" width="5" height="5"/>
  <rect id="r2" fill="inherit" x="1" y="1" width="5" height="5"/>
</g>

上の例で: In the above example:

trait のアニメーションも underlying XML 属性または プロパティ への適用により可能である。 trait のアニメーション値へのアクセスには、 TraitAccess インターフェースの getPresentationTrait が(他の類似する名前の presentation trait ゲッタメソッドも同様に)利用できる。 Traits may also be animated, by animating the underlying XML attribute or property. To access the animated value of a trait, the getPresentationTrait, along with the other similarly named presentation trait getter methods on the TraitAccess interface, can be used.

A.2.7 イベントリスナの登録と除去

SVG uDOM は DOM Level 2 Events の EventTarget インターフェースを利用して文書ノードへのイベントリスナの登録と除去をサポートする。 The SVG uDOM utilizes DOM Level 2 Events, using the EventTarget interface, to support the ability to add and remove event listeners to nodes in a document.

Example: イベントリスナ( Java )
class MyEventListener implements EventListener {
    public void handleEvent(Event evt) {
        // ここに必要なコードを置く
    }
}
...

// リスナを作成
EventListener listen1 = new MyEventListener();

// 浮上過程の click イベントをリッスン
SVGElement myRect = (SVGElement)document.getElementById("myRect");
myRect.addEventListener("click", listen1, false);
...

// click リスナを除去
myRect.removeEventListener("click", listen1, false);

A.2.8 アニメーション

ElementTimeControl インターフェースのメソッドを用いて アニメーション要素 の始動と停止を行える。 Animation elements can be started and stopped using the methods available on the ElementTimeControl interface.

Example: アニメーション (ECMAScript)
var animateColor = document.getElementById("myAnimation");

// 2.5 秒後にアニメーションを始動させる。
animateColor.beginElementAt(2.5);

A.2.9 マルチメディア制御

ElementTimeControlSVGTimedElement インターフェースを組み合わせて audio, video, animation 要素などのマルチメディア要素を制御できる。 一般的な制御の一部とアクセスするインターフェースメソッドを下に示す: Control of multimedia elements, such as the 'audio', 'video', and 'animation' elements is available through a combination of the ElementTimeControl and SVGTimedElement interfaces. Some common controls, and the interface methods to access them, are listed below:

SVG 1.2 Tiny は時間コンテナ要素に対する(早送りや早戻しなどの)再生速度の制御は定めていないことに注意。 この機能性は将来版に含められるものと見込まれている。 Note that SVG 1.2 Tiny does not define controlling the rate of playback (such as fast-forward or reverse) for time container elements. This functionality may be included in a future specification.

A.2.10 Java パッケージの命名

SVG uDOM の Java パッケージ名は来るべき SVG 1.2 Full DOM のものと同じである( org.w3c.dom, org.w3c.dom.events, org.w3c.dom.svg, 等々)。 これにより、特色機能を SVG uDOM に制限した Java アプリケーションでも SVG 1.2 Full DOM をサポートする実装で実行可能になる。 The SVG uDOM uses the same Java package names as the upcoming SVG 1.2 Full DOM (e.g. org.w3c.dom, org.w3c.dom.events, org.w3c.dom.svg). This allows Java applications which restrict themselves to the features in the SVG uDOM to also run in implementations that support the SVG 1.2 Full DOM.

A.3 SVG uDOM への適合

この節と以下のすべては正式なものになる。 適合 SVG ビューアは、インターフェースが明示的にこの規則の例外を認めている部分以外は、 SVG uDOM で定義されたすべてのインターフェースのすべての内容, 属性, メソッドをサポートしなければならない。 This section and all the following are normative. Conforming SVG Viewers must support all constants, attributes and methods of all the interfaces defined in the SVG uDOM unless an interface explicitly allows for exceptions to this rule.

A.3.1 浮動小数点数値

SVG uDOM では IDL の float 値を IEEE-754 単精度浮動小数点値 [IEEE-754] で表現する。 非有限数値 — NaN ( Not a Number )値のセットと正と負の無限大 — これらの値は uDOM では決して用いられない。 従って、処理または属性について特別に注釈が記されている場合を除き、非有限値が処理の引数として渡されたり, float 型の属性に代入されたり, 非有限値を含む浮動小数点値の配列が sequence<float> 型の処理引数や属性に渡された場合、エラーコード NOT_SUPPORTED_ERR の DOMException が投げられなければならない。 The SVG uDOM uses IEEE-754 single precision floating point values to represent float values in the IDL [IEEE-754]. While such values support a number of non-finite values — a set of NaN (Not a Number) values and positive & negative infinity — these values are never used by the uDOM. Thus, unless otherwise specified in the prose for an operation or attribute, a DOMException with error code NOT_SUPPORTED_ERR must be thrown if a non-finite value is passed as an operation argument, or assigned to an attribute, whose type is float, or if a list of floating point values containing a non-finite value is passed as an operation argument, or assigned to an attribute, whose type is sequence<float>.

加えて、 uDOM のすべての処理と属性は正と負のゼロを区別しない。 負のゼロが float または sequence<float> 型の処理引数に渡されたりその型の属性に代入される際には正のゼロとして扱わなければならない。 In addition, none of the operations or attributes in the uDOM distinguish between positive and negative zero. A negative zero must be treated as a positive zero when passed as an operation argument, or assigned to an attribute, whose type is float or sequence<float>.

uDOM の処理および属性は決して非有限値または負のゼロ値を返さない。 Operations and attributes in the uDOM will never return a non-finite or negative zero value from an operation or attribute.

A.3.2 属性/プロパティの正規化

uDOM を実装するビューアは、 getAttributeNS メソッド, 種々の trait ゲッタメソッド( getTrait, getTraitNS, getFloatTrait , 等々), trait 表示値ゲッタメソッド( getPresentationTrait, getPresentationTraitNS, getFloatPresentationTrait , 等々)から 正規化された属性値 ([DOM3], 1.4 節) を返してもよい。 行い得る属性の正規化の一覧を以下に挙げる:
【表示値( presentation value )= アニメーション値(表示中の値)と思われる】 A viewer implementing the uDOM is allowed to return normalized attribute values ([DOM3], section 1.4) from getAttributeNS and the various trait getter methods (getTrait, getTraitNS, getFloatTrait, etc.) and trait presentation value getter methods (getPresentationTrait, getPresentationTraitNS, getFloatPresentationTrait, etc.). The following is a list of possible attribute normalizations:

色の正規化
"red""rgb(255,0,0)", "#ff0000", または他の同一の意味内容の形式で返してもよい。 "red" may be returned as "rgb(255,0,0)", "#ff0000", or another semantically identical form.
範囲外の値の正規化
一定の範囲内でのみ妥当な値はその範囲に切り上げ/下げられた値にして返してもよい。 例えば fill-opacity="1.3""1" を返してもよい。 Values that are only of relevance within a certain range may be returned as a value clamped to that range. E.g. fill-opacity="1.3" may be returned as "1".
数値精度
"3.0""3" でも "3.00" でも、他の同一の意味内容の形式で返してもよい。 "3.0" may be returned as "3", "3.00" or another semantically identical form.
空白の正規化
" 3.0 ""3.0" を返してもよい。 空白の正規化には font-family プロパティ内の引用符で括られていないフォント名も含まれる。 空白を含むフォントファミリ名は引用符で括られるべきである。 引用符が省略された場合、フォント名の前後の空白は無視され、途中にある連続する空白文字は1個のスペースに置換されてもよい。 " 3.0 " may be returned as "3.0". Whitespace normalization also includes unquoted font names in the 'font-family' property. Font family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the font name may be ignored and any sequence of whitespace characters inside the font name may be converted to a single space.
フォントウェイトの正規化
"normal""400" を返してもよく, "bold""700" を返してもよい。 "normal" may be returned as "400", "bold" may be returned as "700".
変換の正規化
座標系変換値は対応する行列を返してもよい。 例えば "scale(2,2)""matrix(2,0,0,2,0,0)" を返してもよく, "scale(2,2) translate(10,5) rotate(45)""matrix(1.4142, 1.4142, -2.5857, 1.4142, 20, 10)" を返してもよい。 Any transform value may be returned as the corresponding matrix. E.g. "scale(2,2)" may be returned as "matrix(2,0,0,2,0,0)", and "scale(2,2) translate(10,5) rotate(45)" may be returned as "matrix(1.4142, 1.4142, -2.5857, 1.4142, 20, 10)".
パスの正規化
dpath で利用されるパスデータ命令のフルセットはより小さなセットに整理されてもよい。 The full set of path data comamnds as used by 'd' and 'path' may be mapped down to a smaller set of commands.
display の正規化
display に可能な値はすべて 'none', 'inline', 'inherit' いずれかに正規化してよい。 純粋な SVG Tiny 1.2 ビューアであれば、これらの値で display の出力として可能な様態をまかなえるので。 例えば "block""inline" を返してもよい。 例えば CDF ビューアなど複数名前空間を扱う場合では display プロパティの差異が重要になるので、複数の名前空間の環境下での利用が意図されている SVG Tiny 1.2 ビューアには、全範囲の display 値の維持が強く推奨される。 All possible 'display' values may be mapped to 'none', 'inline' or 'inherit' since they cover all the possible 'display' outputs for a pure SVG Tiny 1.2 viewer. For example, "block" may be returned as "inline". For viewers in multiple namespaces, e.g. a CDF viewer, the different 'display' properties are of importance and therefore an SVG Tiny 1.2 viewer intended for use in a multiple namespace environment is strongly recommended to keep the full range of 'display' values.

A.3.3 テキスト内容へのアクセス

SVG uDOM による要素のテキスト内容へのアクセスには2通りの方法がある。 TraitAccess インターフェースを通したテキストへのアクセスはすべての SVGElement で利用できる。 これは SVG Tiny 1.1 uDOM でも利用できていたもので( JSR 226 仕様 [JSR226] で利用されている)下位互換性を保つため、依然利用できる。 SVG Tiny 1.2 uDOM の仕様では、より汎用的なテキストアクセスの仕組みとして Node インターフェースに textContent 属性を導入する。 In the SVG uDOM, there are two alternative ways to access an element's textual content. Text access via the TraitAccess interface is available on all SVGElements. This was available in the SVG Tiny 1.1 uDOM (used in the JSR 226 specification [JSR226]) and is still available in order to keep backward compability. The SVG Tiny 1.2 uDOM specification introduces the textContent attribute on the Node interface as a more generic text access mechanism.

要素のテキスト文字列値へ trait を通してアクセスするには、その要素の getTrait() または setTrait() を呼び出す際に、引数の取得または設定する trait 名を #text にする。 例えば、 MyTextElement.setTrait("#text", "Hello"); など。 テキスト内容要素 および desc, title, metadata 要素は #text の仕組みを通したテキストへのアクセスをサポートしなければならない。 この仕様で定義されている他の要素( 要素 一覧を見よ)では、テキストへのアクセスはサポートされない。 また、実装はそれらの要素のテキストを無視すべきである。 To access or set the text string value for an element via traits you invoke getTrait() or setTrait() on that element and pass #text as the name of the trait you want to get or set. For example, MyTextElement.setTrait("#text", "Hello"); Text access via the #text mechanism must be supported on text content, 'desc', 'title' and 'metadata' elements. Text access to other elements defined within this specification (see list of elements) is not supported and an implementation should ignore any text on these elements.

#text の仕組みを通したテキスト内容の取得と設定の結果は textContent 属性を用いた場合と同一になる。 従って利用者は、要素からテキスト文字列を取得して設定し直した場合に子の tspan 要素(すなわち、テキスト内容を取得する要素の子の tspan 要素)のスタイル付けが失われることに留意すべきである。 The result of getting and setting text content via the #text mechanism is exactly the same as when using the textContent attribute. Therefore the user should be aware of the fact that styling by child 'tspan' elements (i.e. 'tspan' elements that are children of the element which text content is retrieved) will be lost if a text string is retrieved from an element and then set back again.

#text trait は JSR 226 仕様 [JSR226] との互換性のために含められている。 内容製作者は JSR 226 実装との互換性が要求されていない所では、適用性がより汎用的かつ DOM Level 3 Core [DOM3] との互換性サポートもより良い textContent を代わりに用いることが推奨される。 The #text trait is included for compatibility with the JSR 226 specification [JSR226]. It is recommended that where compatibility with JSR 226 implementations is not required content developers use textContent instead as it is more generally applicable and supports better compatibility with DOM Level 3 Core [DOM3].

A.4 Module: dom

A.4.1 DOMException

DOM Level 3 Core ([DOM3], 1.4 節) の Fundamental Interfaces: Core Module 節で定められるように、DOM 操作により生じる例外。 SVG uDOM は DOM Level 3 Core のサブセットなので、 INUSE_ATTRIBUTE_ERRVALIDATION_ERR など、この例外に定められた例外コードには決して生じないものもある。 しかしながら、 uDOM と 完全な DOM Level 3 Core の両方をサポートする実装も可能にするため、これらの例外コードは取り除かれていない。 An exception that occurred due to a DOM operation, as defined in the Fundamental Interfaces: Core Module section of DOM Level 3 Core ([DOM3], section 1.4). Note that since the SVG uDOM is a subset of DOM Level 3 Core, some of the exception codes defined for this exception may never occur (such as INUSE_ATTRIBUTE_ERR, and VALIDATION_ERR). However, in the interest of facilitating implementations that support both the uDOM and the complete DOM Level 3 Core, none of the exception codes are removed.

IDL 定義
exception DOMException
{
	unsigned short code;
};

// ExceptionCode
const unsigned short      INDEX_SIZE_ERR                 = 1;
const unsigned short      DOMSTRING_SIZE_ERR             = 2;
const unsigned short      HIERARCHY_REQUEST_ERR          = 3;
const unsigned short      WRONG_DOCUMENT_ERR             = 4;
const unsigned short      INVALID_CHARACTER_ERR          = 5;
const unsigned short      NO_DATA_ALLOWED_ERR            = 6;
const unsigned short      NO_MODIFICATION_ALLOWED_ERR    = 7;
const unsigned short      NOT_FOUND_ERR                  = 8;
const unsigned short      NOT_SUPPORTED_ERR              = 9;
const unsigned short      INUSE_ATTRIBUTE_ERR            = 10;
const unsigned short      INVALID_STATE_ERR              = 11;
const unsigned short      SYNTAX_ERR                     = 12;
const unsigned short      INVALID_MODIFICATION_ERR       = 13;
const unsigned short      NAMESPACE_ERR                  = 14;
const unsigned short      INVALID_ACCESS_ERR             = 15;
const unsigned short      VALIDATION_ERR                 = 16;
const unsigned short      TYPE_MISMATCH_ERR              = 17;
定数
INDEX_SIZE_ERR
INDEX_SIZE_ERR 参照。
DOMSTRING_SIZE_ERR
DOMSTRING_SIZE_ERR 参照。
HIERARCHY_REQUEST_ERR
HIERARCHY_REQUEST_ERR 参照。
WRONG_DOCUMENT_ERR
WRONG_DOCUMENT_ERR 参照。
INVALID_CHARACTER_ERR
INVALID_CHARACTER_ERR 参照。
NO_DATA_ALLOWED_ERR
NO_DATA_ALLOWED_ERR 参照。
NO_MODIFICATION_ALLOWED_ERR
NO_MODIFICATION_ALLOWED_ERR 参照。
NOT_FOUND_ERR
NOT_FOUND_ERR 参照。
NOT_SUPPORTED_ERR
NOT_SUPPORTED_ERR 参照。
INUSE_ATTRIBUTE_ERR
INUSE_ATTRIBUTE_ERR 参照。
INVALID_STATE_ERR
INVALID_STATE_ERR 参照。
SYNTAX_ERR
SYNTAX_ERR 参照。
INVALID_MODIFICATION_ERR
INVALID_MODIFICATION_ERR 参照。
NAMESPACE_ERR
NAMESPACE_ERR 参照。
INVALID_ACCESS_ERR
INVALID_ACCESS_ERR 参照。
VALIDATION_ERR
VALIDATION_ERR 参照。
TYPE_MISMATCH_ERR
TYPE_MISMATCH_ERR 参照。
属性は定義されない
メソッドは定義されない

A.4.2 Node

Node インターフェースは SVG 文書木の一般ノードを記述する。 The Node interface describes generic nodes in an SVG document tree.

このインターフェースは DOM Level 3 Core ([DOM3], 1.4 節) で定義されている Node インターフェースのサブセットである。 uDOM でサポートされなければならない Node タイプは Element ノードと Document ノードになる。 This interface is a subset of the Node interface defined in DOM Level 3 Core ([DOM3], section 1.4). Node types that must be supported in the uDOM are Element nodes and Document nodes.

このサブセットは NodeType と DocumentPosition 定義グループをサポートしない。 nodeType フィールドと compareDocumentPosition メソッドが、サブセット化されたインターフェースのメンバではないので。 This subset does not support the NodeType and DocumentPosition definition groups, since the nodeType field and the compareDocumentPosition method are not members of the subsetted interface.

textContent については、このサブセットには Text ノードを表現するインターフェースが存在しないので、テキスト設定時にも Text ノードの作成は要求されない。 しかしながら textContent は、 DOM Level 3 Core の textContent の定義に従う Text ノードが実際に作成されたかのようにふるまわなければならない。 Concerning textContent, there is no requirement to create a Text node on setting since this subset has no interface representing Text nodes. However, the behaviour of textContent must be as if the Text node described in the the definition of textContent had indeed been created.

SVG 仕様で定義された要素のテキスト内容へアクセスする別の方法には #text trait の利用がある。 An alternate way of accessing text content on elements defined within the SVG specification is with the use of the #text trait.

IDL 定義
interface Node
{
	readonly attribute DOMString namespaceURI;
	readonly attribute DOMString localName;
	readonly attribute Node parentNode;
	readonly attribute Document ownerDocument;
	attribute DOMString textContent;
	Node appendChild(in Node newChild) 
		raises(DOMException);
	Node insertBefore(in Node newChild, in Node refChild) 
		raises(DOMException);
	Node removeChild(in Node oldChild) 
		raises(DOMException);
	Node cloneNode(in boolean deep);
};
定数は定義されない
属性
namespaceURI
namespaceURI 参照。
localName
localName 参照。
parentNode
parentNode 参照。
ownerDocument
ownerDocument 参照。
textContent
textContent 参照。
メソッド
appendChild
appendChild 参照。
insertBefore
insertBefore 参照。
removeChild
removeChild 参照。
cloneNode
cloneNode 参照。

A.4.3 Element

Element インターフェースは SVG 文書木の一般要素を記述する。 The Element interface describes generic elements in an SVG document tree.

このインターフェースは DOM Level 3 Core ([DOM3], 1.4 節) で定義されている Element インターフェースのサブセットである。 This interface is a subset of the Element interface defined in DOM Level 3 Core ([DOM3], section 1.4)

setAttributeNS に関しては、 prefix フィールドも Attr インターフェースもサポートされていないので、 prefix を考慮に入れることは要求されない。 Concerning setAttributeNS, there is no requirement to take the prefix into account since neither the prefix field nor the Attr interface are supported.

IDL 定義
interface Element : Node, ElementTraversal
{
	DOMString getAttributeNS(in DOMString namespaceURI, in DOMString localName) 
		raises(DOMException);
	void setAttributeNS(in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) 
		raises(DOMException);
	DOMString getAttribute(in DOMString name);
	void setAttribute(in DOMString name, in DOMString value) 
		raises(DOMException);
};
定数は定義されない
属性は定義されない
メソッド
getAttributeNS
getAttributeNS 参照。
setAttributeNS
setAttributeNS 参照。
getAttribute
getAttribute 参照。
setAttribute
setAttribute 参照。

A.4.4 Document

Document インターフェースは XML 文書を表現する。 The Document interface represents XML documents.

このインターフェースは DOM Level 3 Core ([DOM3], 1.4 節) で定義されている Document インターフェースのサブセットである。 This interface is a subset of the Document interface defined in DOM Level 3 Core ([DOM3], section 1.4).

IDL 定義
interface Document : Node
{
	Element createElementNS(in DOMString namespaceURI, in DOMString qualifiedName) 
		raises(DOMException);
	readonly attribute Element documentElement;
	Element getElementById(in DOMString elementId);
};
定数は定義されない
属性
documentElement
documentElement 参照。
メソッド
createElementNS
createElementNS 参照。
getElementById
getElementById 参照。

A.4.5 ElementTraversal

このインターフェースは、 uDOM 木内の要素を辿る手段を提供する。 SVG Tiny uDOM は文字データノードを公開しないのでこれが必要になる。 外部名前空間の要素も含め、 SVG Tiny 文書木内の各要素はこのインターフェースを実装する。 このインターフェースの正式な定義は ElementTraversal specification [ET] を参照のこと。 単に情報のために下に再掲する。 This interface provides a way to traverse elements in the uDOM tree. It is needed mainly because SVG Tiny uDOM does not expose character data nodes. Each element in the SVG Tiny document tree implements this interface, including elements in foreign namespaces. For the normative definition of this interface see the ElementTraversal specification [ET]; it is only repeated informatively below.

IDL 定義
interface ElementTraversal
{
	readonly attribute Element firstElementChild;
	readonly attribute Element lastElementChild;
	readonly attribute Element nextElementSibling;
	readonly attribute Element previousElementSibling;
	readonly attribute unsigned long childElementCount;
};
定数は定義されない
属性
firstElementChild
firstElementChild 参照。 【要素( nodeType 1 のノード)の(文書内の出現順で)最初の(直接の)子要素を返す。無ければ null を返す。】
lastElementChild
lastElementChild 参照。 【最後の子要素を返す。無ければ null を返す。】
nextElementSibling
nextElementSibling 参照。 【次の要素を返す。無ければ null を返す。】
previousElementSibling
previousElementSibling 参照。 【前の要素を返す。無ければ null を返す。】
childElementCount
childElementCount 参照。 【子要素の個数を返す。】
メソッドは定義されない

A.4.6 Location

Location オブジェクトは文書のアドレス表現を提供する。 Location objects provide a representation of their document's address.

IDL 定義
interface Location
{
	void assign(in DOMString iri);
	void reload();
};
定数は定義されない
属性は定義されない
メソッド
assign

このメソッドが呼び出された際には UA は与えられた IRI へ移動しなければならない。 追跡の結果は target 属性を '_replace' に設定した a のハイパーリンクによる移動と同一でなければならない。 違いは a のハイパーリンクが利用者との対話により発動されるのに対し、 assign はスクリプトから発動される所になる。 現在の文書ロケーションは AbstractView.document フィールドが指す Document オブジェクトの IRI である。 相対 IRI 参照 は現在の文書の基底 IRI を基に解決される。 基底 IRI が現在の文書のそれと異なる場合、現在の文書は破棄され, 指定された IRI の文書の読み込みとパースが開始される。 これにより新規の文書の読み込みが生じた場合、時間軸は再始動され, load イベントも新たに発火される。 注記: HTTP においては pragma:no-cache ([RFC2616], 14.32 節) は発行されず、キャッシュが存在する場合、サーバからの新規複製は強制されない。 When this method is invoked, the user agent must navigate to the given IRI. The result of the traversal must be identical to the traversal caused by an 'a' hyperlink with the 'target' attribute set to '_replace'. The difference is that the 'a' hyperlink is activated on user interaction but assign is activated from script. The current document location is the IRI of the Document object pointed to by the AbstractView.document field. Relative IRI references are resolved based on the base IRI of the current document. If the base IRI differs from that of the current document, the current document is discarded, and loading and parsing of the document at the specified IRI then begins. If the previous step resulted in loading of a new document, the timeline is restarted and a new load event is fired. Note: For HTTP, a pragma:no-cache ([RFC2616], section 14.32) is not issued and thus a fresh copy from the server is not forced if there is a cache.

パラメタ
in DOMString iri 追跡されることになる IRI The IRI to be traversed.
返り値無し
例外無し
reload

このメソッドが呼び出される際は UA は Location で特定されるリソースの再読み込みを強制される。 現在の文書ロケーションは AbstractView.document フィールドが指す Document オブジェクトの IRI になる。 When this method is invoked, the user agent is forced to reload the resource identified by the Location. The current document location is the IRI of the Document object pointed to by the AbstractView.document field.

パラメタ無し
返り値無し
例外無し

A.4.7 Window

これは事実上の標準として多数のブラウザが実装している Window インターフェースのサブセットになる。 この分野で進行中の [WINDOW, HTML5] が書かれた時点現在での標準化の努力については Window Object 1.0HTML 5default view を参照のこと。 This is a subset of the de facto standard Window interface that many browsers implement. See Window Object 1.0 and The default view in HTML 5 for ongoing standardization efforts in this area at the time of writing [WINDOW, HTML5].

Window インターフェースは文書の デフォルトビュー ([DOM2VIEWS], 1.1 節) を表現するオブジェクトに実装されなければならない。 このオブジェクトは AbstractView も実装する。 ECMAScript 言語束縛においては、グローバルスクリプトオブジェクトが Window を実装する。 文書の Window オブジェクトは DocumentView::defaultView を通してでも取得できる。 The Window interface must be implemented by the object that represents the default view of the document ([DOM2VIEWS], section 1.1). This object also implements AbstractView. Thus, in the ECMAScript language binding, the global script object implements Window. The Window object for a document can also be obtained through DocumentView::defaultView.

IDL 定義
interface Window
{
	readonly attribute Window parent;
	readonly attribute Location location;
};
定数は定義されない
属性
parent

この文書のデフォルトビューの親ビューになる Window オブジェクト。 Window に親が存在しない場合(文書がビューアでトップレベルの文書として表示されているときなど)、この属性の値は null になる。 The Window object that is the parent view of this document's default view. If the Window has no notion of parent (e.g. if the document is displayed as the top level document in a viewer), then the value of this attribute is null.

location

Window オブジェクトのアクティブな文書を指す Location オブジェクト。 The Location object that is for that Window object's active document.

メソッドは定義されない

A.5 Module: views

SVG Tiny 1.2 では AbstractViewDocumentView インターフェース [DOM2VIEWS] を含む DOM Level 2 Views の完全なサポートが要求される。 SVG Tiny 1.2 requires complete DOM Level 2 Views support, which includes the AbstractView and DocumentView interfaces [DOM2VIEWS].

SVG Tiny 1.2 uDOM は文書のデフォルトビュー以外のビューへのアクセスは提供しない。 デフォルトビューへは DocumentView::defaultView を通してアクセスできる。 デフォルトビューには SVGGlobal インターフェースの実装も要求されることに注意。 ECMAScript 言語束縛においては、グローバルスクリプトオブジェクトがデフォルトビューも表現するオブジェクトでなければならない。 The SVG Tiny 1.2 uDOM does not provide access to any views of the document other than the default view. The default view is accessible through DocumentView::defaultView. Note that the default view is required to also implement the SVGGlobal interface. In the ECMAScript language binding, the global script object must also be the object that represents the default view.

A.5.1 AbstractView

このインターフェースは DOM Level 2 Views ([DOM2VIEWS], 1.2 節) の AbstractView インターフェースの複製であり、文書の デフォルトビュー を表現するオブジェクトで実装されなければならない。 ECMAScript 言語束縛においては、グローバルスクリプトオブジェクトがこのインターフェースを実装しなければならない。 This interface is a copy of the AbstractView interface from DOM Level 2 Views ([DOM2VIEWS], section 1.2), and must be implemented by the object that represents the the default view of the document. In the ECMAScript language binding, the global script object must implement this interface.

IDL 定義
interface AbstractView
{
	readonly attribute DocumentView document;
};
定数は定義されない
属性
document
この SVGGlobalDocumentView として結びつけられた文書。 このオブジェクトは Document でもあることに注意。 DOM Level 2 Views ([DOM2VIEWS], 1.2 節) の AbstractView::document を参照のこと。 The document that this SVGGlobal is associated with, as a DocumentView. Note that this object is also a Document. See AbstractView::document in DOM Level 2 Views ([DOM2VIEWS], section 1.2).
メソッドは定義されない

A.5.2 DocumentView

このインターフェースは DOM Level 2 Views ([DOM2VIEWS], 1.2 節) の DocumentView インターフェースの複製であり、すべての Document オブジェクトで実装されなければならない。 This interface is a copy of the DocumentView interface from DOM Level 2 Views ([DOM2VIEWS], section 1.2), and must be implemented by all Document objects.

IDL 定義
interface DocumentView
{
	readonly attribute AbstractView defaultView;
};
定数は定義されない
属性
defaultView
この Document の既定の AbstractView 、または存在しなければ null 。 この属性の値は文書に結びつけられた SVGGlobal オブジェクトになる。 DOM Level 2 Views ([DOM2VIEWS], 1.2 節) の DocumentView::defaultView を参照のこと。 The default AbstractView for this Document, or null if none available. The value of this attribute is the SVGGlobal object associated with the document. See DocumentView::defaultView in DOM Level 2 Views ([DOM2VIEWS], section 1.2).
メソッドは定義されない

A.6 Module: events

A.6.1 EventTarget

EventTarget インターフェースはイベントをリスナへ通知し得るオブジェクトに実装され、 EventListener オブジェクトの登録と除去を可能にする。 The EventTarget interface is implemented by objects that can notify listeners about events and allows registration and removal of EventListener objects.

このインターフェースは DOM Level 2 Events ([DOM2EVENTS], 1.3.1 節) で定義されている EventTarget インターフェースのサブセットである。 This interface is a subset of the EventTarget interface defined in DOM Level 2 Events ([DOM2EVENTS], section 1.3.1).

SVG Tiny 1.2 UA には捕獲過程のサポートは要求されておらず、適合 SVG Tiny 1.2 内容はそれを利用してはならないことに注意。 捕獲過程をサポートしない SVG Tiny UA においては、捕獲過程のイベント処理が指定されていた場合、 UA は addEventListener が呼び出されなかったかのように無視しなければならない。 (詳細は イベントフロー を見よ。) Please note that SVG Tiny 1.2 user agents are not required to support the capture phase, and conformant SVG Tiny 1.2 content must not make use of it. If an attempt to specify event operations on the capture phase is made an SVG Tiny user agent that does not support it must ignore them as if addEventListener had not been called. (See Event flow for details.)

DOM Level 2 Events による EventTarget の定義から示されるように、このインターフェースはすべての Node に実装される。 As indicated in the DOM Level 2 Events definition for EventTarget, this interface is implemented by all Nodes.

SVG イベントフローの説明や、イベントの標的, イベントの現在の標的, 浮上, 捕獲の意味する所は、 DOM Events Level 2 仕様 [DOM2EVENTS] または XML Events [XML-EVENTS] 仕様概要を参照のこと。 Refer to the DOM Events Level 2 specification [DOM2EVENTS] or the XML Events [XML-EVENTS] specification introduction for an explanation of the SVG event flow and the meaning of event targets, event current target, bubble and capture.

IDL 定義
interface EventTarget
{
	void addEventListener(in DOMString type, in EventListener listener, in boolean useCapture);
	void removeEventListener(in DOMString type, in EventListener listener, in boolean useCapture);
};
定数は定義されない
属性は定義されない
メソッド
addEventListener
addEventListener 参照。
removeEventListener
removeEventListener 参照。

A.6.2 EventListener

EventListener インターフェースはイベント処理のためにスクリプトにより実装される。 このインターフェースは ECMAScript においては Function オブジェクトを用いて(またはオブジェクトの handleEvent プロパティを用いて)実装できる。 Java においてはインターフェースを直接実装する。 しかる後、 EventTarget::addEventListener を用いて EventListener オブジェクトをリスナとして登録できる。 The EventListener interface is implemented by script to handle an event. The interface can be implemented in ECMAScript by using a Function object (or by using an object with a handleEvent property), and in Java by implementing the interface directly. The EventListener object can then be registered as a listener using EventTarget::addEventListener.

このインターフェースは DOM Level 2 Events ([DOM2EVENTS], 1.3.1 節) で定義されている EventListener インターフェースと同一である。 This interface is identical to the EventListener interface defined in DOM Level 2 Events ([DOM2EVENTS], section 1.3.1).

IDL 定義
interface EventListener
{
	void handleEvent(in Event evt);
};
定数は定義されない
属性は定義されない
メソッド
handleEvent
handleEvent 参照。

A.6.3 Event

Event インターフェースはイベントの文脈情報をイベント処理を行うハンドラに提供するために利用される。 The Event interface is used to provide contextual information about an event to the handler processing the event.

このインターフェースは DOM Level 2 Events ([DOM2EVENTS, 1.4 節) で定義されている Event インターフェースのサブセットに defaultPrevented 属性を追加したものである。 このサブセットは PhaseType 定義グループをサポートしない。 This interface is a subset of the Event interface defined in DOM Level 2 Events ([DOM2EVENTS, section 1.4), with one addition: the defaultPrevented attribute. This subset does not support the PhaseType definition group.

サポートされているイベント型については、対話性の章の サポートされるイベントの完全な一覧 の節を見よ。 For a list of supported event types see the Complete list of supported events section of the Interactivity chapter.

IDL 定義
interface Event
{
	readonly attribute EventTarget target;
	readonly attribute EventTarget currentTarget;
	readonly attribute DOMString type;
	readonly attribute boolean cancelable;
	readonly attribute boolean defaultPrevented;
	void stopPropagation();
	void preventDefault();
};
定数は定義されない
属性
target
target 参照。
currentTarget
currentTarget 参照。
type
type 参照。
cancelable
cancelable 参照。
defaultPrevented
このイベントの Event.preventDefault() が呼ばれたかどうかの指示に用いられる。 Used to indicate whether Event.preventDefault() has been called for this event.
メソッド
stopPropagation
stopPropagation 参照。
preventDefault
preventDefault 参照。

A.6.4 MouseEvent

ポインタ装置のイベント特有の文脈情報を提供する Event Event that provides specific contextual information associated with pointing device events.

MouseEvent になる Event 型は click, mousedown, mouseup, mouseover, mousemove, mouseout Event types that are MouseEvents: click, mousedown, mouseup, mouseover, mousemove, mouseout.

このインターフェースは DOM Level 2 Events ([DOM2EVENTS, 1.6.2 節) で定義されている MouseEvent インターフェースのサブセットになる。 This interface is a subset of the MouseEvent interface defined in DOM Level 2 Events ([DOM2EVENTS, section 1.6.2).

IDL 定義
interface MouseEvent : UIEvent
{
	readonly attribute long screenX;
	readonly attribute long screenY;
	readonly attribute long clientX;
	readonly attribute long clientY;
	readonly attribute unsigned short button;
};
定数は定義されない
属性
screenX
screenX 参照。
screenY
screenY 参照。
clientX
clientX 参照。
clientY
clientY 参照。
button
button 参照。
メソッドは定義されない

A.6.5 MouseWheelEvent

マウスホイールイベント特有の文脈情報を提供する Event Event that provides specific contextual information associated with mouse wheel events.

MouseWheelEvent になる Event 型は: mousewheel Event types that are MouseWheelEvents: mousewheel.

このインターフェースは DOM Level 3 Events ([DOM3EVENTS], 1.7.6 節) で定義されている MouseWheelEvent インターフェースのサブセットになり、 DOM Level 2 Events ([DOM2EVENTS], 1.6.2 節) で定義されている MouseEvent インターフェースの属性を継承する。 This interface is a subset of the MouseWheelEvent interface defined in DOM Level 3 Events ([DOM3EVENTS], section 1.7.6), and inherits attributes from the MouseEvent interface defined in DOM Level 2 Events ([DOM2EVENTS], section 1.6.2).

IDL 定義
interface MouseWheelEvent : MouseEvent
{
	readonly attribute long wheelDelta;
};
定数は定義されない
属性
wheelDelta
Y軸方向のホイールの回転距離。 正の値は縦方向の装置ではホイールは利用者から離れる方への回転を表し、横方向の装置では左回りの回転を表すものとする。 負の値は縦方向の装置ではホイールは利用者へ向かう方への回転を表し、横方向の装置では右回りの回転を表すものとする。 The distance the wheel has rotated around the y-axis. A positive value shall indicate that the wheel has been rotated away from the user on vertically-aligned devices or in a left-hand manner on horizontally aligned devices, and a negative value shall indicate that the wheel has been rotated towards the user on vertically-aligned devices or in a right-hand manner on horizontally-aligned devices.
メソッドは定義されない

A.6.6 TextEvent

TextEvent になる Event イベント型は: textInput Event type that is a TextEvent: textInput.

このインターフェースは DOM Level 3 Events ([DOM3EVENTS], 1.7.2 節) で定義されている TextEvent インターフェースのサブセットになる。 This interface is a subset of the TextEvent interface defined in DOM Level 3 Events ([DOM3EVENTS], section 1.7.2).

IDL 定義
interface TextEvent : UIEvent
{
	readonly attribute DOMString data;
};
定数は定義されない
属性
data
文字装置により生成された文字値を保持する data 。 これは1個の Unicode 文字または空でない Unicode 文字 [UNICODE] の連なりになる。 文字は Unicode Normalization Forms [UAX15] に定義されている Unicode 正規化形式 NFC に正規化されるべきである。 この属性は null や空文字列にはならない。 data holds the value of the characters generated by the character device. This may be a single Unicode character or a non-empty sequence of Unicode characters [UNICODE]. Characters should be normalized to Unicode normalization form NFC, defined in Unicode Normalization Forms [UAX15]. This attribute will not be null or contain an empty string.
メソッドは定義されない

A.6.7 KeyboardEvent

キーボード特有の文脈情報を提供する。 それぞれの KeyboardEvent は識別子を用いてキーを参照する。 Provides specific contextual information associated with keyboard devices. Each KeyboardEvent references a key using an identifier.

KeyboardEvents になる Event 型は: keydown, keyup Event types that are KeyboardEvents: keydown, keyup.

このインターフェースは DOM Level 3 Events ([DOM3EVENTS], 1.7.3 節) で定義されている KeyboardEvent インターフェースのサブセットになる。 This interface is a subset of the KeyboardEvent interface defined in DOM Level 3 Events ([DOM3EVENTS], section 1.7.3).

IDL 定義
interface KeyboardEvent : UIEvent
{
	readonly attribute DOMString keyIdentifier;
};
定数は定義されない
属性
keyIdentifier
keyIdentifier はキーの識別子を保持する。 キー識別子は下の キー識別子集合 に定義される。 実装は特定できないキーについてはキー識別子 "Unidentified" を用いなければならない。 keyIdentifier holds the identifier of the key. The key identifiers are defined in the Key identifiers set, below. Implementations that are unable to identify a key must use the key identifier "Unidentified".
メソッドは定義されない

キー識別子セット

これは DOM Level 3 Events, ([DOM3EVENTS], A.2 節) で定義されている キー識別子 のサブセットであり、現在携帯機器に実装されている機能のスナップショットを定める。 This is a subset of the key identifiers defined in DOM Level 3 Events, and defines a snapshot of functionality currently implemented on mobile devices ([DOM3EVENTS], section A.2).

この節に含まれるキー識別子の一覧は完全なものではなく、入力装置が独自のキー識別子を定義する必要も生じ得る。 DOM Level 3 Events ではどのキー識別子を用いるかを決定するアルゴリズムが定義されることが予期されている。 将来版の SVG 仕様ではキーボードイベントとキー識別子の確実な扱いについては DOM Level 3 Events を待つことになる。 The list of key identifiers contained in this section is not exhaustive and input devices may have to define their own key identifiers. It is expected that DOM Level 3 Events will define an algorithm to determine which key identifier to use. Future SVG specifications will defer to DOM Level 3 Events for a definitive treatment of keyboard events and key identifiers.

"U+0000", "U+0001", ..., "U+10FFFF" は Unicode [UNICODE] を基にしたキー識別子になる。 UA はキー識別の目的においては内容に含まれる文字列リテラルを Unicode 符号位置として扱ってもよい。 "U+0000", "U+0001", ..., "U+10FFFF" are Unicode-based key identifiers [UNICODE]. A user agent may treat string literal characters in content as Unicode codepoints for the purpose of key identification.

"Accept"
確定( Commit, OK )キー The Accept (Commit, OK) key.
"Again"
Again キー The Again key.
"AllCandidates"
全候補キー The All Candidates key.
"Alphanumeric"
英数キー The Alphanumeric key.
"Alt"
Alt ( Menu )キー The Alt (Menu) key.
"AltGraph"
Alt-Graph キー The Alt-Graph key.
"Apps"
Application キー The Application key.
"Attn"
ATTN キー The ATTN key.
"BrowserBack"
ブラウザ後退キー The Browser Back key.
"BrowserFavorites"
ブラウザお気に入りキー The Browser Favorites key.
"BrowserForward"
ブラウザ前進キー The Browser Forward key.
"BrowserHome"
ブラウザ Home キー The Browser Home key.
"BrowserRefresh"
ブラウザ更新キー The Browser Refresh key.
"BrowserSearch"
ブラウザ検索キー The Browser Search key.
"BrowserStop"
ブラウザ中止キー The Browser Stop key.
"CapsLock"
大文字ロックキー The Caps Lock (Capital) key.
"Clear"
Clear キー The Clear key.
"CodeInput"
コード入力(漢字番号入力)キー The Code Input key.
"Compose"
Compose キー The Compose key.
"Control"
コントロール (Ctrl) キー The Control (Ctrl) key.
"Crsel"
Crsel キー The Crsel key.
"Convert"
変換キー The Convert key.
"Copy"
コピーキー The Copy key.
"Cut"
カットキー The Cut key.
"Down"
下矢印キー The Down Arrow key.
"DownLeft"
左斜め下矢印キー The diagonal Down-Left Arrow key.
"DownRight"
右斜め下矢印キー The diagonal Down-Right Arrow key.
"End"
End キー The End key.
"Enter"
Enter キー 注記: このキー識別子は Return キー( Macintosh テンキー )にも用いられる。 The Enter key. Note: This key identifier is also used for the Return (Macintosh numpad) key.
"EraseEof"
Erase EOF キー The Erase EOF key.
"Execute"
Execute キー The Execute key.
"Exsel"
Exsel キー The Exsel key.
"F1"
F1 キー The F1 key.
"F2"
F2 キー The F2 key.
"F3"
F3 キー The F3 key.
"F4"
F4 キー The F4 key.
"F5"
F5 キー The F5 key.
"F6"
F6 キー The F6 key.
"F7"
F7 キー The F7 key.
"F8"
F8 キー The F8 key.
"F9"
F9 キー The F9 key.
"F10"
F10 キー The F10 key.
"F11"
F11 キー The F11 key.
"F12"
F12 キー The F12 key.
"F13"
F13 キー The F13 key.
"F14"
F14 キー The F14 key.
"F15"
F15 キー The F15 key.
"F16"
F16 キー The F16 key.
"F17"
F17 キー The F17 key.
"F18"
F18 キー The F18 key.
"F19"
F19 キー The F19 key.
"F20"
F20 キー The F20 key.
"F21"
F21 キー The F21 key.
"F22"
F22 キー The F22 key.
"F23"
F23 キー The F23 key.
"F24"
F24 キー The F24 key.
"FinalMode"
Final モード( Final )キー。一部のアジア圏のキーボードで用いられている。 The Final Mode (Final) key used on some asian keyboards.
"Find"
Find キー The Find key.
"FullWidth"
全角文字キー The Full-Width Characters key.
"HalfWidth"
半角文字キー The Half-Width Characters key.
"HangulMode"
ハングル(韓国・朝鮮の文字)モードキー The Hangul (Korean characters) Mode key.
"HanjaMode"
ハンジャ(韓国・朝鮮の文字)モードキー The Hanja (Korean characters) Mode key.
"Help"
ヘルプキー The Help key.
"Hiragana"
平仮名(日本の仮名文字)キー The Hiragana (Japanese Kana characters) key.
"Home"
ホームキー The Home key.
"Insert"
挿入( Ins )キー The Insert (Ins) key.
"JapaneseHiragana"
日本語平仮名キー The Japanese-Hiragana key.
"JapaneseKatakana"
日本語片仮名キー The Japanese-Katakana key.
"JapaneseRomaji"
日本語ローマ字キー The Japanese-Romaji key.
"JunjaMode"
Junja モードキー The Junja Mode key.
"KanaMode"
仮名モード(仮名ロック)キー The Kana Mode (Kana Lock) key.
"KanjiMode"
漢字(中国起源の表意文字の日本名)モードキー The Kanji (Japanese name for ideographic characters of Chinese origin) Mode key.
"Katakana"
片仮名(日本語仮名文字)キー The Katakana (Japanese Kana characters) key.
"LaunchApplication1"
アプリケーション1開始キー The Start Application One key.
"LaunchApplication2"
アプリケーション2開始キー The Start Application Two key.
"LaunchMail"
メール開始キー The Start Mail key.
"Left"
左矢印キー The Left Arrow key.
"Menu"
Menu キー The Menu key.
"Meta"
メタキー The Meta key.
"MediaNextTrack"
メディア次トラックキー The Media Next Track key.
"MediaPlayPause"
メディア再生・一時停止キー The Media Play Pause key.
"MediaPreviousTrack"
メディア前トラックキー The Media Previous Track key.
"MediaStop"
メディア停止キー The Media Stop key.
"ModeChange"
モード変更キー The Mode Change key.
"Nonconvert"
無変換(変換しない)キー The Nonconvert (Don't Convert) key.
"NumLock"
数字ロックキー The Number Lock key.
"PageDown"
Page Down(次頁)キー The Page Down (Next) key.
"PageUp"
Page Up キー The Page Up key.
"Paste"
ペーストキー The Paste key.
"Pause"
ポーズキー The Pause key.
"Play"
再生キー The Play key.
"PreviousCandidate"
前候補機能キー The Previous Candidate function key.
"PrintScreen"
プリントスクリーン( PrintScrn, SnapShot )キー The Print Screen (PrintScrn, SnapShot) key.
"Process"
Process キー The Process key.
"Props"
Props キー The Props key.
"Right"
右矢印キー The Right Arrow key.
"RomanCharacters"
ローマ字機能キー The Roman Characters function key.
"Scroll"
スクロールロックキー The Scroll Lock key.
"Select"
選択キー The Select key.
"SelectMedia"
メディア選択キー The Select Media key.
"Shift"
シフトキー The Shift key.
"Soft1"
Soft1 キー The Soft1 key.
"Soft2"
Soft2 キー The Soft2 key.
"Soft3"
Soft3 キー The Soft3 key.
"Soft4"
Soft4 キー The Soft4 key.
"Stop"
停止キー The Stop key.
"Up"
上矢印キー The Up Arrow key.
"UpLeft"
左斜め上矢印キー The diagonal Up-Left Arrow key.
"UpRight"
右斜め上矢印キー The diagonal Up-Right Arrow key.
"Undo"
Undo キー The Undo key.
"VolumeDown"
音量減少キー The Volume Down key.
"VolumeMute"
無音キー The Volume Mute key.
"VolumeUp"
音量増大キー The Volume Up key.
"Win"
Windows ロゴキー The Windows Logo key.
"Zoom"
ズームキー The Zoom key.
"U+0008"
Backspace (Back) キー The Backspace (Back) key.
"U+0009"
水平タブ( Tab )キー The Horizontal Tabulation (Tab) key.
"U+0018"
キャンセルキー The Cancel key.
"U+001B"
エスケープ( Esc )キー The Escape (Esc) key.
"U+0020"
スペース(スペースバー)キー The Space (Spacebar) key.
"U+0021"
感嘆符( Factorial, Bang )キー( ! ) The Exclamation Mark (Factorial, Bang) key (!).
"U+0022"
引用符号(2重引用符)キー( " ) The Quotation Mark (Quote Double) key (").
"U+0023"
番号記号(ポンド記号, ハッシュマーク, クロスハッチ, オクトソープ)キー( # ) The Number Sign (Pound Sign, Hash, Crosshatch, Octothorpe) key (#).
"U+0024"
ドル記号( milreis, escudo )キー( $ ) The Dollar Sign (milreis, escudo) key ($).
"U+0026"
アンパサンドキー( & ) The Ampersand key (&).
"U+0027"
アポストロフィ( Apostrophe-Quote, APL Quote )キー( ' ) The Apostrophe (Apostrophe-Quote, APL Quote) key (').
"U+0028"
左括弧(開き括弧)キー( ( ) The Left Parenthesis (Opening Parenthesis) key (().
"U+0029"
右括弧(閉じ括弧)キー( ) ) The Right Parenthesis (Closing Parenthesis) key ()).
"U+002A"
アスタリスク( Star )キー( * ) The Asterisk (Star) key (*).
"U+002B"
プラス符号( Plus )キー( + ) The Plus Sign (Plus) key (+).
"U+0025"
パーセント符号(Percent)キー( + ) The Percent Sign (Percent) key (+).
"U+002C"
コンマ符号( decimal separator )キー( , ) The Comma (decimal separator) sign key (,).
"U+002D"
ハイフン-マイナス(ハイフンまたはマイナス符号)キー( - ) The Hyphen-minus (hyphen or minus sign) key (-).
"U+002E"
Full Stop(ピリオド, ドット, 小数点)キー( . ) The Full Stop (period, dot, decimal point) key (.).
"U+002F"
斜線(スラッシュ, 斜線, シリング)キー( / ) The Solidus (slash, virgule, shilling) key (/).
"U+0030"
数字 0 キー( 0 ) The Digit Zero key (0).
"U+0031"
数字 1 キー( 1 ) The Digit One key (1).
"U+0032"
数字 2 キー( 2 ) The Digit Two key (2).
"U+0033"
数字 3 キー( 3 ) The Digit Three key (3).
"U+0034"
数字 4 キー( 4 ) The Digit Four key (4).
"U+0035"
数字 5 キー( 5 ) The Digit Five key (5).
"U+0036"
数字 6 キー( 6 ) The Digit Six key (6).
"U+0037"
数字 7 キー( 7 ) The Digit Seven key (7).
"U+0038"
数字 8 キー( 8 ) The Digit Eight key (8).
"U+0039"
数字 9 キー( 9 ) The Digit Nine key (9).
"U+003A"
コロンキー( : ) The Colon key (:).
"U+003B"
セミコロンキー( ; ) The Semicolon key (;).
"U+003C"
小なり記号キー( < ) The Less-Than Sign key (<).
"U+003D"
等号キー( = ) The Equals Sign key (=).
"U+003E"
大なり記号キー( > ) The Greater-Than Sign key (>).
"U+003F"
疑問符キー( ? ) The Question Mark key (?).
"U+0040"
単価符号キー( @ ) The Commercial At (@) key.
"U+0041"
ラテン大文字 A キー( A ) The Latin Capital Letter A key (A).
"U+0042"
ラテン大文字 B キー( B ) The Latin Capital Letter B key (B).
"U+0043"
ラテン大文字 C キー( C ) The Latin Capital Letter C key (C).
"U+0044"
ラテン大文字 D キー( D ) The Latin Capital Letter D key (D).
"U+0045"
ラテン大文字 E キー( E ) The Latin Capital Letter E key (E).
"U+0046"
ラテン大文字 F キー( F ) The Latin Capital Letter F key (F).
"U+0047"
ラテン大文字 G キー( G ) The Latin Capital Letter G key (G).
"U+0048"
ラテン大文字 H キー( H ) The Latin Capital Letter H key (H).
"U+0049"
ラテン大文字 I キー( I ) The Latin Capital Letter I key (I).
"U+004A"
ラテン大文字 J キー( J ) The Latin Capital Letter J key (J).
"U+004B"
ラテン大文字 K キー( K ) The Latin Capital Letter K key (K).
"U+004C"
ラテン大文字 L キー( L ) The Latin Capital Letter L key (L).
"U+004D"
ラテン大文字 M キー( M ) The Latin Capital Letter M key (M).
"U+004E"
ラテン大文字 N キー( N ) The Latin Capital Letter N key (N).
"U+004F"
ラテン大文字 O キー( O ) The Latin Capital Letter O key (O).
"U+0050"
ラテン大文字 P キー( P ) The Latin Capital Letter P key (P).
"U+0051"
ラテン大文字 Q キー( Q ) The Latin Capital Letter Q key (Q).
"U+0052"
ラテン大文字 R キー( R ) The Latin Capital Letter R key (R).
"U+0053"
ラテン大文字 S キー( S ) The Latin Capital Letter S key (S).
"U+0054"
ラテン大文字 T キー( T ) The Latin Capital Letter T key (T).
"U+0055"
ラテン大文字 U キー( U ) The Latin Capital Letter U key (U).
"U+0056"
ラテン大文字 V キー( V ) The Latin Capital Letter V key (V).
"U+0057"
ラテン大文字 W キー( W ) The Latin Capital Letter W key (W).
"U+0058"
ラテン大文字 X キー( X ) The Latin Capital Letter X key (X).
"U+0059"
ラテン大文字 Y キー( Y ) The Latin Capital Letter Y key (Y).
"U+005A"
ラテン大文字 Z キー( Z ) The Latin Capital Letter Z key (Z).
"U+005B"
左角括弧(開き角括弧)キー( [ ) The Left Square Bracket (Opening Square Bracket) key ([).
"U+005C"
逆斜線(バックスラッシュ)キー( \ ) The Reverse Solidus (Backslash) key (\).
"U+005D"
右角括弧(閉じ角括弧)キー( ] ) The Right Square Bracket (Closing Square Bracket) key (]).
"U+005E"
サーカムフレックスキー( ^ ) The Circumflex Accent key (^).
"U+005F"
ロー記号(スペーシングアンダースコア, アンダースコア)キー( _ ) The Low Sign (Spacing Underscore, Underscore) key (_).
"U+0060"
グレイヴ・アクセント(バッククォート)キー( ` ) The Grave Accent (Back Quote) key (`).
"U+007B"
左波括弧(開きカーリーブラケット, 開きブレイス, 左ブレイス)キー( { ) The Left Curly Bracket (Opening Curly Bracket, Opening Brace, Brace Left) key ({).
"U+007C"
縦線(縦棒、パイプ)キー( | ) The Vertical Line (Vertical Bar, Pipe) key (|).
"U+007D"
右波括弧(閉じカーリーブラケット, 閉じブレイス, 右ブレイス)キー( { ) The Right Curly Bracket (Closing Curly Bracket, Closing Brace, Brace Right) key (}).
"U+007F"
削除( Del )キー The Delete (Del) Key.
"U+00A1"
反転感嘆符号キー( ¡ ) The Inverted Exclamation Mark key (¡).
"U+0300"
結合グレイヴアクセント( Greek Varia, Dead Grave )キー The Combining Grave Accent (Greek Varia, Dead Grave) key.
"U+0301"
結合鋭アクセント( Stress Mark, Greek Oxia, Tonos, Dead Eacute )キー The Combining Acute Accent (Stress Mark, Greek Oxia, Tonos, Dead Eacute) key.
"U+0302"
結合サーカムフレックス・アクセント( Hat, Dead Circumflex )キー The Combining Circumflex Accent (Hat, Dead Circumflex) key.
"U+0303"
結合チルダ( Dead Tilde )キー The Combining Tilde (Dead Tilde) key.
"U+0304"
結合長音記号( Long, Dead Macron )キー The Combining Macron (Long, Dead Macron) key.
"U+0306"
結合単音記号( Short, Dead Breve )キー The Combining Breve (Short, Dead Breve) key.
"U+0307"
結合上点( Derivative, Dead Above Dot )キー The Combining Dot Above (Derivative, Dead Above Dot) key.
"U+0308"
結合分音符( Double Dot Abode, Umlaut, Greek Dialytika, Double Derivative, Dead Diaeresis )キー The Combining Diaeresis (Double Dot Above, Umlaut, Greek Dialytika, Double Derivative, Dead Diaeresis) key.
"U+030A"
結合 Ring Above( Dead Above Ring )キー The Combining Ring Above (Dead Above Ring) key.
"U+030B"
結合二重鋭アクセント( Dead Doubleacute )キー The Combining Double Acute Accent (Dead Doubleacute) key.
"U+030C"
結合キャロン( Hacek, V Above, Dead Caron )キー The Combining Caron (Hacek, V Above, Dead Caron) key.
"U+0327"
結合セディーユ( Dead Cedilla )キー The Combining Cedilla (Dead Cedilla) key.
"U+0328"
結合 Ogonek( Nasal Hook, Dead Ogonek )キー The Combining Ogonek (Nasal Hook, Dead Ogonek) key.
"U+0345"
結合 Greek Ypogegrammeni( Greek Non-Spacing Iota Below, Iota Subscript, Dead Iota )キー The Combining Greek Ypogegrammeni (Greek Non-Spacing Iota Below, Iota Subscript, Dead Iota) key.
"U+20AC"
ユーロ通貨記号キー( € ) The Euro Currency Sign key (€).
"U+3099"
片仮名−平仮名有声音結合符号( 濁音符号 )キー The Combining Katakana-Hiragana Voiced Sound Mark (Dead Voiced Sound) key.
"U+309A"
片仮名−平仮名無声音結合符号( 半濁音符号 )キー The Combining Katakana-Hiragana Semi-Voiced Sound Mark (Dead Semivoiced Sound) key.

A.6.8 UIEvent

UIEvent インターフェースは UI イベントに関する文脈情報を提供する。 The UIEvent interface provides specific contextual information associated with user interface events.

UIEvents になる Event 型は: DOMFocusIn, DOMFocusOut, DOMActivate, MouseEvent, TextEvent, KeyboardEvent Event types that are UIEvents: DOMFocusIn, DOMFocusOut, DOMActivate, MouseEvent, TextEvent, KeyboardEvent,

このインターフェースは DOM Level 2 Events ([DOM2EVENTS, 1.6.1 節) で定義されている UIEvent インターフェースのサブセットになる。 This interface is a subset of the UIEvent interface defined in DOM Level 2 Events ([DOM2EVENTS, section 1.6.1).

IDL 定義
interface UIEvent : Event
{
	readonly attribute long detail;
};
定数は定義されない
属性
detail
detail 参照。
メソッドは定義されない

A.6.9 ProgressEvent

ここでの progress イベントは Progress Events 1.0 [PROGRESSEVENTS] で定義されているもののサブセットになるべく定められている。 The progress events defined here are intended to be a subset of those defined in Progress Events 1.0 [PROGRESSEVENTS].

ラスター画像, 動画, 複雑な SVG 内容などの多くのリソースは相当量のダウンロードを要する。 文書作成者は内容表示やアニメーションの開始をファイルの内容全体がダウンロードされるまで遅延させることを望む場合もあれば、ビューアがダウンロードの進捗状況を示すことを望む場合もある(例えば読み込みの進捗状況のスクリーン表示)。 Many resources, such as raster images, movies and complex SVG content can take a substantial amount of time to download. In some use cases the author would prefer to delay the display of content or the beginning of an animation until the entire content of a file has been downloaded. In other cases, the author may wish to give the viewer some feedback that a download is in progress (e.g. a loading progress screen).

ProgressEvent は UA による xlink:href 属性から参照されるリソース(外部)読み込みの進捗において生じる。 The ProgressEvent occurs when the user agent makes progress loading a resource (external) referenced by an 'xlink:href' attribute.

UA は読み込み処理の開始時に(リソースへのアクセスの直前に) ProgressEvent を配送しなければならない。 このイベントの型は loadstart になる。 The user agent must dispatch a ProgressEvent at the beginning of a load operation (i.e. just before starting to access the resource). This event is of type loadstart.

UA は読み込み処理の完了時に(読み込みが完了しリソースの描画準備が整い次第) ProgressEvent を配送しなければならない。 このイベントの型は loadend になる。 The user agent must dispatch a ProgressEvent at the end of a load operation (i.e. after load is complete and the user agent is ready to render the corresponding resource). This event is of type loadend.

UA は loadstart イベントと loadend イベントの間に ProgressEvent を配送してもよい。 それらのイベントの型は progress になる。 The user agent may dispatch ProgressEvents between the loadstart event and the loadend events. Such events are of type progress.

ProgressEvents になる Event 型は: progress, loadstart, loadend Event types that are ProgressEvents: progress, loadstart, loadend.

IDL 定義
interface ProgressEvent : Event
{
	readonly attribute boolean lengthComputable;
	readonly attribute unsigned long loaded;
	readonly attribute unsigned long total;
};
定数は定義されない
属性
lengthComputable
値 false は全バイト数を算出できないことを表し、 total の値は無視されるべきになる。 これはダウンロードするリソースのサイズが未知の場合や、データがすでに到着している場合に生じ得る。 If false the total number of bytes (total) cannot be computed and the value of total should be ignored. This might occur if the size of the downloaded resource is unknown or if the data has already arrived.
loaded
ダウンロードが開始されてからダウンロードされたバイト数を指定する。 この値は loadstartloadend イベントでは無視される。 Specifies the number of bytes downloaded since the beginning of the download. This value is ignored for a loadstart or loadend event.
total
読み込み処理に予期される全バイト数を指定する。 progress イベントでは予期されている全バイト数を指定すべきである。 Specifies the expected total number of bytes expected in a load operation. For a progress event, it should specify the total number of bytes expected.
メソッドは定義されない
Example: ProgressEvent
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:ev="http://www.w3.org/2001/xml-events"
     version="1.2" baseProfile="tiny" width="300" height="430">

  <script><![CDATA[
    function showImage(imageHref) {
      var image = document.getElementById('myImage');
      image.setTraitNS("http://www.w3.org/1999/xlink", "href", imageHref);
    }

    function imageLoadStart(evt) {
      var progressBar = document.getElementById('progressBar');
      var loadingAnimation = document.getElementById('loadingAnimation');
      progressBar.setFloatTrait("width", 0);
      loadingAnimation.beginElement();
    }

    function imageLoadProgress(evt) {
      if (evt.lengthComputable) {
        var progressBar = document.getElementById('progressBar');
        progressBar.setFloatTrait("width", 100 * (evt.loaded / evt.total));
        progressBar.setTrait("display", "inline");
      }
    }

    function imageLoadComplete(evt) {
      var progressBar = document.getElementById('progressBar');
      var loadingAnimation = document.getElementById('loadingAnimation');
      progressBar.setTrait("display", "none");
      loadingAnimation.endElement();
    }
  ]]></script>

  <image xml:id="myImage" xlink:href="imageA.png" width="300" height="400">
    <handler ev:event="loadstart">
      imageLoadStart(evt);
    </handler>

    <handler ev:event="progress">
      imageLoadProgress(evt);
    </handler>

    <handler ev:event="loadend">
      imageLoadComplete(evt);
    </handler>
  </image>

  <rect rx="4" x="50" y="400" width="200" height="30" cursor="pointer">
    <handler ev:event="click">
      showImage('imageB.png');
    </handler>
  </rect>
  <text x="150" y="420" font-size="15" fill="white" text-anchor="middle"
        text-decoration="underline" pointer-events="none">
    Load other image
  </text>

  <g display="none">
    <rect x="100" y="300" height="10" width="100" fill="black"/>
    <rect xml:id="progressBar" x="100" y="300" width="50" height="10" fill="lime"/>
  </g>
  <text x="150" y="330" font-size="15" text-anchor="middle" display="none">
    Loading...
    <animate xml:id="loadingAnimation" attributeName="display"
             begin="indefinite" dur="2s" repeatDur="indefinite"
             calcMode="discrete" values="inline; none"/>
  </text>
</svg>

A.7 Module: smil

SMIL API からサブセット化された単一のインターフェースを含む。 Contains a single subsetted interface from the SMIL APIs.

A.7.1 ElementTimeControl

このインターフェースはアニメーションのふるまいを定義する要素に共通の、 SMIL ( timed 要素svg 要素)と互換性のあるメソッドを定義する。 This interface defines common methods for elements which define animation behaviors compatible with SMIL (timed elements and the 'svg' element).

このインターフェースは SMIL Animation [SMILANIM] で定義されている ElementTimeControl インターフェースのサブセットになる。 This interface is a subset of the ElementTimeControl interface defined in SMIL Animation [SMILANIM].

注記:一時停止機能については SVGTimedElement インターフェースを見よ。 Note: See the SVGTimedElement interface for pause functionality.

IDL 定義
interface ElementTimeControl
{
	void beginElementAt(in float offset);
	void beginElement();
	void endElementAt(in float offset);
	void endElement();
};
定数は定義されない
属性は定義されない
メソッド
beginElementAt
現在の時刻に指定された時間差で加算または減算された開始 instance 時刻を作成する。 新しい instance 時刻 は begin instance times list に追加される。 Creates a begin instance time for the current time plus or minus the specified offset. The new instance time is added to the begin instance times list.
パラメタ
in float offset 要素開始への秒単位の時間差。 The offset in seconds at which to begin the element.
返り値無し
例外無し
beginElement
現在の時刻に対する開始 instance 時刻を作成する。 新しい instance 時刻は begin instance times list に追加される。 これは beginElementAt(0) と等価である。 Creates a begin instance time for the current time. The new instance time is added to the begin instance times list. This is equivalent to beginElementAt(0).
パラメタ無し
返り値無し
例外無し
endElementAt
現在の時刻との指定された時間差により加算または減算された停止時刻インスタンスを作成する。 新しい時刻インスタンスは end instance times list に追加される。 Creates an end instance time for the current time plus or minus the specified offset. The new instance time is added to the end instance times list.
パラメタ
in float offset 要素停止への秒単位の時間差。 The offset in seconds at which to end the element.
返り値無し
例外無し
endElement
現在の時刻に対する停止時刻インスタンスを作成する。 新しい時刻インスタンスは end instance times list に追加される。 これは endElementAt(0) と等価である。 Creates an end instance time for the current time. The new instance time is added to the end instance times list. This is equivalent to endElementAt(0).
パラメタ無し
返り値無し
例外無し

A.7.2 TimeEvent

TimeEvent インターフェースは文書のアニメーションにより発火されたイベントの文脈情報を提供するために利用される。 これは SMIL Animation ([SMILANIM], 6.2 節) で定義されている TimeEvent interface のサブセットになる。 TimeEvent is an interface used to provide contextual information for events fired by animations in the document. It is a subset of the TimeEvent interface defined in SMIL Animation ([SMILANIM], section 6.2).

Event はすべての timed 要素 から発火される。 Event that is fired by all timed elements.

TimeEvents になる Event 型は beginEvent, endEvent, repeatEvent Event types that are TimeEvents: beginEvent, endEvent, repeatEvent.

IDL 定義
interface TimeEvent : Event
{
	readonly attribute long detail;
};
定数は定義されない
属性
detail
TimeEvent についての詳細情報を指定する。 情報はイベントの型に依存する。 beginEventendEvent においては detail フィールドは利用されない。 repeatEventdetail フィールドには現在の反復回数が含まれる。 Specifies detailed information about the TimeEvent, the information depends on the type of event. For beginEvent and endEvent the detail field is not used. For repeatEvent the detail field contains the current repeat iteration.
メソッドは定義されない

A.8 Module: svg

A.8.1 SVGException

投げられる例外のうち SVG 特有のもの。 An exception thrown for SVG-specific errors.

このインターフェースは SVG 1.1 ([SVG11], B.3 節) の SVGException インターフェースと同一である。 This interface is identical to SVGException interface defined in SVG 1.1 ([SVG11], section B.3).

IDL 定義
exception SVGException
{
	unsigned short code;
};

// ExceptionCode
const unsigned short SVG_WRONG_TYPE_ERR         = 0;
const unsigned short SVG_INVALID_VALUE_ERR      = 1;
const unsigned short SVG_MATRIX_NOT_INVERTABLE  = 2;
定数
SVG_WRONG_TYPE_ERR
定義 参照。
SVG_INVALID_VALUE_ERR
定義 参照。
SVG_MATRIX_NOT_INVERTABLE
定義 参照。
属性は定義されない
メソッドは定義されない

A.8.2 SVGDocument

IDL 定義
interface SVGDocument : Document, EventTarget
{
};
定数は定義されない
属性は定義されない
メソッドは定義されない

A.8.3 SVGUseElement

このインターフェースは use 要素を表現する。 SVG 1.2 Tiny においては、このインターフェースには継承されるもの以外に追加のメソッドは存在しない。 これは他の SVG のプロファイルとアーキテクチャの一貫性を保つために含められている。 This interface represents the 'use' element. In SVG 1.2 Tiny this interface has no additional methods to those it inherits; it is included for architectural consistency with other profiles of SVG.

IDL 定義
interface SVGUseElement : SVGLocatableElement
{
};
定数は定義されない
属性は定義されない
メソッドは定義されない

A.8.4 SVGElementInstance

uDOM は各 use 要素の参照先の内容を SVGElementInstance オブジェクトの shadow 木 で表現する。 For each 'use' element, the uDOM represents the referenced content with a shadow tree of SVGElementInstance objects.

このインターフェースは SVG 1.1 ([SVG11], 5.17 節) で定義されている SVGElementInstance インターフェースのサブセットになる。 This interface is a subset of the SVGElementInstance interface defined in SVG 1.1 ([SVG11], section 5.17).

IDL 定義
interface SVGElementInstance : EventTarget
{
	readonly attribute SVGElement correspondingElement;
	readonly attribute SVGUseElement correspondingUseElement;
};
定数は定義されない
属性
correspondingElement
correspondingElement 参照。
correspondingUseElement
correspondingUseElement 参照。
メソッドは定義されない

下の例で、3つの use 要素が同じ rect 要素を参照している。 各 use は異なる fill プロパティを持ち、利用される rect へ継承される。 その結果、3つの rect は異なる色の fill になる。 これら3つの rect のどれでも1つをクリックすると4番目の rect の色がクリックされたものと同じになる。 注意すべきは、参照先の rectdefs 要素内で定義されていなかった場合、その rect がクリックされたときにスクリプトが例外を投げることである。 これは currentTarget 属性が correspondingUseElement 属性を持たない SVGElement を返すことになるからである。 In the example below, three 'use' elements use the same 'rect' element. Each 'use' has different 'fill' properties that are inherited down to the used 'rect'. The result is three 'rect' elements with different 'fill' colors. Clicking one of these three 'rect' elements will cause a fourth 'rect' to change color to match the clicked one. Worth noticing is that if the original 'rect' had not been in the 'defs' element the script would throw an exception when the original 'rect' is clicked. This is because the currentTarget attribute would return an SVGElement that doesn't have the correspondingUseElement attribute.

Example: SVGElementInstance ( ECMAScript )インターフェースの用法
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:ev="http://www.w3.org/2001/xml-events"
     version="1.2" baseProfile="tiny" width="640" height="480" viewBox="0 0 640 480">

  <defs>
    <rect xml:id="r1" width="90" height="65"/>
  </defs>

  <use xlink:href="#r1" x="50" y="200" fill="red"/>
  <use xlink:href="#r1" x="250" y="200" fill="blue"/>
  <use xlink:href="#r1" x="450" y="200" fill="green"/>

  <rect xml:id="r2" x="250" y="50" width="90" height="65"/>

  <ev:listener observer="r1" event="ev:click" handler="#handler"/>

  <handler xml:id="handler" type="application/ecmascript">changeColor(evt);</handler>

  <script type="application/ecmascript">
    var target = document.getElementById("r2");

    function changeColor(evt) {
      var useElement = evt.currentTarget.correspondingUseElement;
      target.setRGBColorTrait("fill", useElement.getRGBColorTrait("fill"));
    }
  </script>
</svg>

A.8.5 SVGSVGElement

このインターフェースは SVG 文書木の svg 要素を表現する。 This interface represents the 'svg' element in the SVG document tree.

UA 変換

uDOM 属性 currentScale, currentRotate, currentTranslate は組み合わせられて、 SVG 文書の最も外側のレベル(すなわち svg 要素の外側)に適用される UA 変換を形成する。 これらの値は「拡大縮小表示」が有効の場合(すなわち zoomAndPan 属性が magnify に設定されている)、 UA 固有の UI により変更され得る。 UA 変換は次の行列の積により得られる: The uDOM attributes currentScale, currentRotate and currentTranslate are combined to form a user agent transformation which is applied at the outermost level on the SVG document (i.e. outside the 'svg' element). Their values can potentially be modified through user agent specific UI, if "magnification" is enabled (i.e., 'zoomAndPan' attribute is set to magnify). User agent transformation can be obtained by multiplying the matrix

 [currentScale      0       currentTranslate.x]         [cos(currentRotate) -sin(currentRotate 0]
 [     0      currentScale  currentTranslate.y]  by     [sin(currentRotate) cos(currentRotate) 0]
 [     0            0               1         ]         [         0                  0         1]
 

すなわち、並進, 拡縮, 回転の順に座標系変換が行われる。 拡縮と回転の基準点は原点 (0, 0) になる。 That is, translate, then scale, then rotate the coordinate system. The reference point for scale and rotate operations is the origin (0, 0).

IDL 定義
interface SVGSVGElement : SVGLocatableElement, SVGTimedElement
{
	const unsigned short NAV_AUTO           = 1;
	const unsigned short NAV_NEXT           = 2;
	const unsigned short NAV_PREV           = 3;
	const unsigned short NAV_UP             = 4;
	const unsigned short NAV_UP_RIGHT       = 5;
	const unsigned short NAV_RIGHT          = 6;
	const unsigned short NAV_DOWN_RIGHT     = 7;
	const unsigned short NAV_DOWN           = 8;
	const unsigned short NAV_DOWN_LEFT      = 9;
	const unsigned short NAV_LEFT           = 10;
	const unsigned short NAV_UP_LEFT        = 11;
	attribute float currentScale;
	attribute float currentRotate;
	readonly attribute SVGPoint currentTranslate;
	readonly attribute SVGRect viewport;
	float getCurrentTime();
	void setCurrentTime(in float seconds);
	SVGMatrix createSVGMatrixComponents(in float a, in float b, in float c, in float d, in float e, 
	                                    in float f);
	SVGRect createSVGRect();
	SVGPoint createSVGPoint();
	SVGPath createSVGPath();
	SVGRGBColor createSVGRGBColor(in float red, in float green, in float blue) 
		raises(SVGException);
	void moveFocus(in unsigned short motionType) 
		raises(DOMException);
	void setFocus(in EventTarget theObject) 
		raises(DOMException);
	EventTarget getCurrentFocusedObject();
};
定数
NAV_AUTO
フォーカスを UA 自身のアルゴリズムによる次のフォーカス可能なオブジェクトへ移動させなければならないことを指示する。 Indicates that focus must move to the next focusable object according to the user agent's own algorithm.
NAV_NEXT
フォーカスを現在の nav-next 値に従い、次のフォーカス可能なオブジェクトへ移動させなければならないことを指示する。 Indicates that focus must move to the next focusable object according to current 'nav-next' value.
NAV_PREV
フォーカスを現在の nav-prev 値に従い、前のフォーカス可能なオブジェクトへ移動させなければならないことを指示する。 Indicates that focus must move to the previous focusable object according to current nav-prev value.
NAV_UP
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_UP_RIGHT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_RIGHT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_DOWN_RIGHT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_DOWN
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_DOWN_LEFT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_LEFT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
NAV_UP_LEFT
与えられた方角へのフォーカス移動が要請されたことを指示する。 Indicates a request that focus must move in the given direction.
属性
currentScale
現在の UA 拡縮(ズーム)係数。 currentScale の初期値は 1 。 The current user agent scale (zoom) coefficient. The initial value for currentScale is 1.
currentRotate
現在の UA 回転角(度)。 currentRotate の初期値は 0 。 The current user agent rotation angle in degrees. The initial value for currentRotate is 0.
currentTranslate
スクロールとパンで用いられる現在の UA 並進。 返される SVGPoint オブジェクトは「生きて」おり、その xy 成分に値を設定すると UA による並進も変化する。 currentTranslate の初期値は値 (0, 0) の SVGPoint オブジェクト。 The current user agent translation used for scrolling or panning. The returned SVGPoint object is "live" and setting its x and y components will change the user agent's translation. The initial for currentTranslate is an SVGPoint object with the value (0, 0).
viewport

この svg 要素に対応する(暗黙または明示的な) ビューポート の位置とサイズ。 UA が内容を実際に描画する際、位置とサイズ値は描画の際の実際の値を表現する。 The position and size of the viewport (implicit or explicit) that corresponds to this 'svg' element. When the user agent is actually rendering the content, then the position and size values represent the actual values when rendering.

この SVG 文書が( HTML の object 要素などにより)他の文書に埋め込まれている場合、位置とサイズは親の文書の座標系に対応する単位の無い値になる(親が CSS または XSL によるレイアウトを用いている場合、 CSS 2 仕様に従い、単位の無い値は現在の CSS または XSL のビューポートの画素単位になる)。 親の要素が座標系を持っていない場合、 UA はこの属性に適切な既定値を与えるべきである。 If this SVG document is embedded as part of another document (e.g., via the HTML 'object' element), then the position and size are unitless values in the coordinate system of the parent document. (If the parent uses CSS or XSL layout, then unitless values represent pixel units for the current CSS or XSL viewport, as described in the CSS 2 specification.) If the parent element does not have a coordinate system, then the user agent should provide reasonable default values for this attribute.

独立 SVG 文書に対しては、 'x''y' いずれも0でなければならず, 'width''height' はそれぞれホスト環境から内容描画域として SVG-UA に提供されたビューポートの幅と高さでなければならない。 すべての値はホスト環境からの画素座標系の値を表す。 この画素座標系は、 HTML の画素座標系と一致し, CSS 2 仕様に述べられている画素座標系のモデルに合致することが好ましい。 「画素座標系」はホスト固有なのに注意。 ホストは画素座標系に実際の機器の画素を利用することもあれば, (特に高解像度機器においては) SVG と CSS の "px" に一致する疑似的な機器画素も利用し得る。 For stand-alone SVG documents, both 'x' and 'y' must be zero, the 'width' must be the width of the viewport which the host environment provides to the SVG-UA into which it can render its content, and the 'height' must be the height of the viewport, with all values expressed in the pixel coordinate system from the host environment, preferably such that this pixel coordinate system matches the same pixel coordinate system presented to HTML and matches the model for pixel coordinates described in the CSS 2 specification. Note that "pixel coordinate systems" are host-specific. Two possible approaches that hosts might use for pixel coordinate systems are actual device pixels or (particularly for high-resolution devices) pseudo device pixels which exactly match SVG and CSS's "px" coordinates.

オブジェクト自身とその内容はいずれも読み取り専用になる。 それらへの変更はエラーコード NO_MODIFICATION_ALLOWED_ERR の DOMException を生じさせる。 返される SVGRect オブジェクトは「生きて」おり、すなわち、 x, y, width, height 属性はビューポートのサイズと位置が変化した際に自動的に更新される。 The object itself and its contents are both readonly. A DOMException with error code NO_MODIFICATION_ALLOWED_ERR is raised if an attempt is made to modify it. The returned SVGRect object is "live", i.e. its x, y, width and height attributes are automatically updated if the viewport size or position changes.

メソッド
getCurrentTime

文書時刻 を秒単位で返す。 Returns the document time in seconds.

文書時間軸が開始される前に getCurrentTime が呼び出された場合(例えば、 playbackOrder 'onLoad' に設定された 最も根元の 'svg' 要素load イベントが配送される前に、実行中の script 要素から)、 0 が返される。 If getCurrentTime is called before the document timeline has begun (for example, by script running in a 'script' element before the rootmost 'svg' element's load event is dispatched, when 'playbackOrder' is set to 'onLoad'), then 0 is returned.

返り値
float 秒単位の現在の 文書時刻 、または文書時間軸がまだ開始されていない場合は 0 。 The current document time, in seconds, or 0 if the document timeline has not yet begun.
パラメタ無し
例外無し
setCurrentTime

文書時刻 (秒)を設定する。 この API は時間軸での前後への移行をサポートするために要求される。 移行後は、アニメーションは新たな時刻から(未来方向への)再生を継続する。 seconds が負の場合、文書は時刻 0 秒へ移行する。 Sets the document time (in seconds). This API is required to support seeking forwards and backwards in the timeline. After a seek, animation continues to play (forwards) from the new time. If seconds is negative, then the document will seek to time 0s.

文書の時間軸が開始される前に setCurrentTime が呼び出された場合(例えば、 playbackOrder 'onLoad' に設定された 最も根元の 'svg' 要素load イベントが配送される前に、実行中の script 要素から)、文書時間軸が開始された際に、このメソッドの最も最新の呼び出しによる seconds の値の時刻へ文書時刻が移行する。 If setCurrentTime is called before the document timeline has begun (for example, by script running in a 'script' element before the rootmost 'svg' element's load event is dispatched, when 'playbackOrder' is set to 'onLoad'), then the value of seconds in the most recent invocation of the method gives the time that the document time will be seeked to once the document timeline has begun.

パラメタ
in float seconds 文書時刻 が移行する時刻(秒)。 The document time to seek to, in seconds.
返り値無し
例外無し
createSVGMatrixComponents
新しい SVGMatrix オブジェクトを作成する。 このオブジェクトを setMatrixTrait メソッドを用いて SVGMatrix 型と互換性のある trait の値の変更に利用できる。 行列の内部表現は次のようになる: Creates a new SVGMatrix object. This object can be used to modify the value of traits which are compatible with the SVGMatrix type using the setMatrixTrait method. The internal representation of the matrix is as follows:
  [  a  c  e  ]
  [  b  d  f  ]
  [  0  0  1  ]
 
パラメタ
in float a 設定する行列の a 成分。 The a component of the matrix to be set.
in float b 設定する行列の b 成分。 The b component of the matrix to be set.
in float c 設定する行列の c 成分。 The c component of the matrix to be set.
in float d 設定する行列の d 成分。 The d component of the matrix to be set.
in float e 設定する行列の e 成分。 The e component of the matrix to be set.
in float f 設定する行列の f 成分。 The f component of the matrix to be set.
返り値
SVGMatrix 作成された SVGMatrix オブジェクト。 The created SVGMatrix object.
例外無し
createSVGRect
新しい SVGRect オブジェクトを作成する。 このオブジェクトを setRectTrait メソッドを用いて SVGRect 型と互換性のある trait の値の変更に利用できる。 作成された SVGRectx, y, width, height の初期値は 0 。 Creates a new SVGRect object. This object can be used to modify the value of traits which are compatible with the SVGRect type using the setRectTrait method. The initial values for x, y, width and height of this new SVGRect are zero.
パラメタ無し
返り値
SVGRect 作成された SVGRect The created SVGRect.
例外無し
createSVGPoint
新しい SVGPoint オブジェクトを作成する。 作成された SVGPointxy の初期値は 0 。 Creates a new SVGPoint object. The initial values for x and y of this new SVGPoint are zero.
パラメタ無し
返り値
SVGPoint 作成された SVGPoint The created SVGPoint.
例外無し
createSVGPath
新しい SVGPath オブジェクトを作成する。 このオブジェクトを setPathTrait メソッドを用いて SVGPath 型と互換性のある trait の値の変更に利用できる。 Creates a new SVGPath object. This object can be used to modify the value of traits which are compatible with the SVGPath type using the setPathTrait method.
パラメタ無し
返り値
SVGPath 作成された SVGPath The created SVGPath.
例外無し
createSVGRGBColor
新しい SVGRGBColor オブジェクトを作成する。 このオブジェクトを setRGBColorTrait メソッドを用いて SVGRGBColor 型と互換性のある trait の値の変更に利用できる。 パラメタは各色成分ごとに1個の浮動小数点数になる。 値 0.0 は色成分の明度 0, 255.0 は色成分の最大明度を表現する。 rgb(%,%,%) の構文による色は成分が小数になり得る。 色域外の成分は 0.0 より小さいか 255.0 より大きい値になり得る。 Creates a new SVGRGBColor object. This object can be used to modify the value of traits which are compatible with the SVGRGBColor type using the setRGBColorTrait method. The parameters are floats, one per color component. 0.0 represents zero intensity and 255.0 represents full intensity of a given color component. Colors originally in the rgb(%,%,%) syntax may have fractional components. Out of gamut colors may have component values less than 0.0 or greater than 255.0.
パラメタ
in float red SVGRGBColor の赤成分。 The red component of the SVGRGBColor.
in float green SVGRGBColor の緑成分。 The green component of the SVGRGBColor.
in float blue SVGRGBColor の青成分。 The blue component of the SVGRGBColor.
返り値
SVGRGBColor 作成された SVGRGBColor The created SVGRGBColor.
例外無し
moveFocus
パラメタの値に基づいて現在のフォーカスを異なるオブジェクト移動させる。 UA は新たにフォーカスを得るオブジェクトを決定する際に、文書内で現在フォーカスを得ているオブジェクトを計算に入れなければならない。 Moves the current focus to a different object based on the value of the parameter. The user agent must take into account the currently focused object in the document in order to find the new focused object.

このメソッドが成功した場合: If this method succeeds:

  • 前にフォーカスを得ていたオブジェクトを標的とする DOMFocusOut イベントが配送されなければならない。 A DOMFocusOut event must be dispatched which has the previously focused object as the event target.
  • しかる後、新たにフォーカスを得たオブジェクトを標的とする DOMFocusIn イベントが配送されなければならない。 After that, a DOMFocusIn event must dispatched which has the the new focused object as the event target.

新たにフォーカスを得たオブジェクトへの参照は、生成された DOMFocusIn イベントの EventTarget インターフェースを用いて取得できる。 A reference to the new focused object can be obtained using the EventTarget interface of the generated DOMFocusIn event.

ナビゲーションがどのように管理されるかについては ナビゲーション の節を見よ。 このメソッドのふるまいは、スクリプトからでなく末端利用者から等価な動きがなされた場合と同じでなければならない(例えばジョイスティックの利用や Tab キーの押し下げなど)。 Refer to the navigation section for a description of how navigation is managed. The behavior for this method must be the same as if an equivalent move was done by the end user (for example by using a joystick or pressing the Tab key) and not by scripting.

メソッドが失敗した場合(すなわち DOMException が生じる)、フォーカスは現在フォーカスを得ているオブジェクトに留まらなければならず、 DOMFocusOut, DOMFocusIn イベントは配送されない。 Whenever the method fails (that is, when a DOMException is raised), focus must stay on the currently focused object and no DOMFocusOut/DOMFocusIn event is dispatched.

注記:独立 SVG 文書に対しては、 UA は常にフォーカスを得ているオブジェクトを持っていなければならない。 初期状態では SVGDocument がフォーカスを得る。 Note: For stand-alone SVG documents, the user agent must always have a currently focused object. At the beginning, the SVGDocument has focus.

パラメタ
in short motionType 移動の型。 The type of motion.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された移動の型がサポートされてない(インターフェースの定数でない)際にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested motion type is not supported (i.e. not one of the interface constants).
DOMException INVALID_ACCESS_ERR: 現在フォーカスを得ているオブジェクトが要請された移動の型に対応する ナビゲーション属性 値を持っていない場合にレイズされる。 例えば、 nav-up 属性を持たない要素に対し moveFocus(NAV_UP) が呼び出されたときなど。 INVALID_ACCESS_ERR: Raised if the currently focused object doesn't have a navigation attribute value corresponding to the requested motion type. For instance, if a moveFocus(NAV_UP) is called on an element which has no 'nav-up' attribute.
DOMException INVALID_STATE_ERR: 現在フォーカスを得ているオブジェクトが要請された移動の型に対応する ナビゲーション属性 値を持ってはいるが、属性が指す対象が存在しない場合やフォーカスされ得ないオブジェクトだった場合にレイズされる。 例えば、 nav-up 属性を持つ要素に対し moveFocus(NAV_UP) が呼び出されたが、この属性の値がフォーカスされ得ないオブジェクトを参照しているときなど。 INVALID_STATE_ERR: Raised if the currently focused object has a navigation attribute value corresponding to the requested motion type but the target indicated in this attribute can not be found or is not a focusable object. For instance, if a moveFocus(NAV_UP) is called on an object which has a 'nav-up' attribute but the value of this attribute references an element which is not focusable.
setFocus
与えられたオブジェクトへのフォーカスを要請する。 A request to put the focus on the given object.

このメソッドが成功した場合: If this method succeeds:

  • 前にフォーカスを得ていたオブジェクトを標的とする DOMFocusOut イベントが配送されなければならない。 A DOMFocusOut event must be dispatched which has the previously focused object as the event target.
  • しかる後、新たにフォーカスを得たオブジェクトを標的とする DOMFocusIn イベントが配送されなければならない。 After that, a DOMFocusIn event must be dispatched which has the the new focused object as the event target.

新たにフォーカスを得たオブジェクトへの参照は、生成された DOMFocusIn イベントの EventTarget インターフェースを用いて取得できる。 A reference to the newly focused object can be obtained using the EventTarget interface of the generated DOMFocusIn event.

メソッドが失敗した場合(すなわち DOMException が生じる)、フォーカスは現在フォーカスを得ているオブジェクトに留まらなければならず、 DOMFocusOut, DOMFocusIn イベントは配送されない。 Whenever the method fails (that is, when a DOMException is raised), focus must stay on the currently focused object and no DOMFocusOut or DOMFocusIn event is dispatched.

注記:独立 SVG 文書に対しては、 UA は常にフォーカスを得ているオブジェクトを持っていなければならない。 初期状態では SVGDocument がフォーカスを得る。 Note: For stand-alone SVG documents, the user agent must always have a currently focused object. At the beginning, the SVGDocument has focus.

パラメタ
in EventTarget theObject フォーカスを得るべきオブジェクト。 The object which should receive focus.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: パラメタ in が Node または SVGElementInstance でない場合、あるいは、要請された要素がフォーカスされ得ない場合(すなわち、 focusable 属性にそのように指示されている)、レイズされる。 NOT_SUPPORTED_ERR: Raised if the in parameter is not a Node or SVGElementInstance, or if the requested element is not focusable (i.e. its 'focusable' attribute indicates that the element is not focusable).
getCurrentFocusedObject
フォーカスを得たオブジェクトへの参照を返す。 これは EventTarget を返す。 Returns a reference to the object which has the focus. This returns an EventTarget .
パラメタ無し
返り値
EventTarget object 現在フォーカスを得ているオブジェクト。 The currently focused object.
例外無し

A.8.6 SVGRGBColor

このインターフェースは赤, 緑, 青成分からなる色値を表現する。 fill, stroke, color などの色値を格納する trait の読み書きに利用できる( getRGBColorTrait を用いるなど)。 This interface represents a color value made up of red, green, and blue components. It can be used to read and write traits that store color values (using getRGBColorTrait) such as 'fill', 'stroke', and 'color'.

IDL 定義
interface SVGRGBColor
{
	attribute unsigned long red;
	attribute unsigned long green;
	attribute unsigned long blue;
};
定数は定義されない
属性
red
SVGRGBColor の赤成分を返す。 Returns the red component of the SVGRGBColor.
green
SVGRGBColor の緑成分を返す。 Returns the green component of the SVGRGBColor.
blue
SVGRGBColor の青成分を返す。 Returns the blue component of the SVGRGBColor.
メソッドは定義されない

A.8.7 SVGRect

このインターフェースは、最小の x, 最小の y, 幅, 高さの値からなる SVGRect データ型を表現する。 This interface represents an SVGRect datatype, consisting of a minimum x, minimum y, width and height values.

このインターフェースは SVG 1.1 ([SVG11], 4.3 節) で定義されている SVGRect インターフェースと同一である。 This interface is identical to SVGRect interface defined in SVG 1.1 ([SVG11], section 4.3).

IDL 定義
interface SVGRect
{
	attribute float x;
	attribute float y;
	attribute float width;
	attribute float height;
};
定数は定義されない
属性
x
x 参照。
y
y 参照。
width
width 参照。
height
height 参照。
メソッドは定義されない

A.8.8 SVGPoint

xy 成分で同定される SVGPoint データ型を表現する。 Represents an SVGPoint datatype, identified by its x and y components.

このインターフェースは SVG 1.1 ([SVG11], 4.3 節) で定義されている SVGPoint インターフェースと同一である。 This interface is identical to SVGPoint interface defined in SVG 1.1 ([SVG11], section 4.3).

IDL 定義
interface SVGPoint
{
	attribute float x;
	attribute float y;
	SVGPoint matrixTransform(in SVGMatrix matrix);
};
定数は定義されない
属性
x
x 参照。
y
y 参照。
メソッド
matrixTransform
matrixTransform 参照。

A.8.9 SVGPath

このインターフェースはパスの幾何を定義する SVGPath データ型を表現する。 This interface represents an SVGPath datatype used to define path geometry.

このインターフェースを用いて作成または変更されたパスデータは パスの正規化 で定められた規則に従って正規化されなければならない。 しかしながら、クエリ目的のパスデータは正規化されている必要は無い。 【クエリ目的("just queried"):引数として渡す場合?】 Path data created or modified using this interface must be normalized as per the rules given in Path Normalization. However, path data that is just queried need not be normalized.

IDL 定義
interface SVGPath
{
	const unsigned short MOVE_TO = 77;
	const unsigned short LINE_TO = 76;
	const unsigned short CURVE_TO = 67;
	const unsigned short QUAD_TO = 81;
	const unsigned short CLOSE = 90;
	readonly attribute unsigned long numberOfSegments;
	unsigned short getSegment(in unsigned long cmdIndex) 
		raises(DOMException);
	float getSegmentParam(in unsigned long cmdIndex, in unsigned long paramIndex) 
		raises(DOMException);
	void moveTo(in float x, in float y);
	void lineTo(in float x, in float y);
	void quadTo(in float x1, in float y1, in float x2, in float y2);
	void curveTo(in float x1, in float y1, in float x2, in float y2, in float x3, in float y3);
	void close();
};
定数
MOVE_TO
"move to" 命令を表現する。 数値は文字 "M" の Unicode 符号位置。 Represents a "move to" command. The numeric value is the Unicode codepoint of the letter "M".
LINE_TO
"line to" 命令を表現する。 数値は文字 "L" の Unicode 符号位置。 Represents a "line to" command. The numeric value is the Unicode codepoint of the letter "L".
CURVE_TO
"3次ベジェ curve to" 命令を表現する。 数値は文字 "C" の Unicode 符号位置。 Represents a "cubic Bézier curve to" command. The numeric value is the Unicode codepoint of the letter "C".
QUAD_TO
"2次ベジェ curve to" 命令を表現する。 数値は文字 "Q" の Unicode 符号位置。 Represents a "quadrative Bézier curve to" command. The numeric value is the Unicode codepoint of the letter "Q".
CLOSE
"close" 命令を表現する。 数値は文字 "Z" の Unicode 符号位置。 Represents a "close" command. The numeric value is the Unicode codepoint of the letter "Z".
属性
numberOfSegments
このパスの区分数を返す。 Return number of segments in this path.
メソッド
getSegment
ゼロベースで数えた命令インデックスに位置する区分の命令を返す。 Returns segment command by zero-based command index.
パラメタ
in unsigned long cmdIndex 取得する区分の命令インデックス。 The command index for the segment command to retrieve.
返り値
unsigned short 区分の命令。 MOVE_TO, LINE_TO, CURVE_TO, QUAD_TO, CLOSE のいずれか。 The segment command. One of MOVE_TO, LINE_TO, CURVE_TO, QUAD_TO or CLOSE .
例外
DOMException INDEX_SIZE_ERR: 区分のインデックスが範囲外の場合にレイズされる。 INDEX_SIZE_ERR: Raised if the segment index is out of bounds.
getSegmentParam
ゼロベースの命令インデックスに位置する区分のゼロベースのパラメタインデックスに位置する区分パラメタを返す。 Returns segment parameter by zero-based command index and zero-based parameter index.
パラメタ
in unsigned long cmdIndex 区分の命令インデックス。 The command index for the segment command.
in unsigned long paramIndex 取得するパラメタのパラメタインデックス。 The parameter index to retrieve.
返り値
float 区分パラメタ。 The segment parameter.
例外
DOMException INDEX_SIZE_ERR: 区分インデックスが範囲外の場合、またはパラメタインデックスが指定された区分の型の範囲外の場合にレイズされる。 INDEX_SIZE_ERR: Raised if the segment index is out of bounds, or the parameter index is out of bounds for the specified segment's type.
moveTo
'M' (絶対 move )区分を指定された座標と伴にパスに追加する。 Appends an 'M' (absolute move) segment to the path with the specified coordinates.
パラメタ
in float x 指定された点のX座標。 The x-axis coordinate for the specified point.
in float y 指定された点のY座標。 The y-axis coordinate for the specified point.
返り値無し
例外無し
lineTo
'L'(絶対 line )区分を指定された座標と伴にパスに追加する。 Appends an 'L' (absolute line) segment to the path with the specified coordinates.
パラメタ
in float x 指定された点のX座標。 The x-axis coordinate for the specified point.
in float y 指定された点のY座標。 The y-axis coordinate for the specified point.
返り値無し
例外無し
quadTo
'Q' (絶対 quadratic curve )区分を指定された座標と伴にパスに追加する。 Appends a 'Q' (absolute quadratic curve) segment to the path.
パラメタ
in float x1 第一制御点のX座標。 The x-axis coordinate of the first control point.
in float y1 第一制御点のY座標。 The y-axis coordinate of the first control point.
in float x2 終端点のX座標。 The x-axis coordinate of the final end point.
in float y2 終端点のY座標。 The y-axis coordinate of the final end point.
返り値無し
例外無し
curveTo
'C' (絶対 cubic curve )区分を指定された座標と伴にパスに追加する。 Appends a 'C' (absolute cubic curve) segment to the path.
パラメタ
in float x1 第一制御点のX座標。 The x-axis coordinate of the first control point.
in float y1 第一制御点のY座標。 The y-axis coordinate of the first control point.
in float x2 第二制御点のX座標。 The x-axis coordinate of the second end point.
in float y2 第二制御点のY座標。 The y-axis coordinate of the second end point.
in float x3 終端点のX座標。 The x-axis coordinate of the final end point.
in float y3 終端点のY座標。 The y-axis coordinate of the final end point.
返り値無し
例外無し
close
'z' (close path )区分をパスに追加する。 Appends a 'z' (close path) segment to the path.

A.8.10 SVGMatrix

このインターフェースはアフィン変換を表現する行列である。 transform 属性の値の読み取りと変更に利用できる。 This interface is a matrix, as is used to represent an affine transform. It can be used to read and modify the values of the 'transform' attribute.

注記:このインターフェースの mTranslate, inverse, mMultiply, mScale, mRotate メソッドは SVGMatrix オブジェクトを変更し、必要な行列操作を行った後に SVGMatrix インスタンス自身への参照を返す。 Note: The mTranslate, inverse, mMultiply, mScale and mRotate methods in this interface mutate the SVGMatrix object and return a reference to the SVGMatrix instance itself, after performing the necessary matrix operation.

この行列は、元の座標 (x, y) を縦ベクトルとみなして次のように座標ベクトルと行列の積をとり、行き先の座標 (x', y') へ変換する: This matrix transforms source coordinates (x, y) into destination coordinates (x', y') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:

    [ x' ]    [  a  c  e  ]   [ x ]    [ a.x + c.y + e ]
    [ y' ] =  [  b  d  f  ]   [ y ] =  [ b.x + d.y + f ]
    [ 1  ]    [  0  0  1  ]   [ 1 ]    [        1      ]
 
IDL 定義
interface SVGMatrix
{
	float getComponent(in unsigned long index) 
		raises(DOMException);
	SVGMatrix mMultiply(in SVGMatrix secondMatrix);
	SVGMatrix inverse() 
		raises(SVGException);
	SVGMatrix mTranslate(in float x, in float y);
	SVGMatrix mScale(in float scaleFactor);
	SVGMatrix mRotate(in float angle);
};
定数は定義されない
属性は定義されない
メソッド
getComponent
行列成分のゼロベースのインデックスに位置する成分を返す。 getComponent(0)a, getComponent(1)b, 等々。 Returns a component of the matrix by the component's zero-based index. getComponent(0) is a, getComponent(1) is b, etc.
パラメタ
in unsigned long index 取得する行列成分のインデックス。 The index of the matrix component to retrieve.
返り値
float 行列成分。 The matrix component.
例外
DOMException INDEX_SIZE_ERR: index が無効(すなわち [0, 5] の範囲外)の場合にレイズされる。 INDEX_SIZE_ERR: Raised if the index is invalid (i.e., outside the range [0, 5]).
mMultiply
行列の積を取る。 この行列に対しもう一つの行列による後置積がとられ、結果の現在の行列を返す。 Performs matrix multiplication. This matrix is post-multiplied by another matrix, returning the resulting current matrix.
パラメタ
in SVGMatrix secondMatrix 後置積をとる行列。 The matrix to post-multiply with.
返り値
SVGMatrix 結果の現在の行列。 The resulting current matrix.
例外無し
inverse
現在の行列の逆行列を持つ SVGMatrix の新たなインスタンスを返す。 Returns a new instance of SVGMatrix containing the inverse of the current matrix.
パラメタ無し
返り値
SVGMatrix 現在の行列の逆行列。 The inverse of the current matrix.
例外
SVGException SVG_MATRIX_NOT_INVERTABLE: この行列の行列式が0の場合にレイズされる。 SVG_MATRIX_NOT_INVERTABLE: Raised when the determinant of this matrix is zero.
mTranslate
現在の行列に対し並進変換による後置積をとり、結果の現在の行列を返す。 これは次の行列で表現される SVGMatrix オブジェクトを T として mMultiply(T) を呼び出すことに等しい: Post-multiplies a translation transformation on the current matrix and returns the resulting current matrix. This is equivalent to calling mMultiply(T), where T is an SVGMatrix object represented by the following matrix:
        [   1    0    x  ]
        [   0    1    y  ]
        [   0    0    1  ]
 
パラメタ
in float x 並進変換による座標のX軸方向の移動距離。 The distance by which coordinates are translated in the x-axis direction.
in float y 並進変換による座標のY軸方向の移動距離。 The distance by which coordinates are translated in the y-axis direction.
返り値
SVGMatrix 結果の現在の行列。 The resulting current matrix.
例外無し
mScale
現在の行列に対し一様な拡縮変換による後置積をとり、結果の現在の行列を返す。 これは次の行列で表現される SVGMatrix オブジェクトを S として mMultiply(S) を呼び出すことに等しい: Post-multiplies a uniform scale transformation on the current matrix and returns the resulting current matrix. This is equivalent to calling mMultiply(S), where S is an SVGMatrix object represented by the following matrix:
        [   scaleFactor      0          0   ]
        [   0          scaleFactor      0   ]
        [   0                0          1   ]
 
パラメタ
in float scaleFactor 座標をX軸Y軸に沿って拡縮させる倍率。 The factor by which coordinates are scaled along the x- and y-axis.
返り値
SVGMatrix 結果の現在の行列。 The resulting current matrix.
例外無し
mRotate
現在の行列に対し回転変換による後置積をとり、結果の現在の行列を返す。 これは次の行列で表現される SVGMatrix オブジェクトを R として mMultiply(R) を呼び出すことに等しい: Post-multiplies a rotation transformation on the current matrix and returns the resulting current matrix. This is equivalent to calling mMultiply(R), where R is an SVGMatrix object represented by the following matrix:
    [ cos(angle) -sin(angle) 0 ]
    [ sin(angle)  cos(angle) 0 ]
    [ 0           0          1 ]
 
パラメタ
in float angle 回転角(度)。 The angle of rotation in degrees.
返り値
SVGMatrix 結果の現在の行列。 The resulting current matrix.
例外無し

A.8.11 SVGLocatable

要素の位置情報を取得するためのインターフェース。 Interface for getting information about the location of elements.

IDL 定義
interface SVGLocatable
{
	SVGRect   getBBox();
	SVGMatrix getScreenCTM();
	SVGRect   getScreenBBox();
};
定数は定義されない
属性は定義されない
メソッド
getBBox
要素の 包含ボックス を返す。 Returns the bounding box of the element.
パラメタ無し
返り値
SVGRect 包含ボックス 。 返されるオブジェクトは現在の包含ボックス値の複製であり、元の包含ボックスが変化しても、変化しない。 The bounding box. The returned object is a copy of the current bounding box value and will not change if the corresponding bounding box changes.
例外無し
getScreenCTM
現在の利用単位から 初期のビューポート 座標系への変換行列を返す。 MouseEvent の座標成分 clientXclientY は初期のビューポート座標系に属する。 この要素が文書木に掛かっていない場合【 "hooked" :描画木も含めて?】null が返されることに注意。 このメソッドは getClientCTM と命名した方が適切だったが、歴史的な理由から getScreenCTM の名前が維持されている。 また、 getScreenCTM は現在のアニメーション状態を反映することに注意。 すなわち、 getScreenCTM が呼び出された要素に関わる変換がアニメーションされている場合、返される変換行列の計算にも現在アニメーションされているそれぞれの変換の状態が反映される。 Returns the transformation matrix from current user units to the initial viewport coordinate system. The clientX and clientY coordinates of a MouseEvent are in the initial viewport coordinate system. Note that null is returned if this element is not hooked into the document tree. This method would have been more aptly named as getClientCTM, but the name getScreenCTM is kept for historical reasons. Also note that getScreenCTM reflects a snapshot of the current animated state, i.e. if one or several transforms that affect the element that getScreenCTM is called upon are animated then the returned transformation matrix reflects the current state of each such animated transform when calculating the returned matrix.
パラメタ無し
返り値
SVGMatrix 変換行列。 返されるオブジェクトは現在の screen CTM 値の複製であり、元の screen CTM が変化しても、変化しない。 The transformation matrix. The returned object is a copy of the current screen CTM value and will not change if the corresponding screen CTM changes.
例外無し
getScreenBBox
要素のスクリーン座標空間での 包含ボックス を返す。 ボックスの座標は 初期のビューポート 座標系に属し、 SVGLocatable::getScreenCTM メソッドから返された行列により現在の利用座標空間と結びつけられる。 Returns the bounding box of the element in screen coordinate space. The box coordinates are in the initial viewport coordinate system, which is connected to the current user coordinate space by the matrix returned by the SVGLocatable::getScreenCTM method.
パラメタ無し
返り値
SVGRect スクリーン座標空間での 包含ボックス 。 返されるオブジェクトは現在のスクリーン包含ボックス値の複製であり、元のスクリーン包含ボックスが変化しても、変化しない。 The bounding box in screen coordinate space. The returned object is a copy of the current screen bounding box value and will not change if the corresponding screen bounding box changes.
例外無し

以下の例で getBBox() メソッドのふるまいをより明らかにする。 例には短い説明と SVG 素片に続いて次の書式で表記される一連の包含ボックス値が含まれる: The following examples further clarify the behavior of the getBBox() method. The examples have a short explanation, an SVG fragment and are followed by a set of bounding box values which have the following format:

[elementId] : {x, y, width, height} | {null} [elementId] : {x, y, width, height} | {null}

ここで x, y, width, height は、指定された ID の要素に対する getBBox 呼び出しから返された SVGRect オブジェクトの値になる。 包含ボックスが null になり得る少数の場合がある(Example 6 を見よ)。 where x, y, width and height define the values of the SVGRect objects returned from a getBBox call on the element with the specified ID. There are a few cases where the bounding box may be null (see example 6).

Example #1: 単純なグループと包含域
最初の例では種々の単純な 基本図形 とグループに対する getBBox メソッド呼び出しの返り値を示す。 特に、要素に対する変換はその利用空間における包含ボックス値を変えないことを示している。 Example #1: Simple groups and bounds
This first example shows the values returned by the getBBox method for various simple basic shapes and groups. In particular, it shows that the transform, on an element, does not change the value of its user space bounding box.
<g xml:id="group1" transform="translate(10, 20)" fill="red">
    <rect xml:id="rect1" transform="scale(2)" x="10" y="10" width="50" height="50"/>
    <rect xml:id="rect2" x="10" y="10" width="100" height="100"/>
    <g xml:id="group2" transform="translate(10, 20)">
        <rect xml:id="rect3" x="0" y="10" width="150" height="50"/>
        <circle xml:id="circle1" cx="20" cy="20" r="100" />
    </g>
</g>
    

結果:
[group1] : {-70.0, -60.0, 230.0, 200.0}
[rect1] : {10.0, 10.0, 50.0, 50.0}
[rect2] : {10.0, 10.0, 100.0, 100.0}
[group2] : {-80.0, -80.0, 230.0, 200.0}
[rect3] : {0.0, 10.0, 150.0, 50.0}
[circle1] : {-80.0, -80.0, 200.0, 200.0}


Example #2: 幅または高さ0の矩形の包含ボックス
この例では要素の包含ボックスが要素の幾何座標に基づくことを示す。 例えば、幅0の矩形でも描画はされないが包含ボックスは定義される(下を見よ)。 Example #2: Bounding box on zero width or height rectangle
This example illustrates that the bounding box on elements is based on the element's geometry coordinates. For example, the bounding box on a zero-width rectangle is defined (see below), even though the rectangle is not rendered.
<g xml:id="group1" transform="translate(10, 20)" fill="red">
    <rect xml:id="rect2" x="10" y="10" width="400" height="0"/>
    <g xml:id="group2" transform="translate(10, 20)">
        <rect xml:id="rect3" x="0" y="10" width="150" height="50"/>
    </g>
</g>
    

結果:
[group1] : {10.0, 10.0, 400.0, 70.0}
[rect2] : {10.0, 10.0, 400.0, 0.0}
[group2] : {0.0, 10.0, 150.0, 50.0}
[rect3] : {0.0, 10.0, 150.0, 50.0}


Example #3: 径0の楕円の包含ボックス。
これは包含ボックスが要素の幾何にどのように基づくかを示している。 ここでは、X径0の楕円は描画されないが包含ボックスは依然として定義される。 Example #3: Bounding Box on zero radius ellipses.
This is another example of how bounding boxes are based on the element's geometry. Here, the bounding box of an ellipse with a zero x-axis radius is still defined, even though the ellipse is not rendered.
<svg xml:id="mySVG" version="1.2" baseProfile="tiny" width="10" height="20">
    <g xml:id="group1" transform="translate(10, 20)" fill="red">
        <rect xml:id="rect1" x="10" y="10" width="100" height="100"/>
        <ellipse xml:id="ellipse1" cx="20" cy="20" rx="0" ry="70" />
    </g>
</svg>
    

結果:
[mySVG] : {20.0, -30.0, 100.0, 160.0}
[group1] : {10.0, -50.0, 100.0, 160.0}
[rect1] : {10.0, 10.0, 100.0, 100.0}
[ellipse1] : {20.0, -50.0, 0.0, 140.0}


Example #4: ビューポートは包含ボックスを切り取らない
この例は 最も根元の 'svg' 要素 のビューポートが何であろうと、包含ボックスは幾何に基づき、依然として定義されることを示す。 ここでは、 最も根元の 'svg' 要素 が幅0でも、根元自身の包含ボックスと子要素のそれは明確に定義される。 Example #4: Viewports do not clip bounding boxes
This example shows that no matter what the viewport is on the rootmost 'svg' element, the bounding boxes, based on the geometry, are still defined. Here, even though the rootmost 'svg' element has a zero width, the bounding boxes for the root itself and its children is precisely defined.
<svg xml:id="mySVG" version="1.2" baseProfile="tiny" width="0" height="50">
    <g xml:id="group1" transform="translate(10, 20)" fill="red" >
        <rect xml:id="rect1" x="10" y="10" width="50" height="50"/>
        <g xml:id="group2" transform="translate(10, 20)">
            <rect xml:id="rect2" x="0" y="10" width="150" height="0"/>
            <circle xml:id="circle1" cx="20" cy="20" r="500"/>
        </g>
    </g>
</svg>
    

結果:
[mySVG] : {-460.0, -440.0, 1000.0, 1000.0}
[group1] : {-470.0, -460.0, 1000.0, 1000.0}
[rect1] : {10.0, 10.0, 50.0, 50.0}
[group2] : {-480.0, -480.0, 1000.0, 1000.0}
[rect2] : {0.0, 10.0, 150.0, 0.0}
[circle1] : {-480.0, -480.0, 1000.0, 1000.0}


Example #5: <use> に対する getBBox
この例は rectimage 要素の包含ボックスの計算にその xy 属性が影響するのと同様に use 要素の包含ボックスもその要素に定義された xy 属性が計算に入れられることを示す。 Example #5: getBBox on <use>
This example shows that the bounding box for a 'use' element accounts for the 'x' and 'y' attributes defined on the element, just like the 'x' and 'y' attributes impact the bounding box computation on a 'rect' or on an 'image' element.
<svg version="1.2" baseProfile="tiny">
    <defs>
        <rect xml:id="myRect" x="0" y="0" width="60" height="40"/>
    </defs>
    <use xml:id="myUse" xlink:href="#myRect" x="-30" y="-20"/>
</svg>
    

結果:
[myRect] : {0.0, 0.0, 60.0, 40.0}
[myUse] : {-30.0, -20.0, 60.0, 40.0}


Example #6: 空のグループ
この例は空のグループの包含ボックスが null になることを示す。 同様に SVGPath が空の path (例えば createElementNS を呼び出して新たに作成されたものなど、パス命令を持たない path 要素)の包含ボックスも null になる。 Example #6: Empty group
This example shows that the bounding box for an empty group is null. By the same token, the bounding box of a 'path' with an empty SVGPath (i.e. one with no path commands, which may happen after creating a new 'path' element with a createElementNS call) is also null.
<g xml:id="emptyG"/>
    

結果:
[emptyG] : {null}


Example #7: display="none"visibility="hidden" の影響
この例は display="none" の子要素が親の包含ボックスの計算に寄与しない様子を示す。 これには display プロパティの定義とそれによる描画と包含ボックスの計算への影響が反映される。 この例は visibilityhidden に設定した要素は依然として親の包含ボックスの計算に寄与することも示す。 Example #7: Impact of display="none" and visibility="hidden"
This example shows how the bounding box of children with display="none" are not accounted for in the computation of their parent's bounding box. This reflects the definition of the 'display' property and its impact on rendering and bounding box computation. The example also shows that elements with 'visibility' set to hidden still contribute to their parent's bounding box computation.
<g xml:id="g1">
    <g xml:id="g1.1.display.none" display="none">
        <rect xml:id="rect1" x="10" y="10" width="40" height="40"/>
    </g>
    <rect xml:id="rect2.visibility.hidden" visibility="hidden" x="30" y="60" width="10" height="20"/>
</g>
    

結果:
[g1] : {30.0, 60.0, 10.0, 20.0}
[g1.1.display.none] : {10.0, 10.0, 40.0, 40.0}
[rect1] : {10.0, 10.0, 40.0, 40.0}
[rect2.visibility.hidden] : {30.0, 60.0, 10.0, 20.0}


Example #8: 包含ボックスのコンテナの利用空間内への結合
この例はコンテナ要素に対する包含ボックスの計算と結合がコンテナの利用空間でどのようになされるかを示す。 Example #8: Concatenating bounding boxes in the container's user space
This example shows how the concatenation and computation of bounding boxes for container element happens in the container's user space.
<g xml:id="g1">
    <line xml:id="line1" x2="100" y2="100" transform="rotate(-45)"/>
</g>
    

結果:
[g1] : {0.0, 0.0, 141.42136, 0}
[line1] : {0.0, 0.0, 100.0, 100.0}


Example #9: stroke-width は影響しない
この例はストロークが包含ボックスの計算に影響しないことを示す。 Example #9: No influence of stroke-width
This example illustrates that stroking has no impact on the computation of bounding boxes.
<g>
    <line xml:id="thickLine" stroke-width="10" x2="100" y2="0"/>
</g>
    

結果:
[thickLine] : {0.0, 0.0, 100.0, 0.0}


Example #10: viewBox は影響しない
この例は viewBox が包含ボックスの計算に影響しないことを示す。 Example #10: No influence of viewBox
This example illustrates that the viewBox has no impact on the computation of bounding boxes.
<svg xml:id="rootSvg" version="1.2" baseProfile="tiny" width="500" height="300" viewBox="0 0 200 100">
    <rect x="-100" y="-200" width="500" height="100"/>
</svg>
    

結果:
[rootSVG] : {-100, -200, 500, 100}

Example #11: 描画木に属さない要素の効果
この例は 描画木 に属さない要素が包含ボックスの計算に影響しないことを示す。 Example #11: Impact of elements which are not in the rendering tree
This example illustrates that elements which are not in the rendering tree have no impact on the computation of bounding boxes.
        <g xml:id="g1">
          <linearGradient xml:id="MyGradient"/>
            <stop offset="0.05" stop-color="#F60"/>
            <stop offset="0.95" stop-color="#FF6"/>
          </linearGradient>
        </g>
      

結果:
[g1] : {null}

A.8.12 SVGLocatableElement

このインターフェースは要素のスクリーン上の実際の位置を表現する。 This interface represents an element that has a physical location on the screen.

このインターフェースは次の要素に実装される: rect, circle, ellipse, line, path, use, image, text, textArea, tspan, svg, a, video, animation, switch, foreignObject, polygon, polyline, g This interface is implemented by: 'rect', 'circle', 'ellipse', 'line', 'path', 'use', 'image', 'text', 'textArea', 'tspan', 'svg', 'a', 'video', 'animation', 'switch', 'foreignObject', 'polygon', 'polyline' and 'g'.

IDL 定義
interface SVGLocatableElement : SVGElement, SVGLocatable
{
};
定数は定義されない
属性は定義されない
メソッドは定義されない

A.8.13 TraitAccess

trait を操作するインターフェース。 このインターフェースは SVGElement に結びつけられた "trait" の値の読み取りと操作に利用される。 それぞれの trait は1つの属性またはプロパティに対応し、要素からパースされ, 解釈され, ほとんどの場合はアニメーションも可能になる。 属性と異なり、各要素は明確に trait のセットを持ち、 サポートされない trait へのアクセスが試みられた場合は例外が投げられなければならない。 また、属性と異なり、 traits には型があり、値は正規化される:例えば path 要素に指定されたパスデータは パースされ, すべてのパス命令は絶対版に変換され、 trait の値からは元のパス命令が絶対版だったか相対版だったかは判別し得ない。 trait 値の取得や設定の際には正しい型のアクセサが用いられなければならず、そうでなかった場合は例外が投げられなければならない。 Trait manipulation interface. This interface is used to read and manipulate the value of "traits" associated with an SVGElement. Each trait corresponds to an attribute or property, which is parsed and understood by the element and in most cases animatable. Unlike attributes, each element has a well-defined set of traits and attempting to access an unsupported trait must throw an exception. Also, unlike attributes, traits are typed and their values are normalized; for instance path data specified on a 'path' element is parsed and all path commands are converted to their absolute variants, and it is not possible to determine from the value of the trait if a path command was absolute or relative. When getting and setting trait values, an accessor of the correct type must be used or an exception will be thrown.

プロパティに対応する trait においては算出値が用いられる:要素にプロパティの値が指定されていない場合、プロパティが継承されるならば値には親の値が利用される。 値が継承されない場合やルート要素においては、プロパティの初期値が利用される。 For a trait corresponding to a property, the computed value is used: if the value of a given property is not specified on that element, then for inherited properties the value on the parent is used. For non-inherited values, or on the root element, the initial value of the property is used.

非プロパティ属性に対応する trait に対しては、継承される属性の場合( xml:lang など)、親の値が利用される。 継承されない属性やルート要素においては、その属性の 省略値 が既知であればそれが利用される。 そうでない場合(例えば未知の属性や既定の値が規定されていない既知の属性)、 null が返される。 For a trait corresponding to a non-property attribute, if the attribute is inherited (such as 'xml:lang') the value of the parent is used. If the attribute is not inherited, or on the root element, the lacuna value for the attribute is used, if known. If not known (for example, for an unknown attribute, or a known attribute with no specified default), null is returned.

TraitAccess インターフェースを木の外の要素の trait の取得に、例えば作成または除去されたばかりの要素に対し利用した場合、返り値は UA に依存することに注意。 Note that when using the TraitAccess interface for getting traits on elements outside of the tree, for example on elements just created or removed, what values are returned is user agent dependent.

trait ゲッタメソッド( getTrait, getTraitNS, getFloatTrait , 等々)は基底値( base value - アニメーションが適用される前の値)を返す。 これは静的な内容でもアニメーションされる内容でも成立する。 しかしながら、属性がアニメーションされている親要素の値から 継承 される場合、アニメーションされた値を継承することになる。 trait 表示値ゲッタメソッド( getPresentationTrait, getPresentationTraitNS, getFloatPresentationTrait , 等々)は trait が現在アニメーションされている場合は現在のアニメーション値を返し、そうでない場合は基底値を返す。 一部の属性は trait からはアクセスできない — 詳細は サポートされる属性の一覧 を見よ。 The trait getter methods (getTrait, getTraitNS, getFloatTrait, etc.) return base values (i.e., before animation is applied), and this is true for both static and animated content. Note however that if the attribute is inherited from an animated parent value, it will inherit the animated value. The trait presentation value getter methods (getPresentationTrait, getPresentationTraitNS, getFloatPresentationTrait, etc.) return either the current animated value if the given trait is currently being animated or the base value if the given trait is not currently being animated. Not all attributes are accessible by traits — see the table of supported attributes for details.

trait 値の設定は対応する属性値を変更することと同義になるが、 trait セッタは型付きの値を操作できる。 変更された値は常に基底値になる。 プロパティに対応する継承可能な trait に対しては、常に trait 値を inherit に設定できる(ただし、値を取得する際は上で述べたように常に実際に継承された値を返す)。 Setting a trait value has the same effect as changing a corresponding attribute, but trait setters can operate on typed values. The value which is modified is always a base value. For inheritable traits corresponding to properties, the trait value can always be set to inherit (but querying the value will always return the actual inherited value as explained above).

無効な/サポート外の trait 値についての注記: 種々の trait セッタメソッド( setTrait, setFloatTrait, setPathTrait メソッドなど)が値を無効とみなしてコード INVALID_ACCESS_ERR の DOMException を投げる2つの状況がある。 一つは値がその trait の定義上無効な場合(例えば stroke-linejoin trait に値 'foo' を設定しようとするとこの例外が投げられる)。 trait メソッドは サポート外の値 を無効なものと見なす。 しかしながら IRI 参照 の場合は別で( fill プロパティに <FuncIRI> 値を設定したり、 image 要素の xlink:href 属性を設定するなど)、 SVG-UA は、設定された trait 値が構文的に正しいならば無効なものと見なしてはならない(構文的に不正ならば 無効な IRI 参照 になる)。 よってこの場合はコード INVALID_ACCESS_ERR の DOMException を投げてはならない。 これはもっぱら、 trait の設定の際に SVG-UA無効な IRI 参照 かどうかを決定するために IRI へアクセスに行く必要を無くすものである。 Note about invalid/unsupported trait values: There are two situations where the various trait setter methods (such as the setTrait, setFloatTrait and setPathTrait methods) consider a value invalid and throw a DOMException with the INVALID_ACCESS_ERR code. The first situation is when the trait value is invalid with regards to its definition. (For example, trying to set the 'stroke-linejoin' trait to 'foo' would result in this exception being thrown). The trait methods will consider the value to be invalid if it is an unsupported value. However, if the trait value being set is an IRI reference, such as when setting a <FuncIRI> value on the 'fill' property or when setting the 'xlink:href' attribute on an 'image' element, an SVG user agent must not consider that trait value invalid if it is syntactically correct but is otherwise an invalid IRI reference. Thus, the DOMException with code INVALID_ACCESS_ERR must not be thrown in this case. This obviates the need for an SVG user agent to fetch the IRI upon setting the trait solely to determine whether it is an invalid IRI reference.

二つ目は trait に現在アニメーションが適用されている状況において trait 値が無効になるものである。 アニメーション、従って文書をエラー状態にするような値は無効なものと見なされる。 例えば path 要素の d 属性がアニメーションされているときに、 d 属性をアニメーションと互換性の無い値に変えようとした場合、例外が生じることになる。 The second situation is when the trait value is invalid with regards to animations currently applied to the trait. The value is considered invalid because it would put the animation, and therefore the document, in an error state. For example, if a 'path' element has animations on its 'd' attribute, trying to change the 'd' attribute to a value incompatible with the animations will cause the exception to happen.

IDL 定義
interface TraitAccess
{
	DOMString getTrait(in DOMString name) 
		raises(DOMException);
	DOMString getTraitNS(in DOMString namespaceURI, in DOMString name) 
		raises(DOMException);
	float getFloatTrait(in DOMString name) 
		raises(DOMException);
	sequence<float> getFloatListTrait(in DOMString name) 
		raises(DOMException);
	SVGMatrix getMatrixTrait(in DOMString name) 
		raises(DOMException);
	SVGRect getRectTrait(in DOMString name) 
		raises(DOMException);
	SVGPath getPathTrait(in DOMString name) 
		raises(DOMException);
	SVGRGBColor getRGBColorTrait(in DOMString name) 
		raises(DOMException);
	DOMString getPresentationTrait(in DOMString name) 
		raises(DOMException);
	DOMString getPresentationTraitNS(in DOMString namespaceURI, in DOMString name) 
		raises(DOMException);
	float getFloatPresentationTrait(in DOMString name) 
		raises(DOMException);
	sequence<float> getFloatListPresentationTrait(in DOMString name) 
		raises(DOMException);
	SVGMatrix getMatrixPresentationTrait(in DOMString name) 
		raises(DOMException);
	SVGRect getRectPresentationTrait(in DOMString name) 
		raises(DOMException);
	SVGPath getPathPresentationTrait(in DOMString name) 
		raises(DOMException);
	SVGRGBColor getRGBColorPresentationTrait(in DOMString name) 
		raises(DOMException);
	void setTrait(in DOMString name, in DOMString value) 
		raises(DOMException);
	void setTraitNS(in DOMString namespaceURI, in DOMString name, in DOMString value) 
		raises(DOMException);
	void setFloatTrait(in DOMString name, in float value) 
		raises(DOMException);
	void setFloatListTrait(in DOMString name, in sequence<float> value) 
		raises(DOMException);
	void setMatrixTrait(in DOMString name, in SVGMatrix matrix) 
		raises(DOMException);
	void setRectTrait(in DOMString name, in SVGRect rect) 
		raises(DOMException);
	void setPathTrait(in DOMString name, in SVGPath path) 
		raises(DOMException);
	void setRGBColorTrait(in DOMString name, in SVGRGBColor color) 
		raises(DOMException);
};
定数は定義されない
属性は定義されない
メソッド
getTrait
trait 値を DOMString として返す( 正規化 され得る)。 SVG Tiny においては、一部の trait に対してのみ DOMString 値を取得できる。 返される DOMString の構文は対応する属性の構文に一致する。 このメソッドは namespaceURInull にした getTraitNS 呼び出しと正確に一致する。 Returns the trait value (possibly normalized) as a DOMString. SVG Tiny only certain traits can be obtained as a DOMString value. Syntax of the returned DOMString matches the syntax of the corresponding attribute. This method is exactly equivalent to getTraitNS with namespaceURI set to null.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
DOMString trait の値。 The trait value.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が DOMString に変換できない場合にレイズされる( SVG Tiny のみ)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a DOMString (SVG Tiny only).
getTraitNS
getTrait と同じだが、名前空間のある trait に対するもの。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Same as getTrait, but for namespaced traits. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString namespaceURI 取得する trait の名前空間。 The namespace of the trait to retrieve.
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
DOMString The trait value. The trait value.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が DOMString に変換できない場合にレイズされる( SVG Tiny のみ)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a DOMString (SVG Tiny only).
getFloatTrait
float の trait 値を取得する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Get the trait value as a float. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
float float の trait 値。 The trait value as a float.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が非数値 float の場合にレイズされる(例えば width 属性に百分率を与えた 最も根元の 'svg' 要素 に対し、 getFloatTrait("width") を呼び出した場合など)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value is a non-numeric float (for example, when calling getFloatTrait("width") on the rootmost 'svg' element whose width attribute uses a percentage).
getFloatListTrait
sequence<float> の trait 値を取得する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Get the trait value as a sequence<float>. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
sequence<float> sequence<float> の trait 値。 The trait value as a sequence<float>.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が sequence<float> に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a sequence<float>.
getMatrixTrait
trait 値を SVGMatrix として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても変化しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait value as an SVGMatrix. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGMatrix SVGMatrix の trait 値。 The trait value as an SVGMatrix.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGMatrix に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGMatrix.
getRectTrait
trait 値を SVGRect として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても変化しない。 実際の trait 値が SVGRect でなかった場合(例えば値 'none'viewBox 属性など)、このメソッドは null を返すことになる。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait value as an SVGRect. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes. If the actual trait value is not an SVGRect , e.g. the 'none' value on the 'viewBox' attribute, this method will return null. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGRect SVGRect の trait 値。 The trait value as an SVGRect.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGRect に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGRect.
getPathTrait
trait 値を SVGPath として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても変化しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait value as an SVGPath. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGPath SVGPath の trait 値。 The trait value as an SVGPath.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGPath に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGPath.
getRGBColorTrait
trait 値を SVGRGBColor として返す。 返されるオブジェクトは trait 値の複製であり、対応する trait が変化しても変化しない。 実際の trait 値が SVGRGBColor でなかった場合、すなわち 'none' またはペイントサーバへのリンク(例えばグラデーションや solidColor へのリンクなど)の場合、このメソッドは null を返さなければならない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait value as an SVGRGBColor. The returned object is a copy of the trait value and will not change if the corresponding trait changes. If the actual trait value is not an SVGRGBColor , i.e. 'none' or a link to a paint server (e.g. to a gradient or a 'solidColor'), this method must return null. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGRGBColor SVGRGBColor の trait 値。 The trait value as an SVGRGBColor.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGRGBColor に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGRGBColor.
getPresentationTrait
trait 表示値を DOMString として返す。 SVG Tiny においては、一部の trait に対してのみ DOMString 値を取得できる。 返される DOMString の構文は対応する属性の構文に一致する。 このメソッドは namespaceURInull にした getPresentationTraitNS 呼び出しと正確に一致する。 Returns the trait presentation value as a DOMString. SVG Tiny only certain traits can be obtained as a DOMString value. Syntax of the returned DOMString matches the syntax of the corresponding attribute. This method is exactly equivalent to getPresentationTraitNS with namespaceURI set to null.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
DOMString trait 表示値。 The trait presentation value.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が DOMString に変換できない場合にレイズされる( SVG Tiny のみ)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a DOMString (SVG Tiny only).
getPresentationTraitNS
getPresentationTrait と同じだが、名前空間のある trait に対するもの。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Same as getPresentationTrait, but for namespaced traits. The parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString namespaceURI 取得する trait の名前空間。 The namespace of the trait to retrieve.
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
DOMString trait 表示値。 The trait presentation value.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が DOMString に変換できない場合にレイズされる( SVG Tiny のみ)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a DOMString (SVG Tiny only).
getFloatPresentationTrait
float の trait 表示値を取得する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Get the trait presentation value as a float. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
float float の trait 表示値。 The trait presentation value as a float.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が非数値 float (例えば width 属性に百分率を与えた 最も根元の 'svg' 要素 に対し、 getFloatPresentationTrait("width") を呼び出した場合など)。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value is a non-numeric float (for example, when calling getFloatTrait("width") on the rootmost 'svg' element whose width attribute uses a percentage).
getFloatListPresentationTrait
sequence<float> の trait 表示値を取得する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Get the trait presentation value as a sequence<float>. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
sequence<float> sequence<float> の trait 表示値。 The trait presentation value as a sequence<float>.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が sequence<float> に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to a sequence<float>.
getMatrixPresentationTrait
trait 表示値を SVGMatrix として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても、アニメーションが trait の 表示値に影響しても変化しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait presentation value as an SVGMatrix. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes or as animation continue to affect the trait presentation value. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGMatrix SVGMatrix の trait 表示値。 The trait presentation value as an SVGMatrix.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGMatrix に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGMatrix.
getRectPresentationTrait
trait 表示値を SVGRect として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても、アニメーションが trait の 表示値に影響しても変化しない。 実際の trait 値が SVGRect でなかった場合(例えば値 'none'viewBox 属性など)、このメソッドは null を返すことになる。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait presentation value as an SVGRect. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes or as animation continue to affect the trait presentation value. If the actual trait value is not an SVGRect, e.g. the 'none' value on the 'viewBox' attribute, this method will return null. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGRect SVGRect の trait 表示値。 The trait presentation value as an SVGRect.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGRect に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGRect.
getPathPresentationTrait
trait 表示値を SVGPath として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても、アニメーションが trait の 表示値に影響しても変化しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait presentation value as an SVGPath. The returned object is a copy of the actual trait value and will not change if the corresponding trait changes or as animation continue to affect the trait presentation value. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGPath SVGPath の trait 表示値。 The trait presentation value as an SVGPath.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGPath に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGPath.
getRGBColorPresentationTrait
trait 表示値を SVGRGBColor として返す。 返されるオブジェクトは実際の trait 値の複製であり、対応する trait が変化しても、アニメーションが trait の 表示値に影響しても変化しない。 実際の trait 値が SVGRGBColor でなかった場合、すなわち 'none' またはペイントサーバへのリンク(例えばグラデーションや solidColor へのリンクなど)の場合、このメソッドは null を返さなければならない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Returns the trait presentation value as an SVGRGBColor. The returned object is a copy of the trait value and will not change if the corresponding trait changes or as animation continue to affect the trait presentation value. If the actual trait value is not an SVGRGBColor , i.e. 'none' or a link to a paint server (e.g. to a gradient or a 'solidColor'), this method must return null. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 取得する trait の名前。 The name of the trait to retrieve.
返り値
SVGRGBColor SVGRGBColor の trait 表示値。 The trait presentation value as an SVGRGBColor.
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていないか null だった場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element or null.
DOMException TYPE_MISMATCH_ERR: 要請された trait の算出値が SVGRGBColor に変換できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if requested trait's computed value cannot be converted to an SVGRGBColor.
setTrait
trait 値に DOMString を設定する。 SVG Tiny においては、決まった trait のみに DOMString 値を通して設定できる。 値として与えるべき DOMString の構文は、対応する XML 属性値の構文と同じでなければならない。 このメソッドは namespaceURInull にした setTraitNS 呼び出しと正確に一致する。 Set the trait value as a DOMString. In SVG Tiny only certain traits can be set through a DOMString value. The syntax of the DOMString that should be given as a value must be the same as syntax of the corresponding XML attribute value. Exactly equivalent to setTraitNS with the namespaceURI attribute set to null.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in DOMString value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を DOMString として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as a DOMString .
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified.
DOMException NO_MODIFICATION_ALLOWED_ERR: 読み出し専用の trait への変更を試みた場合にレイズされる。 NO_MODIFICATION_ALLOWED_ERR: Raised if attempt is made to change a readonly trait.
setTraitNS
setTrait と同じだが、名前空間のある trait に対するもの。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Same as setTrait, but for namespaced traits. The parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString namespaceURI 設定する trait の名前空間。 The namespace of the trait to be set.
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in DOMString value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を DOMString として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as a DOMString .
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified.
DOMException NO_MODIFICATION_ALLOWED_ERR: 読み出し専用の trait への変更を試みた場合にレイズされる。 NO_MODIFICATION_ALLOWED_ERR: Raised if attempt is made to change a readonly trait.
setFloatTrait
trait 値に float を設定する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as a float. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in float value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を float として指定できない場合( NaN など)にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as a numeric float (e.g. NaN).
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified.
setFloatListTrait
trait 値に sequence<float> を設定する。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as a sequence<float>. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in sequence<float> value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を sequence<float> として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as a sequence<float>).
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified.
setMatrixTrait
trait 値に SVGMatrix を設定する。 SVGMatrix 内の値は trait に複製されるので、 SVGMatrix に対する後続の変更は trait の値に影響しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as an SVGMatrix. Values in SVGMatrix are copied in the trait so subsequent changes to the given SVGMatrix have no effect on the value of the trait. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in SVGMatrix value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を SVGMatrix として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as an SVGMatrix.
DOMException INVALID_ACCESS_ERR: 入力値が null だった場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is null.
setRectTrait
trait 値に SVGRect を設定する。 SVGRect 内の値は trait に複製されるので、 SVGRect に対する後続の変更は trait の値に影響しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as an SVGRect. Values in SVGRect are copied in the trait so subsequent changes to the given SVGRect have no effect on the value of the trait. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in SVGRect value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を SVGRect として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as an SVGRect.
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 幅または高さの値が負の SVGRect は無効になる。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified. An SVGRect is invalid if the width or height values are set to negative.
setPathTrait
trait 値に SVGPath を設定する。 SVGPath 内の値は trait に複製されるので、 SVGPath に対する後続の変更は trait の値に影響しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as an SVGPath. Values in SVGPath are copied in the trait so subsequent changes to the given SVGPath have no effect on the value of the trait. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in SVGPath value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を SVGPath として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as an SVGPath.
DOMException INVALID_ACCESS_ERR: 入力が trait に対し無効な値であったか、 null が指定された場合にレイズされる。 MOVE_TO 区分以外の区分から開始される SVGPath は無効になる。
注記: 空の SVGPath は有効。 INVALID_ACCESS_ERR: Raised if the input value is an invalid value for the given trait or null is specified. An SVGPath is invalid if it begins with any segment other than MOVE_TO segment.
Note: An empty SVGPath is still a valid value.
setRGBColorTrait
trait 値に SVGRGBColor を設定する。 SVGRGBColor 内の値は trait に複製されるので、 SVGRGBColor に対する後続の変更は trait の値に影響しない。 パラメタ name は非修飾 trait 名でなければならない。 すなわち接頭辞は付けない。 Set the trait value as an SVGRGBColor. Values in SVGRGBColor are copied in the trait so subsequent changes to the given SVGRGBColor have no effect on the value of the trait. Parameter name must be a non-qualified trait name, i.e. without prefix.
パラメタ
in DOMString name 設定する trait の名前。 The name of the trait to be set.
in SVGRGBColor value trait の値。 The value of the trait.
返り値無し
例外
DOMException NOT_SUPPORTED_ERR: 要請された trait がこの要素でサポートされていない場合にレイズされる。 NOT_SUPPORTED_ERR: Raised if the requested trait is not supported on this element.
DOMException TYPE_MISMATCH_ERR: 要請された trait の値を SVGRGBColor として指定できない場合にレイズされる。 TYPE_MISMATCH_ERR: Raised if the requested trait's value cannot be specified as an SVGRGBColor.
DOMException INVALID_ACCESS_ERR: 入力値が null だった場合にレイズされる。 INVALID_ACCESS_ERR: Raised if the input value is null.

この仕様、 SVG Tiny 1.2 uDOM でサポートされる trait

trait アクセスはすべての SVG Tiny 1.2 の属性とプロパティ には要求されていない。 下の一覧表に SVG Tiny 1.2 uDOM 実装が trait アクセスをサポートしなければならない属性とプロパティを掲げる。 各行に属性に可能なゲッタとセッタを挙げる。 「省略値」の列にそれぞれの属性またはプロパティに利用しなければならない 省略値 が指定される。 「省略値」の列が空のものには 省略値 が存在しない。 特に「コメント」の列に明記されていない限り、サポートされる属性はそれが属せるすべての要素においてアクセス可能になる。 属性の一覧および、属性がどの要素に属せるかについては 属性一覧 を見よ。 Trait access is not required on all of the SVG Tiny 1.2 attributes and properties. The table below shows the attributes and properties that SVG Tiny 1.2 uDOM implementations must support trait access to. Each attribute row lists the allowed getters and setters. The "Lacuna Value" column specifies the lacuna value that must be used for each attribute or property. If a "Lacuna Value" column entry is empty, there is no lacuna value. Unless explicitly stated in the "Comments" column, a supported attribute is accessible on all elements it can belong to. See the attribute table for a list of attributes and which elements they belong to.

複数のバージョンの SVG をサポートする実装は、最も広範なセットの trait アクセスをサポートしなければならない。 各 trait でサポートされる型についても最も広範なセットをサポートしなければならない。 しかしながら、将来版で利用できる trait や trait の型に依存する内容がすべての適合 SVG Tiny 1.2 uDOM 実装で動作するとは限らない。 Implementations that support multiple versions of SVG must allow trait access to the most extensive set and support the types supported by each trait in the most extensive set. However, content relying on traits or trait types available in future versions may not work in all conformant SVG Tiny 1.2 uDOM implementations.

UA はサポートしない trait に対する trait メソッドの利用が試みられた際には、 NOT_SUPPORTED_ERR をレイズしなければならない。 The user agent must raise a NOT_SUPPORTED_ERR whenever there is an attempt to use trait methods for traits which are not supported by the user agent.

一部の属性とデータ型には 追加規則 が適用される。 これらの規則は一覧表の下で定義される。 For some of the attributes and data types additional rules apply. These rules are defined below the table.

注記: 下の表で: Note: In the table below:

trait の対象 trait ゲッタ
[返り値]
trait セッタ
[引数]
省略値 コメント
要素の
テキスト内容
getTrait("#text")
[The element text content]
setTrait("#text", ...)
[New element text content]
テキスト内容へのアクセス を見よ。
accumulate
属性
getTrait("accumulate")
[none | sum]
setTrait("accumulate", ...)
[none | sum]
"none"
additive
属性
getTrait("additive")
[replace | sum]
setTrait("additive", ...)
[replace | sum]
"replace"
attributeName
属性
getTrait("attributeName") setTrait("attributeName", ...)
audio-level
プロパティ
getFloatTrait("audio-level")
[0 ≤ value ≤ 1]
setFloatTrait("audio-level", ...)
[0 ≤ value ≤ 1]

setTrait("audio-level", ...)
[inherit]
1.0
baseProfile
属性
getTrait("baseProfile") setTrait("baseProfile", ...) "none"
begin
属性
N/A setTrait("begin", ...)
calcMode
属性
getTrait("calcMode")
[discrete | linear | paced | spline]
setTrait("calcMode", ...)
[discrete | linear | paced | spline]
animateMotion 要素にアクセスした場合は "paced", 他の場合は "linear"
color
プロパティ
getRGBColorTrait("color")
[null, SVGRGBColor]
setRGBColorTrait("color, ...")
setTrait("color", ...)
[inherit | <color>]
rgb(0,0,0)
cx
属性
getFloatTrait("cx") setFloatTrait("cx", ...) radialGradient 要素にアクセスした場合は 0.5, 他の場合は 0.0
cy
属性
getFloatTrait("cy") setFloatTrait("cy", ...) radialGradient 要素にアクセスした場合は 0.5, 他の場合は 0.0
d
属性
getPathTrait("d") setPathTrait("d", ...) パス区分の無い SVGPath オブジェクト パス属性へのアクセス規則 を見よ。
display
プロパティ
getTrait("display")
[inline | none]
setTrait("display", ...)
[inline | none | inherit]
"inline" display プロパティへのアクセス規則 を見よ。
dur
属性
N/A setTrait("dur", ...)
editable
属性
getTrait("editable")
[simple | none]
setTrait("editable", ...)
[simple | none]
"none"
end
属性
N/A setTrait("end", ...)
fill
プロパティ
getRGBColorTrait("fill")
[null, SVGRGBColor]

getTrait("fill")
setRGBColorTrait("fill", ...)
setTrait("fill", ...)
[none | currentColor | <FuncIRI> | <color> | <system paint> | inherit]
rgb(0,0,0) アニメーション要素の fill 属性への trait アクセサは存在しない。
fill-opacity
プロパティ
getFloatTrait("fill-opacity")
[0 ≤ value ≤ 1]
setFloatTrait("fill-opacity", ...)
[0 ≤ value ≤ 1]

setTrait("fill-opacity", ...)
[inherit]
1.0
fill-rule
プロパティ
getTrait("fill-rule")
[nonzero | evenodd]
setTrait("fill-rule", ...)
[nonzero | evenodd | inherit]
"nonzero"
focusable
属性
getTrait("focusable")
[true | false]
setTrait("focusable", ...)
[true | false | auto]
"auto"
focusHighlight
属性
getTrait("focusHighlight")
[auto | none]
setTrait("focusHighlight", ...)
[auto | none]
"auto"
font-family
プロパティ
getTrait("font-family") setTrait("font-family", ...) UA 依存 フォントプロパティへのアクセス規則 を見よ。
font-size
プロパティ
getFloatTrait("font-size")
[value ≥ 0]
setFloatTrait("font-size", ...)
[value ≥ 0]

setTrait("font-size", ...)
[xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | inherit]
UA 依存
font-style
プロパティ
getTrait("font-style")
[normal | italic | oblique]
setTrait("font-style", ...)
[normal | italic | oblique | inherit]
"normal" フォントプロパティへのアクセス規則 を見よ。
font-weight
プロパティ
getTrait("font-weight")
[100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900]
setTrait("font-weight", ...)
[normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit]
"normal" フォントプロパティへのアクセス規則 を見よ。
from
属性
N/A setTrait("from", ...)
gradientUnits
属性
getTrait("gradientUnits")
[userSpaceOnUse | objectBoundingBox]
setTrait("gradientUnits", ...)
[userSpaceOnUse | objectBoundingBox]
"objectBoundingBox"
height
属性
getFloatTrait("height")
[value ≥ 0]

getTrait("height")
["auto"]
setFloatTrait("height", ...)
[value ≥ 0]

setTrait("height", ...)
["auto"]
textArea 要素にアクセスした場合は "auto", 他の場合は 0.0 widthheight 属性へのアクセス規則 を見よ。
id
属性
getTrait("id") setTrait("id", ...)
keyPoints
属性
N/A setTrait("keyPoints", ...)
keySplines
属性
N/A setTrait("keySplines", ...)
keyTimes
属性
N/A setTrait("keyTimes", ...)
max
属性
N/A setTrait("max", ...)
min
属性
N/A setTrait("min", ...)
nav-right
属性
getTrait("nav-right")
[auto | self | <FuncIRI>]
setTrait("nav-right", ...)
[auto | self | <FuncIRI>]
"auto"
nav-next
属性
getTrait("nav-next")
[auto | self | <FuncIRI>]
setTrait("nav-next", ...)
[auto | self | <FuncIRI>]
"auto"
nav-up
属性
getTrait("nav-up")
[auto | self | <FuncIRI>]
setTrait("nav-up", ...)
[auto | self | <FuncIRI>]
"auto"
nav-up-right
属性
getTrait("nav-up-right")
[auto | self | <FuncIRI>]
setTrait("nav-up-right", ...)
[auto | self | <FuncIRI>]
"auto"
nav-up-left
属性
getTrait("nav-up-left")
[auto | self | <FuncIRI>]
setTrait("nav-up-left", ...)
[auto | self | <FuncIRI>]
"auto"
nav-prev
属性
getTrait("nav-prev")
[auto | self | <FuncIRI>]
setTrait("nav-prev", ...)
[auto | self | <FuncIRI>]
"auto"
nav-down
属性
getTrait("nav-down")
[auto | self | <FuncIRI>]
setTrait("nav-down", ...)
[auto | self | <FuncIRI>]
"auto"
nav-down-right
属性
getTrait("nav-down-right")
[auto | self | <FuncIRI>]
setTrait("nav-down-right", ...)
[auto | self | <FuncIRI>]
"auto"
nav-down-left
属性
getTrait("nav-down-left")
[auto | self | <FuncIRI>]
setTrait("nav-down-left", ...)
[auto | self | <FuncIRI>]
"auto"
nav-left
属性
getTrait("nav-left")
[auto | self | <FuncIRI>]
setTrait("nav-left", ...)
[auto | self | <FuncIRI>]
"auto"
offset
属性
getFloatTrait("offset")
[0 ≤ value ≤ 1]
setFloatTrait("offset", ...)
[0 ≤ value ≤ 1]
0.0
opacity
プロパティ
getFloatTrait("opacity")
[0 ≤ value ≤ 1]
setFloatTrait("opacity", ...)
[0 ≤ value ≤ 1]

setTrait("opacity", ...)
[inherit]
1.0
path
属性
getPathTrait("path") setPathTrait("path", ...) パス区分の無い SVGPath オブジェクト パス属性へのアクセス規則 を見よ。
points
属性
getFloatListTrait("points") setFloatListTrait("points", ...)
r
属性
getFloatTrait("r")
[value ≥ 0]
setFloatTrait("r", ...)
[value ≥ 0]
radialGradient 要素にアクセスした場合は 0.5, 他の場合は 0.0
repeatCount
属性
N/A setTrait("repeatCount", ...)
repeatDur
属性
N/A setTrait("repeatDur", ...)
restart
属性
getTrait("restart")
[always | whenNotActive | never]
setTrait("restart", ...)
[always | whenNotActive | never]
"always"
rx
属性
getFloatTrait("rx")
[value ≥ 0]
setFloatTrait("rx", ...)
[value ≥ 0]
0.0
ry
属性
getFloatTrait("ry")
[value ≥ 0]
setFloatTrait("ry", ...)
[value ≥ 0]
0.0
snapshotTime
属性
getFloatTrait("snapshotTime")
[value ≥ 0]
setFloatTrait("snapshotTime", ...)
[value ≥ 0]
0.0
solid-color
プロパティ
getRGBColorTrait("solid-color")
[null, SVGRGBColor]
setRGBColorTrait("solid-color", ...)
setTrait("solid-color", ...)
[<color> | inherit]
rgb(0,0,0)
solid-opacity
プロパティ
getFloatTrait("solid-opacity")
[0 ≤ value ≤ 1]
setFloatTrait("solid-opacity", ...)
[0 ≤ value ≤ 1]

setTrait("solid-opacity")
[inherit]
1.0
stop-color
プロパティ
getRGBColorTrait("stop-color")
[null, SVGRGBColor]

getTrait("stop-color")
[none | <color>]
setRGBColorTrait("stop-color", ...)
setTrait("stop-color")
[none | currentColor | <color> | inherit]
rgb(0,0,0)
stop-opacity
プロパティ
getFloatTrait("stop-opacity")
[0 ≤ value ≤ 1]
setFloatTrait("stop-opacity", ...)
[0 ≤ value ≤ 1]

setTrait("stop-opacity", ...)
[inherit]
1.0
stroke
プロパティ
getRGBColorTrait("stroke")
[null, SVGRGBColor]

getTrait("stroke")
setRGBColorTrait("stroke", ...)
setTrait("stroke", ...)
[none | currentColor | <FuncIRI> | <color> | <system paint> | inherit]
"none"
stroke-dasharray
プロパティ
getFloatListTrait("stroke-dasharray")
getTrait("stroke-dasharray")
[none, inherit]
setFloatListTrait("stroke-dasharray", ...)
setTrait("stroke-dasharray", ...)
[none, inherit]
"none"
stroke-dashoffset
プロパティ
getFloatTrait("stroke-dashoffset") setFloatTrait("stroke-dashoffset", ...)

setTrait("stroke-dashoffset", ...)
[inherit]
0.0
stroke-linecap
プロパティ
getTrait("stroke-linecap")
[butt | round | square]
setTrait("stroke-linecap", ...)
[butt | round | square | inherit]
"butt"
stroke-linejoin
プロパティ
getTrait("stroke-linejoin")
[miter | round | bevel]
setTrait("stroke-linejoin", ...)
[miter | round | bevel | inherit]
"miter"
stroke-miterlimit
プロパティ
getFloatTrait("stroke-miterlimit")
[value ≥ 1]
setFloatTrait("stroke-miterlimit")
[value ≥ 1]

setTrait("stroke-miterlimit", ...)
[inherit]
4.0
stroke-opacity
プロパティ
getFloatTrait("stroke-opacity")
[0 ≤ value ≤ 1]
setFloatTrait("stroke-opacity", ...)
[0 ≤ value ≤ 1]

setTrait("stroke-opacity", ...)
[inherit]
1.0
stroke-width
プロパティ
getFloatTrait("stroke-width")
[value ≥ 0]
setFloatTrait("stroke-width", ...)
[value ≥ 0]

setTrait("stroke-width", ...)
[inherit]
1.0
target
属性
getTrait("target") setTrait("target", ...) "_self"
text-anchor
プロパティ
getTrait("text-anchor")
[start | middle | end]
setTrait("text-anchor", ...)
[start | middle | end | inherit]
"start"
to
属性
N/A setTrait("to", ...)
transform
属性
getMatrixTrait("transform")
getTrait("transform")
setMatrixTrait("transform", ...)
setTrait("transform", ...)
単位行列 (1,0,0,1,0,0) transform 属性へのアクセス規則 を見よ。
type
属性
getTrait("type")
[translate | scale | rotate | skewX | skewY]
setTrait("type", ...)
[translate | scale | rotate | skewX | skewY]
animateTransform 要素の 'type' 属性には trait アクセサが存在する。 audio, handler, image, script, video いずれの要素の 'type' 属性にも trait アクセサは存在しない。
values
属性
N/A setTrait("values", ...)
vector-effect
プロパティ
getTrait("vector-effect")
[none | non-scaling-stroke]
setTrait("vector-effect", ...)
[none | non-scaling-stroke | inherit]
"none"
version
属性
getTrait("version") setTrait("version", ...) UA 依存
viewBox
属性
getRectTrait("viewBox")
[null | SVGRect]
setRectTrait("viewBox", ...)
setTrait("viewBox", ...)
[none]
null viewBox 属性が値 'none' の場合、 getRectTrait メソッド は null を返す。
viewport-fill
プロパティ
getRGBColorTrait("viewport-fill")
[null, SVGRGBColor]

getTrait("viewport-fill")
[none | <color>]
setRGBColorTrait("viewport-fill", ...)
setTrait("viewport-fill", ...)
[none | currentColor | <color> | inherit]
"none"
viewport-fill-opacity
プロパティ
getFloatTrait("viewport-fill-opacity")
[0 ≤ value ≤ 1]
setFloatTrait("viewport-fill-opacity", ...)
[0 ≤ value ≤ 1]

setTrait("viewport-fill-opacity", ...)
[inherit]
1.0
visibility
プロパティ
getTrait("visibility")
[visible | hidden]
setTrait("visibility", ...)
[visible | hidden | inherit]
"visible"
width
属性
getFloatTrait("width")
[value ≥ 0]

getTrait("width")
["auto"]
setFloatTrait("width", ...)
[value ≥ 0]

setTrait("width", ...)
["auto" ]
textArea 要素にアクセスした場合は "auto", 他の場合は 0.0 widthheight 属性へのアクセス規則 を見よ。
x
属性
getFloatTrait("x")

getFloatListTrait("x")
setFloatTrait("x", ...)

setFloatListTrait("x", ...)
0.0 xy 属性へのアクセス規則 を見よ。
x1
属性
getFloatTrait("x1") setFloatTrait("x1", ...) 0.0
x2
属性
getFloatTrait("x2") setFloatTrait("x2", ...) linearGradient 要素にアクセスした場合は 1.0, 他の場合は 0.0
xlink:href
属性
getTraitNS("http://www.w3.org/1999/xlink", "href")
[absolute IRI]
setTraitNS("http://www.w3.org/1999/xlink", "href", ...) ""
y
属性
getFloatTrait("y")

getFloatListTrait("y")
setFloatTrait("y", ...)

setFloatListTrait("y", ...)
0.0 xy 属性へのアクセス規則 を見よ。
y1
属性
getFloatTrait("y1") setFloatTrait("y1", ...) 0.0
y2
属性
getFloatTrait("y2") setFloatTrait("y2", ...) 0.0
zoomAndPan
属性
getTrait("zoomAndPan")
[disable | magnify]
setTrait("zoomAndPan", ...)
[disable | magnify]
"magnify"

A.8.14 追加のアクセス規則

transform 属性へのアクセス規則

SVG Tiny 1.2 の transform 属性が取り得る値の型は3種類になる:「通常の」変換リスト(拡縮, 並進, 回転, 行列, 等々), 新たに導入された 'ref(svg)' 型, 'none' 。 いずれの場合においても getMatrixTrait は現在の行列の評価を返す。 利用者が transform 属性の値が 'ref' または 'none' だったかどうか知る必要がある場合、 getTrait を用いなければならない。 利用者は setTrait 用いて transform 属性を 'ref(svg)''none' に設定できる。 The 'transform' attribute in SVG Tiny 1.2 can have three types of values. The "normal" transformation list (e.g. scale, translate, rotate, matrix, etc.), the newly introduced 'ref(svg)' type or 'none'. getMatrixTrait returns the current evaluated matrix in all cases. If the user needs to know that the 'transform' attribute value was a 'ref' or a 'none', getTrait must be used. By using setTrait the user can set the 'transform' attribute to 'ref(svg)' or 'none'.

display プロパティへのアクセス規則

下位互換性の理由から trait の仕組みによる display 値へのアクセスは 'none''inline' に限定される。 他のすべての値は 'none' または 'inline' に変換される。 display 値に可能なすべての値の一覧は 可視性の制御 を見よ。 ) 他の display 値を扱うためには、例えば利用者が display を 'block' に設定することを望む場合、より汎用の getAttributeNS / setAttributeNS を用いなければならない。 しかしながら、 SVG Tiny 1.2 UA には display の正規化 に述べたように、その属性データの正規化が許容されていることに注意。 Due to backward compatibility reasons the 'display' values accessible via the trait mechanism are limited to 'none' and 'inline', all other values are translated into 'none' or 'inline'. (For a list of all possible 'display' values, see Controlling visibility.) If other 'display' values are of interest, e.g. the user want to set display to 'block', the more generic getAttributeNS/setAttributeNS must be used. Note however that an SVG Tiny 1.2 user agent is allowed to normalize its attribute data as described in Display normalization.

アニメーション関連の要素へのアクセス規則

以下の規則が SMIL アニメーション要素( animate, animateTransform, animateColor, animateMotion, set, discard )に適用される。 The following rule applies to SMIL animation elements ('animate', 'animateTransform', 'animateColor', 'animateMotion', 'set' , 'discard').

これらの要素は木への挿入や木からの除去はできるが、一旦木に挿入された後は TraitAccess メソッドでは変更できない。 そのような試みが行われた場合、 TraitAccess メソッドは NOT_SUPPORTED_ERR の DOMException を投げる。 Element インターフェースの setAttributesetAttributeNS メソッドにより要素を変更した場合、文書は変化するが、アニメーションには効果を及ぼさない。 These elements can be inserted and removed from the tree but they cannot be modified using the TraitAccess methods once inserted into the tree. If an attempt is made to do so, the TraitAccess method will throw a DOMException with code NOT_SUPPORTED_ERR. Modifying the element using the setAttribute and setAttributeNS methods of the Element interface will change the document, but will have no effect on the animation.

この制約は文書作成者がスクリプトを通したアニメーションの追加を望む場合、アニメーション要素の属性は木へ挿入される前に変更されなければならないことを意味する。 下に関連の属性を挿入前に設定して文書へアニメーションを追加する例を示す。 This restriction means that if the author wishes to add animations via script, the attributes of the animation elements must be modified before being inserted into the tree. The following is an example of adding an animation to the document, setting the relevant attributes prior to insertion.

Example: uDOM によるアニメーション
<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xml:id="svg-root"
      width="100%" height="100%" viewBox="0 0 480 360">
    <rect xml:id="myRect" fill="green" x="10" y="10" width="200" height="100" stroke="black" stroke-width="2"/>
</svg>
次の Java コードは矩形にアニメーションを追加するスクリプトになる: A script such as the following Java code might be used to add an animation to the rectangle:
SVGElement newAnimate = (SVGElement)document.createElementNS(svgNS, "animate");
newAnimate.setTrait("attributeName", "fill");
newAnimate.setTrait("from", "red");
newAnimate.setTrait("to", "blue");
newAnimate.setTrait("dur", "5");
newAnimate.setTrait("repeatCount", "10");
Element myRect = document.getElementById("myRect");
myRect.appendChild(newAnimate);
    

x, y 属性へのアクセス規則

getFloatTraittext 要素の xy 属性の取得に用いられる際に、属性値に複数の <coordinate> が含まれている場合、エラーコード TYPE_MISMATCH_ERR の DOMException がレイズされなければならない。 属性値が1つだけの座標成分を持つ場合、これは getFloatTrait から返される値になる。 If getFloatTrait is used to retrieve the value of the 'x' or 'y' attribute on a 'text' element, where the attribute value has more than one <coordinate>, a DOMException with error code TYPE_MISMATCH_ERR must be raised. When the attribute value has only one coordinate, this is the value returned by getFloatTrait.

getFloatListTrait または setFloatListTraittext 要素以外の要素に用いられる場合、エラーコード TYPE_MISMATCH_ERR の DOMException がレイズされなければならない。 If getFloatListTrait or setFloatListTrait are used on elements other than a 'text' element, a DOMException with error code TYPE_MISMATCH_ERR must be raised.

width, height 属性へのアクセス規則

getFloatTraitsvg 要素の widthheight 属性の取得に用いられる際に、属性値が百分率もしくは単位付きで指定されていた場合、エラーコード TYPE_MISMATCH_ERR の DOMException がレイズされなければならない。 If getFloatTrait is used to retrieve the value of the 'width' or 'height' attribute on an 'svg' element, where the value is specified as a percentage or unit value, a DOMException with error code TYPE_MISMATCH_ERR must be raised.

フォントプロパティへのアクセス規則

font-face 要素の font-family, font-style, font-weight プロパティの取得や設定に trait アクセサが用いられた場合、エラーコード NOT_SUPPORTED_ERR の DOMException がレイズされなければならない。 If trait accessors are used to get or set the 'font-family', 'font-style' or 'font-weight' properties on a 'font-face' element, a DOMException with error code NOT_SUPPORTED_ERR must be raised.

パス属性へのアクセス規則

getPathTrait メソッドが SVGPath の取得に利用される際に、パス属性内のどこかに構文上の誤りがあった場合、返り値は誤りが生じた手前までの有効なパス区分すべてを含む SVGPath でなければならない。 If the getPathTrait method is used to get an SVGPath and the path attribute was syntactically invalid at some point, the return value must be an SVGPath containing all valid path segments until the point of the error.

マルチメディア要素へのアクセス規則

以下の規則がマルチメディア要素( audio, video, animation )に適用される。 The following rule applies to multimedia elements ('audio', 'video', 'animation').

一旦木へ挿入後は TraitAccess メソッドを利用した SVG タイミング属性 の変更はできない。 そのような試みが行われた場合、 TraitAccess メソッドはコード NOT_SUPPORTED_ERR の DOMException を投げることになる。 Element インターフェースの setAttributesetAttributeNS メソッドによりこれらの属性を変更した場合、文書は変化するが、要素には効果を及ぼさない。 SVG timing attributes cannot be modified using the TraitAccess methods once inserted into the tree. If an attempt is made to do so, the TraitAccess method will throw a DOMException with code NOT_SUPPORTED_ERR. Modifying these attributes using the setAttribute and setAttributeNS methods of the Element interface will change the document, but will have no effect on the element.

A.8.15 SVGElement

このインターフェースは文書木内の SVG 要素 を表現する。 これは uDOM 木内で要素を辿るメソッドを提供し、要素の id の設定や取得を可能にする。 This interface represents an SVG element in the document tree. It provides methods to traverse elements in the uDOM tree and allows setting and getting the 'id' of an element.

注記: idxml:id の扱い方の規則については idxml:id の定義 を見よ。 Note: See the definition of 'id' and 'xml:id' for the rules of how to treat 'id' and 'xml:id'.

IDL 定義
interface SVGElement : Element, EventTarget, TraitAccess
{
	attribute DOMString id;
};
定数は定義されない
属性
id

読み取り時は 文書構造の章 で定められる規則に従い、要素の xml:id または id 属性を返す。 あるいは ID が指定されていない場合は null を返す。 On read, returns the element's 'xml:id' or 'id' attribute according to the rules defined in the Structure chapter, or null if no ID specified.

書き込み時は 文書構造の章 で定められる規則に従い、要素の xml:id または id 属性を設定する。 On write, sets the element's 'xml:id' or 'id' attributes according to the rules defined in the Structure chapter.

メソッドは定義されない

A.8.16 SVGTimedElement

このインターフェースは timed 要素svg 要素に実装される SVGTimedElement を表現する。 This interface represents an SVGTimedElement which is implemented by timed elements and the 'svg' element.
IDL 定義
interface SVGTimedElement : SVGElement, smil::ElementTimeControl
{
	void pauseElement();
	void resumeElement();
	readonly attribute boolean isPaused;
};
定数は定義されない
属性
isPaused
timed 要素 が一時停止状態にある場合は true 。 そうでない場合は false一時停止状態の要素と活動持続時間 ([SMIL21], 10.4.3 節) を参照のこと。 停止状態にある(活動持続時間の終端まで到達した)要素は一時停止状態ではないことに注意。 true if the timed element is paused. false otherwise. See Paused element and the active duration ([SMIL21], section 10.4.3). Note that an element that is stopped (has reached the end of its active duration) is not paused.
メソッド
pauseElement
timed 要素を一時停止する。 一時停止状態の要素と活動持続時間 ([SMIL21], 10.4.3 節) を参照のこと。 Pauses the timed element. See Paused element and the active duration ([ SMIL21 ], section 10.4.3).
パラメタ無し
返り値無し
例外無し
resumeElement
timed 要素の再開をする。 一時停止状態の要素と活動持続時間 ([SMIL21], 10.4.3 節) を参照のこと。 Resumes the timed element. See Paused element and the active duration ([ SMIL21 ], section 10.4.3).
パラメタ無し
返り値無し
例外無し

A.8.17 SVGAnimationElement

このインターフェースは次の SMIL アニメーション要素: animate, animateTransform, animateColor, animateMotion, set に実装される。 これは歴史的な理由により含まれているものであり、廃止予定にある。 このインターフェースは animation 要素とは無関係なことに注意。 This interface is implemented by the following SMIL animation elements: 'animate', 'animateTransform', 'animateColor', 'animateMotion' and 'set'. It is included for historical reasons and has been deprecated. Note that this interface is unrelated to the new 'animation' element.

IDL 定義
interface SVGAnimationElement : SVGTimedElement
{
};
定数は定義されない
属性は定義されない
メソッドは定義されない

A.8.18 SVGVisualMediaElement

このインターフェースは視覚的な、すなわちスクリーン上の物理的な位置を持つメディア要素を表現する。 これは animationvideo に実装される。 This interface represents a media element that is visual, i.e. has a physical location on the screen. It is implemented by: 'animation' and 'video'.
IDL 定義
interface SVGVisualMediaElement : SVGLocatableElement, SVGTimedElement
{
};
定数は定義されない
属性は定義されない
メソッドは定義されない

A.8.19 SVGTimer

SVGTimer インターフェースは1つの時刻または相対イベントのスケジュールを組む API を提供する。 SVGTimer オブジェクトは常に実行中( running :属性 runningtrue )または待機中( waiting :属性 runningfalse )いずれかの状態にある。 タイマーのそれぞれの時区間に対し SVGTimer 型の Event が誘発される。 The SVGTimer interface provides an API for scheduling a one time or repetitive event. A SVGTimer object is always either in the running (attribute running is true) or waiting (attribute running is false) state. After each interval of the timer, an Event of type SVGTimer is triggered.

SVGTimer イベントはタイマー実行中 のときにのみ誘発される。 SVGTimer イベントは標的上【target phase】に制限される。 SVGTimerEventTarget なので、 SVGTimer をイベント型とする addEventListener を用いて EventListener を登録できる。 イベントリスナはイベントオブジェクトの target プロパティを通して対応する SVGTimer オブジェクトへアクセスできる。 SVGTimer events are triggered only when the timer is in the running state. The SVGTimer event is limited to the target phase. Since SVGTimer is an EventTarget, EventListeners can be registered on it using addEventListener with SVGTimer as the event type. Event listeners can access their corresponding SVGTimer object through the event object's target property.

SVGTimer インターフェースは SVGGlobal インターフェースの createTimer メソッドを用いて作成される。 SVGTimer instances are created using the createTimer method of the SVGGlobal interface.

IDL 定義
interface SVGTimer : events::EventTarget
{
	attribute long delay;
	attribute long repeatInterval;
	readonly attribute boolean running;
	void start();
	void stop();
};
定数は定義されない
属性
delay

この属性は次のイベントが発火されるまでの残り時間をミリ秒で指定する。 SVGTimer実行中の間は、この属性は現在の時区間の残り時間を反映して動的に更新される。 SVGTimer待機中の場合、停止された時点での残り時間が delay に反映される。 delay 属性の取得時には現在の値、すなわちその時点での残りの delay が返される。 オブジェクトが実行中のときに delay 期間が終了すると、 SVGTimer オブジェクトは SVGTimer 型の Event を誘発することになる。 このとき、 delay は repeatInterval 値に更新され、新たな秒読みが開始される。 delay を設定することにより現在の時区間は新たな値に再設定される。 この属性が 0 の場合、イベントは可能な限り早くに誘発される。 負値をあてがうことは stop() メソッドを呼び出すことに等しい。 初期値は SVGGlobal インターフェースの createTimer メソッドの initialInterval パラメタを通して設定され、 SVGTimer の最初の時区間を定める。 This attribute specifies the time remaining in milliseconds until the next event is fired. When the SVGTimer is in the running state this attribute is dynamically updated to reflect the remaining time in the current interval. When the SVGTimer is waiting the delay reflects the time that remained when stopped. Getting the delay attribute returns the current value, i.e. a snapshot value of the remaining delay. After delay period has passed while the object is in the running state, the SVGTimer object will trigger an Event of type SVGTimer. The delay will then be updated with the repeatInterval value and a new count down will start. Setting the delay resets the current interval to the new value. If this attribute is 0, it means that the event will be triggered as soon as possible. Assigning a negative value is equivalent to calling the stop() method. The initial value is set through the initialInterval parameter in the createTimer method on the SVGGlobal interface, and defines the first interval of the SVGTimer.

repeatInterval

この属性は SVGTimer の各反復の時区間、すなわち初期の時区間に後続する各タイマー時区間をミリ秒で指定する。 この属性の初期値は SVGGlobal インターフェースの createTimer メソッドの repeatInterval パラメタを通して設定される。 負値があてがわれるとイベント誘発の反復は行われなくなり、 delay 経過後にイベントを誘発する1度限りのタイマーになる。 This attribute specifies in milliseconds the interval for each repeat of the SVGTimer, i.e. each timer interval subsequent to the initial interval. The initial value of this attribute is set through the repeatInterval parameter in the createTimer method on the SVGGlobal interface. Assigning a negative value disables the repetitive triggering of the event making it a one time timer which triggers an event after the delay.

running

SVGTimer の状態。 タイマーが実行中は値 true, 待機中のときは false になる。 タイマーが停止されている場合、 repeatIntervaldelay プロパティは非負になり得ることに注意(ただし delay が負の場合、タイマーは停止される)。 SVGTimer state. Value is true if the timer is running, false if the timer is waiting. Note that the repeatInterval and delay properties can be non-negative if the timer is stopped (but if delay is negative, the timer is stopped).

メソッド
start

SVGTimer の状態を 実行中 に変える。 タイマーがすでに実行中にあるときは何もしない。 タイマーは初期状態では 待機中 なので、このメソッドで開始しなければならない。 開始時にタイマーの delay が負値だった場合、例えば delay が負値に設定されて停止されていた場合、 delay の値は、このメソッドが呼び出される際に repeatInterval に再設定される。 Changes the SVGTimer state into running. If the timer is already in the running state, it has no effect. Initially the timer is waiting, and must be started with this method. If the timer delay had a negative value when started, for example if the time had been stopped by setting the delay to a negative value, the delay value is reset to repeatInterval when the this method is called.

パラメタ無し
返り値無し
例外無し
stop

SVGTimer の状態を 待機中 にする。 タイマーがすでに待機中のときは何もしない。 Changes the SVGTimer state into waiting. If the timer is already in the waiting state, calling this method has no effect.

パラメタ無し
返り値無し
例外無し

A.8.20 SVGGlobal

存在する多くのスクリプトを用いる SVG 文書はブラウザ固有の Window インターフェースの機能を利用している。 SVG Tiny 1.2 は、この仕様で定められる新たな特色機能と伴にこれらの事実上の標準機能の一部を定義する SVGGlobal インターフェースを指定する。 SVGGlobal インターフェースは文書の デフォルトビュー ([DOM2VIEWS], 1.1 節) を表現するオブジェクトに実装されなければならない。 このオブジェクトは AbstractView も実装する。 従って ECMAScript 言語束縛においては、グローバルスクリプトオブジェクトが SVGGlobal を実装する。 文書の SVGGlobal オブジェクトは DocumentView::defaultView を通しても取得できる。 Many scripted SVG documents in existence make use of functions on a browser specific Window interface. SVG Tiny 1.2 specifies an SVGGlobal interface, on which some of these de facto standard functions are defined, as well as some functions for new features defines in this specification. The SVGGlobal interface must be implemented by the object that represents the default view of the document ([DOM2VIEWS], section 1.1). This object also implements AbstractView. Thus, in the ECMAScript language binding, the global script object implements SVGGlobal. The SVGGlobal object for a document can also be obtained through DocumentView::defaultView.

IDL 定義
interface SVGGlobal
{
	SVGTimer createTimer(in long initialInterval, in long repeatInterval);
	void getURL(in DOMString iri, in AsyncStatusCallback callback);
	void postURL(in DOMString iri, in DOMString data, in AsyncStatusCallback callback, 
	             in DOMString type, in DOMString encoding);
	Node parseXML(in DOMString data, in Document contextDoc);
};
定数は定義されない
属性は定義されない
メソッド
createTimer
初期および反復の時区間を与えて SVGTimer を作成する。 SVGTimer の初期状態は 待機中 になる。 Creates a SVGTimer with the provided initial and repeat Intervals. The SVGTimer will initially be in the waiting state.
パラメタ
in long initialInterval SVGTimer が反復し得る場合は最初の時区間をミリ秒で指定する。 すなわち、タイマーの delay 属性の初期値を設定する。 SVGTimer が反復しない場合、1度限りのタイマー時区間を指定する。 このパラメタを負値に設定しても待機中の SVGTimer が作成されることになる。 Specifies the first interval in milliseconds for a repetitive SVGTimer, i.e. sets the initial value of the delay attribute on the timer. In the case the SVGTimer is not repetitive, it specifies the interval for the one time timer. Setting this parameter with a negative value will create an SVGTimer which is in the waiting state.
in long repeatInterval SVGTimer が初期の時区間に続いて反復する際の時区間の長さを指定する。 負値にすると SVGTimer は1度限りのタイマーになる。 Specifies the time interval on which the SVGTimer repeats subsequent to the initial interval. A negative value will make the SVGTimer a one time timer.
返り値
SVGTimer 作成された SVGTimer The created SVGTimer.
例外無し
getURL

与えられた IRI とコールバック関数が呼び出される AsyncStatusCallback オブジェクトに対し、このメソッドはその IRI のリソースの取得を試みる。 IRI が HTTP または HTTPS スキームを利用する場合、 HTTP GET メソッドが利用されることになる。 実装は他のスキームをサポートしてもよいが、要求はされない。 Given an IRI and an AsyncStatusCallback object on which to call a callback function, this method will attempt to fetch the resource at that IRI. If the IRI uses the HTTP or HTTPS scheme, the HTTP GET method will be used. Implementations may support other schemes, but are not required to.

処理要件

このメソッドの呼び出しは非同期でなければならない。 呼び出された際は、即時に呼び出し側の文脈に制御が戻され、一旦リクエストが完了すれば、コールバック関数が呼び出される。 このメソッドを複数回呼び出した場合、 FIFO 順に実行されなければならない。 This method call must take place asynchronously. When called, control returns immediately to the calling context, and once the request is completed the callback is called. Multiple calls to this method must be executed in FIFO order.

UA には HTTP リクエストの gzip 内容コーディングのサポートが要求される。 また、コールバックに渡す前にそれらの内容は復号されなければならない。 UA にはそれらが送信する gzip エンコーディング内容のサポートは要求されないが、そうすることが奨励される。 リクエスト間での状態維持のため、クッキーはサポートされるべきである。 UA は利用者にリクエストによる対話手段(例えば認証情報の入力など)を提供してもよいが要求はされない。 User agents are required to support the gzip content coding for HTTP requests and must decode such content before passing it on to the callback. User agents are not required to support gzip encoding content that they send, though they are encouraged to. Cookies should be supported so that state can be maintained across requests. User agents may provide the user with means to interact with the request (e.g. to enter authentication information) but are not required to.

安全性の理由から、 UA はこれらのリクエストを origin によるものに制約することが強く奨励される。そのような制約の実施においては、コールバックはその AsyncURLStatus オブジェクトの success フィールドを false に設定し、他のフィールドは null に設定した上で直ちに呼び出される。 リダイレクト応答( 3xx HTTP ステータスコード)は API を通して暴露されてはならず、 HTTP 仕様に従って内部的に処理されなければならない。 It is important to note that for security reasons, user agents are strongly encouraged to restrict these requests by origin. When enforcing such restrictions, the callback is called immediately with its AsyncURLStatus object's success field set to false and other fields set to null. Redirection responses (3xx HTTP status codes) must not be exposed through the API but rather they must be processed internally according to the HTTP specification.

パラメタ
in DOMString iri リクエストされることになるリソースの IRI The IRI of the resource that is being requested.
in AsyncStatusCallback callback リクエスト完了時にコールバックが呼び出されることになるオブジェクト。 The object on which the callback will be called upon completion of the request.
返り値無し
例外無し
postURL

与えられた IRI , 転送データ, コールバック関数が呼び出される AsyncStatusCallback オブジェクト, メディア型, 内容コーディングに対し、このメソッドはリクエストされたメディア型と内容コーディングを用いてデータを指定された IRI へポストする。 UA は HTTP または HTTPS IRI による postURL をサポートしなければならないが、他の IRI スキームでも HTTP と機能互換なプロトコルであればサポートしてよい。 一旦リクエストが完了すれば、 AsyncStatusCallback インターフェースに述べられるようにコールバック関数が呼び出される。 postURL がポストする内容をサポートしない IRI の場合、あるいは HTTP 互換でないポストで行われた場合、コード NOT_SUPPORTED_ERR の DOMException が投げられなければならない。 Given an IRI, data to be transmitted, an AsyncStatusCallback object on which to call a callback function, a media type, and a content coding, this method will post the data to the specified IRI using the requested media type and content coding. User agents must support postURL being invoked with an HTTP or HTTPS IRI, but may support other IRI schemes if they indicate protocols that are functionally compatible with HTTP. Once the request has been completed the callback is invoked as described in the AsyncStatusCallback interface. If postURL is invoked with an IRI that does not support posting content, or which does not post content in a manner compatible with HTTP, a DOMException with code NOT_SUPPORTED_ERR must be thrown.

処理要件は getURL と同じだが、以下の注意と追加要件がある。 Processing requirements are the same as for getURL, with the following notes and additions.

  • HTML フォームに対応する内容の送信を自身によるエンコーディングで生成しなければならないことを望むアプリケーションのために、渡されるデータにはいかなる HTML フォームエンコーディングも適用されない。 The data passed in does not get any HTML form encoding applied to it, so that applications that wish to transmit content corresponding to what an HTML form would must produce the encoding themselves
  • content type パラメタを設定する際はリクエストの Content-Type ヘッダもそれに従って設定されなければならない。 content type パラメタの構文がそのメディア型の構文に一致しない場合、無視されなければならない。 このパラメタが指定されない場合のデフォルトは text/plain でなければならない。 When the content type parameter is set then the Content-Type header of the request must be set accordingly. If the syntax of the content type parameter does not match that of a media type, it must be ignored. If this parameter is not specified, then it must default to text/plain.
  • encoding パラメタが設定された場合、 UA は、もしサポートする場合、サブミットされたデータをその HTTP 内容コーディングで符号化し、 Content-Encoding ヘッダもそれに従って設定しなければならない。 サポートしない場合、パラメタを無視しなければならず, Content-Encoding ヘッダを設定してはならず, データはこの符号化を適用せずに送信しなければならない。 要求される内容コーディングは identity のみである。 When the encoding parameter is set then the user agent must encode the submitted data with that HTTP content coding and set the Content-Encoding header accordingly, if it supports it. If it does not support it, then it must ignore it, must not set the Content-Encoding header, and must transmit the data with no encoding. The only required content coding is identity.
パラメタ
in DOMString iri リクエストされているリソースの IRI The IRI of the resource that is being requested.
in DOMString data POST リクエストの body になるデータ。 The data that will be the body of the POST request.
in AsyncStatusCallback callback リクエスト完了時にコールバックが呼び出されることになるオブジェクト。 The object on which the callback will be called upon completion of the request.
in DOMString type POST リクエストの content type 。 The content type of the POST request.
in DOMString encoding POST リクエストのエンコーディング。 The encoding of the POST request.
返り値無し
例外無し
parseXML

与えられた文字列と Document オブジェクトに対し、文字列を XML 文書としてパースし、それを表現する Node を返す。 文字列内の XML が XML 1.0 または XML 1.1 に従う整形式でないか、あるいは XML 名前空間 1.0 または XML 名前空間 1.1 (同順)に従う名前空間整形式でない場合、このメソッドは値 null を返さなければならない。 Given a string and a Document object, parse the string as an XML document and return a Node representing it. If the XML in the string is not well-formed according to either XML 1.0 or XML 1.1 or not namespace-well-formed according to Namespaces in XML 1.0 or Namespaces in XML 1.1 respectively, this method must return a null value.

入力文字列をパースする際は contextDoc パラメタは、パースされたノードの ownerDocument フィールドの設定にのみ用いられる。 When parsing the input string, the contextDoc parameter is used only for setting the ownerDocument field in the parsed nodes.

パース中に script 要素に遭遇した際は、その場で実行されてはならない。 現在の SVG 文書に挿入された場合にのみ実行されることになる。 If during parsing a 'script' element is encountered, it must not be executed at that time. It will only be executed if it inserted into the current SVG document.

パース完了には外部リソース、例えば:外部実体, スタイルシート, スクリプト, ラスター画像, 動画, 音声, 等々の読み込みは要求されない。 XSL スタイルシートは適用されなければならない。 There is no requirement to load any external resources, e.g. external entities, stylesheets, scripts, raster images, video, audio, etc., for the parsing to complete. XSL stylesheets must not be applied.

contextDoc パラメタが定められている場合、このメソッドは ownerDocument フィールドを与えられた Document オブジェクトに設定した Element オブジェクトを返す。 contextDoc パラメタが指定された場合の実際の処理は以下の段階を適用することに等しくなければならない: If the contextDoc parameter is defined, this method returns an Element object the ownerDocument field of which must be set to be the provided Document object. In effect when the contextDoc parameter is specified the processing must be equivalent to applying the following steps:

  1. XML を Document へパースする。 parsing the XML into a Document
  2. その documentElement 要素を取得。 retrieving its documentElement element
  3. 前の段階で得られた Element を最初のパラメタに, deep パラメタは true に設定して、 parseXML に渡された Document オブジェクトの「 importNode メソッド」を呼び出す。 ( importNode は DOM 3 Core の一部であり、 uDOM のものではないことに注意。 効果が importNode が用いられたかのようでなければならないことを指示するためにここに挙げたのであり、実装のサポートを要求するものではない。) calling importNode on the Document object passed to parseXML with the Element from the previous step as its first parameter and the deep parameter set to true. (Please note that importNode is part of DOM 3 Core but not of the uDOM. It is mentioned here to indicate that the effect must be as if importNode had been used, but not to require that it be supported in implementations.)
  4. 最後の段階の結果を返す。 return the result of the last step
パラメタ
in DOMString data XML としてパースされることになるデータ。 The data that is to be parsed as XML.
in Document contextDoc パースを行う文脈を与える Document オブジェクト。 The Document object in the context of which to perform the parsing.
返り値
Node パースされた内容を表現する NodeDocument または Element )。 A Node (either a Document or an Element) representing the content that was parsed.
例外
DOMException INVALID_CHARACTER_ERR: パースされた XML の名前の1つでも contextDoc の文書の XML のバージョンに従う XML の名前でない場合にレイズされる。 INVALID_CHARACTER_ERR: Raised if one of the parsed XML names is not an XML name according to the XML version of the contextDoc document.

A.8.21 AsyncStatusCallback

このインターフェースは getURLpostURL (いずれもこのインターフェースのインスタンスをパラメタにとる)を通して取得された内容を処理する目的のコードにより実装される。 リクエストの完了時に、このインターフェースを実装するオブジェクトの operationComplete メソッドが呼び出される。 This interface is implemented by code that intends to process content retrieved through getURL or postURL, both of which take an instance of this interface as a parameter. The operationComplete method of the object implementing this interface is called upon completion of the request.

IDL 定義
interface AsyncStatusCallback
{
	void operationComplete(in AsyncURLStatus status);
};
定数は定義されない
属性は定義されない
メソッド
operationComplete

このメソッドは、 getURLpostURL を用いてリソースを取得した結果の通知を受けるためにコードに実装される。 リクエスト完了時に、リソースの内容とリクエストに関する情報を保持する AsyncURLStatus オブジェクトを伴って、メソッドが呼び出される。 This method is implemented by code in order to be notified of the result of fetching a resource using getURL or postURL. Upon completion of the request, the method is called with an AsyncURLStatus object that holds the resource contents and information about the request.

パラメタ
in AsyncURLStatus status HTTP レスポンスを表現するオブジェクト。 An object representing the HTTP response.
返り値無し
例外無し

A.8.22 AsyncURLStatus

このインターフェースは、HTTP リクエスト完了時に operationComplete メソッドに渡すための、種々の HTTP レスポンス情報を保持する。 This interface captures several aspects of an HTTP response in order to be passed to the operationComplete method upon completion of an HTTP request.

IDL 定義
interface AsyncURLStatus
{
	readonly attribute boolean success;
	readonly attribute DOMString contentType;
	readonly attribute DOMString content;
};
定数は定義されない
属性
success

リクエストが成功したかどうかを示す真偽値フィールド。 A boolean field indicating whether the request succeeded or not.

HTTP リクエストのレスポンスのステータスコードが 200 番台の場合、この属性は true に設定されなければならず, ステータスコード 400 と 500 番台の場合、 false に設定されなければならない。 ステータスコードが 100 番台の場合は無視されなければならず, 300 番台の場合は getURL に示されている処理要件に従って処理されなければならない。 For HTTP requests with response status codes in the 200 range, this attribute must be set to true, and for status codes in the 400 and 500 ranges it must be set to false. Status codes in the 100 range must be ignored and those in the 300 range must be processed as indicated in getURL's processing requirements.

非 HTTP リソースへの取得の際しては、この属性は、成功裏に全体が取得できた場合は true に、他の場合は false に設定されなければならない。 When fetching non-HTTP resources, this attribute must be set to true if the resource was successfully retrieved in full, and false otherwise.

contentType

レスポンスの media type を含む文字列。 A string containing the media type of the response.

HTTP リクエストに対しては、この属性は Content-Type HTTP ヘッダの値に設定されなければならない。 Content-Type ヘッダが存在しない場合、属性は null に設定されなければならない。 For HTTP requests, this attribute must be set to the value of the Content-Type HTTP header. If there was no Content-Type header, the attribute must be set to null.

非 HTTP リソースの取得に際しては、この属性は null に設定されなければならない。 When fetching non-HTTP resources, this attribute must be set to null.

content

取得されたリソースを含む文字列。 A string containing the contents of the fetched resource.

リソースが有効な文字の連なりでない場合( HTTP リクエスト の media type と他のヘッダに従って、あるいは非 HTTP リソースを適切に、解釈したものとして)、この属性は null に設定されなければならない。 If the resource is not a valid sequence of characters (as interpreted according to the media type and other headers for an HTTP request, or as appropriate for non-HTTP resources), then this attribute must be set to null.

HTTP リクエストのレスポンス body の media type が text/* 階層で charset パラメタが指定されていた場合、テキストはホストプログラミング言語に備わるエンコーディングに、それがサポートされているなら変換されなければならない。 エンコーディングがサポートされていない場合、このフィールドの値は null でなければならない。 要求されるエンコーディングは UTF-8 と UTF-16 ( BE と LE )のみである。 HTTP レスポンス body に1つ以上の内容コーディングが適用されている場合、このフィールドが設定される前に完全に復号されなければならない。 HTTP レスポンスのステータスコードがエラーコードでありながら body も持つ場合、その body の内容は取り出されなければならない。 For HTTP requests, if the media type of the response body was in the text/* hierarchy and specified a charset parameter, then the text must be converted into the host programming language's native form if the encoding is supported. If the encoding is not supported, the value of this field must be null. The only required encodings are UTF-8 and UTF-16 (BE and LE). If the HTTP response body had one or more content codings applied to it then it must be fully decoded before setting this field. If the HTTP response status code was an error code but carried a body, the content of that body must still be exposed.

メソッドは定義されない

A.8.23 EventListenerInitializer2

EventListenerInitializer2 インターフェースは、「グローバルオブジェクト」の概念を持たない言語で書かれたスクリプトにイベントリスナを初期化する手段を与えるために利用される。 特に Java のイベントリスナで利用されているが、この一般的な手法は他のその種のスクリプト言語にも通用し得るものになる。 EventListenerInitializer2 を実装するオブジェクトを見出して利用する方法の詳細については script 要素の記述を見よ。 The EventListenerInitializer2 interface is used to provide a way for scripts written in languages that do not have a concept of a "global object" to initialize their event listeners. Specifically, it is used for Java event listeners, but this general approach is suggested for other such scripting languages. See the description of the 'script' element for details on how the object implementing EventListenerInitializer2 is discovered and used.

IDL 定義
interface EventListenerInitializer2
{
	void initializeEventListeners(in Element scriptElement);
	EventListener createEventListener(in Element handlerElement);
};
定数は定義されない
属性は定義されない
メソッド
initializeEventListeners

指定された script 要素で与えられたスクリプトが実行されるべきであることを指示するために呼び出される。 Invoked to indicate that the script given by the specified 'script' element should be executed.

パラメタ
in Element scriptElement 実行するスクリプトを特定する script 要素。 The 'script' element that identifies the script to execute.
返り値無し
例外無し
createEventListener

指定された handler 要素に対応する EventListener を取得するために呼び出される。 Invoked to obtain an EventListener that corresponds to the specified 'handler' element.

パラメタ
in Element handlerElement 対応する EventListener を返す handler 要素。 The 'handler' element for which a corresponding EventListener is to be returned.
返り値
EventListener EventListener The EventListener.
例外無し