4. 基本データ型と基本インタフェース — Basic Data Types and Interfaces

4.1. 定義

`初期~値@ ( `initial value^en )
[ 属性/~prop ] %A の初期~値は、 %A が指定されていないか, `無効な値$が指定されている場合に利用される値を与える。 初期~値が定義されていない場合、 ε とする。 この値は、次の目的に利用されることになる ⇒ 描画する / `~animation値@~SVGanim$を計算する / ~DOM~interfaceを介して %A に~accessする ◎ The initial value of an attribute or property is the value used when that attribute or property is not specified, or when it has an invalid value. This value is to be used for the purposes of rendering, calculating animation values, and when accessing the attribute or property via DOM interfaces.
`無効な値@ ( `invalid value^en )
[ ~stylesheet /`呈示~属性$ ]内の`~prop$用に指定された値は、[ ~propの値を定義している文法に則って許容されないか, 許容されていても 注釈文にて許容しないとされている ]ならば,無効な値とされる。 ◎ An invalid value specified for a property, either in a style sheet or a presentation attribute, is one that is either not allowed according to the grammar defining the property's values, or is allowed by the grammar but subsequently disallowed in prose.\
無効な値を伴う~CSS宣言は`無視する$ことになる。 ◎ A CSS declaration with an invalid value is ignored.
`基底~値@ ( `base value^en )
要素~上の内容~属性の基底~値は、[ 要素がその属性を有していて`無効な値$でないならば その値 / ~ELSE_ 属性の`初期~値$ ]である。
【 この用語は,原文では定義として~markupされていない “非公式な” 用語であるが、 意味を明確化するため,ここに追加している。 】【 “基底~値” は、 元々は~animateされた値( `animVal^m )と区別するための呼称であったが、 今や~SVG~DOMは,`~animateされた値を反映しなくなった@#_aliased-animated-value$ので,その区別は無用と化している。 】

4.2. 属性~構文

この仕様では、各~属性は,次のような属性~定義~表tで定義される: ◎ In this specification, attributes are defined with an attribute definition table, which looks like this:

◎属名 `exampleattr^a ◎属値 `length$t | `none^v ◎属初 `none^v ◎属ア 可 ◎表終 ◎ Name Value Initial value Animatable exampleattr <length> | none none yes

値~欄には、属性の構文の記述。 属性の構文は、次に挙げる 6 種のうちいずれかを用いて述べられる: ◎ In the Value column is a description of the attribute's syntax. There are six methods for describing an attribute's syntax:

~SVG-2要件: 文字大小区別とされている呈示~属性~値を緩めることを考慮する。 ◎ SVG 2 Requirement: Consider relaxing case sensitivity of presentation attribute values.

  • 解決: ~prop値は、文字大小無視にする (`~~参照先@http://www.w3.org/2011/10/28-svg-irc#T16-40-11$)。 ◎ Resolution: We will make property values case insensitivity.
  • 目的: 呈示~属性~構文の構文解析を対応する~CSS~propの構文解析に揃える。 ◎ Purpose: To align presentation attribute syntax parsing with parsing of the corresponding CSS property.
  • Owner: Cameron (`3276$ACTION)
  • Status: Done

~CSSの値~定義~構文を利用して定義される`呈示~属性$ %A は、 次に従って構文解析される: ◎ When a presentation attribute defined using the CSS Value Definition Syntax is parsed, this is done as follows:

  1. %値 ~LET %A の値 ◎ Let value be the value of the attribute.
  2. %文法 ~LET %A の属性~定義~表tの値~欄に与えられた文法 ◎ Let grammar be the grammar given in the attribute definition table's Value column.
  3. %文法 内の各[ 次の表tの 1 列目に該当するもの ]を[ 同じ行の 2 列目に与えるもの ]に置換する:

    `length$t [ `length$t | `number$t ]
    `length-percentage$t [ `length-percentage$t | `number$t ]
    `angle$t [ `angle$t | `number$t ]
    ◎ Replace all instances of <length> in grammar with [<length> | <number>]. ◎ Replace all instances of <length-percentage> in grammar with [<length-percentage> | <number>]. ◎ Replace all instances of <angle> in grammar with [<angle> | <number>].
  4. ~RET %値 を %文法 に`則って構文解析-$した結果 ◎ Return the result of parsing value with grammar.

注記: `number$t 記号の挿入は、 単位なしの[ 長さ/角度 ]値の利用を[ 呈示~属性においては許容しつつ、 対応する~propにおいては許容しないままにする ]ためにある。 ◎ The insertion of the <number> symbols allows for unitless length and angles to be used in presentation attribute while disallowing them in corresponding property values.

注記: すべての`呈示~属性$は、 対応する~CSS~propへの参照により定義されるので, ~CSSの値~定義~構文を利用して定義される。 ◎ Note that all presentation attributes, since they are defined by reference to their corresponding CSS properties, are defined using the CSS Value Definition Syntax.

~CSSの値~定義~構文を利用して定義される,他の属性の構文解析は、 属性の値を属性~定義~表tに与えられた文法に`則って構文解析-$することにより行われる。 ◎ When any other attribute defined using the CSS Value Definition Syntax is parsed, this is done by parsing the attribute's value according to the grammar given in attribute definition table.

注記: これは、そのような属性の値において[ ~CSS~comment/~CSS~escape ]の利用を許容することに注意。 例えば,`rect$e 要素の `x^a 呈示~属性においては、 値 `10\px/**/^v は, `10px^v として成功裡に構文解析されることになる。 ◎ Note that this allows CSS comments and escapes to be used in such attributes. For example, a value of '10\px/**/' would successfully parse as '10px' in the ‘x’ presentation attribute of the ‘rect’ element.

`~URLt@ として定義された属性を構文解析するときは、 次を行うとする `URL$r ⇒# `~URL構文解析する$( その属性の値, 文書の~URL ) ◎ When an attribute defined as a URL is parsed, this is done by invoking the URL parser with the attribute's value as input and the document's URL as base [URL].

初期~値~欄は、属性~用の`初期~値$を与える。 属性が[ 指定された~CSSの値~定義~構文/ ~ABNF文法 / ~EBNF文法 / `URL^t / 属性を構文解析する方法を述べている注釈文 ]に則って構文解析するときに失敗したときは、 属性には所与の`初期~値$が指定されたものと見做される。 ◎ The Initial value column gives the initial value for the attribute. When an attribute fails to parse according to the specified CSS Value Definition Syntax, ABNF or EBNF grammar, or if parsing according to the URL Standard or by the prose describing how to parse the attribute indicates failure, the attribute is assumed to have been specified as the given initial value.

注記: `呈示~属性$の初期~値は、 対応する~propの初期~値になる。 `呈示~属性$にて`無効な値$を利用した場合,初期~値が指定されたかのように扱われるので、[ ~UA~stylesheetなど,優先度がより低い~stylesheet規則 ]からの値は,この値で上書きされ得る。 ◎ The initial value of a presentation attribute is its corresponding property's initial value. Since the use of an invalid value in a presentation attribute will be treated as if the initial value was specified, this value can override values that come from lower priority style sheet rules, such as those from the user agent style sheet.

例えば~UA~stylesheetは, `svg$e 要素~用の `overflow$p ~propを値 `hidden^v に設定するが、 対応する呈示~属性に — `overflow="invalid"^a のように — 無効な値を指定した場合、 `overflow$p を `visible^v に設定する規則になり,~UA~stylesheet値を上書きすることになる。 ◎ For example, although the user agent style sheet sets the value of the overflow property to hidden for ‘svg’ elements, specifying an invalid presentation attribute such as overflow="invalid" will result in a rule setting overflow to visible, overriding the user agent style sheet value.

“~animate可?” の欄は、`~animation要素$を利用して,当の属性を — `~SVG~animation~module@~SVGanim$にて定義されるように — ~animateし得るかどうかを指示する。 ◎ The Animatable column indicates whether the attribute can be animated using animation elements as defined in the SVG Animation module.

4.2.1. 実数r精度

他が言明されない限り,[ ~SVG属性 / ~SVG要素~上に効果があるものと定義された~prop ]における数量-値は、 少なくとも,~host~architectureが~supportする すべての有限~単精度~値を~supportするモノトスル。 ◎ Unless stated otherwise, numeric values in SVG attributes and in properties that are defined to have an effect on SVG elements must support at least all finite single-precision values supported by the host architecture.

座標系~変形nなどの演算~時には、 より高い精度の浮動小数点~storageの下で算出を遂行して,アリな限り[ 最良な精度を供する/丸め誤差を防止する ]ことが推奨される。 ◎ It is recommended that higher precision floating point storage and computation be performed on operations such as coordinate system transformations to provide the best possible precision and to prevent round-off errors.

`適合~SVG~viewer$には、 数量的な算出を — `適合性の判定基準@~SVGconform$に述べられるように — 適合性~classに則って遂行することが要求される。 ◎ conforming SVG viewers are required to perform numerical computation in accordance with their conformance class, as described in Conformance Criteria.

所与の数- %N を `最も精確に表現する文字列@ とは、次を満たす実装に特有な文字列とする 【この用語は、他所を簡潔に述べるため,この訳にて導入している。】 ⇒ `number$t の文法に`則って構文解析-$した結果は、 実装が~supportする実数r精度の下で, %N に最も近い数-値になる。

4.2.2. 特定0の範囲に制約された値の切詰ng

一部の[ 属性/~prop ]がとる数量-値の範囲は、制約されている。 他の値は、機器の能力により制約されることになる。 他が指定されない限り,~UAは、 範囲~外の~error検査ngを描画~処理-においてアリな限り後へ先送りするモノトスル。 これは、制限がある機器において,特に重要になる — 複合的な演算は、 途中で生産する値は範囲~外であっても,最終的な値は範囲~内になるかもしれないので。 ◎ Some numeric attribute and property values have restricted ranges. Other values will be restricted by the capabilities of the device. If not otherwise specified, the user agent shall defer any out-of-range error checking until as late as possible in the rendering process. This is particularly important for device limitations, as compound operations might produce intermediate values which are out-of-range but final values which are within range.

4.3. ~SVG~DOM概観

`~script実行@~SVGconform#processing-modes$を~supportする適合[ `~SVG~viewer$/`~SVG解釈器$ ]は、[ この仕様~全体を通して定義される~SVG~DOM~interface ]を — この節に挙げる特有な要件と依存関係の下で — 実装するモノトスル。 ◎ Conforming SVG viewers or SVG interpreters that support script execution must implement SVG DOM interfaces as defined throughout this specification, with the specific requirements and dependencies listed in this section.

~SVG-2要件: ~DOMを改善する。 ◎ SVG 2 Requirement: Improve the DOM.

  • 解決: 一般に,~SVG~DOMを~SVG-2用に改善する (`~~参照先@http://www.w3.org/2011/10/27-svg-irc#T18-35-49$)。 ◎ Resolution: We will generally improve the SVG DOM for SVG 2.
  • 目的: Java 寄りな部分を減らして,作者が~SVG~DOMを利用し易くする。 ◎ Purpose: Help authors use the SVG DOM by making it less Java-oriented.
  • Owner: Cameron (`3273$ACTION) ◎ Owner: Cameron (ACTION-3273)
  • 注記: `~SVG-2~DOM Wiki@http://www.w3.org/Graphics/SVG/WG/wiki/SVG_2_DOM$ ~pageを見よ。 ◎ Note: See SVG 2 DOM Wiki page.

~SVG-2要件: ~SVG~path~DOM~APIを改善する。 ◎ SVG 2 Requirement: Improve the SVG path DOM APIs.

  • 解決: ~SVG-2においては~SVG~path~DOM~APIを改善する (`~~参照先@http://www.w3.org/2011/10/27-svg-irc#T18-23-23$)。 ◎ Resolution: We will improve the SVG path DOM APIs in SVG 2.
  • 目的: `SVGPathSegList^I ~interfaceを整理して、 場合によっては Canvas と~APIを共有する。 ◎ Purpose: Clean up SVGPathSegList interface, and possibly share an API with Canvas.
  • Owner: Cameron (no action)

4.3.1. ~SVG~DOM~support用の依存関係

~SVG~DOMは、 `~Web~IDL@~WEBIDL$ ~interfaceの用語で定義される。 この仕様~内のすべての~IDL片は、 `WebIDL$r に述べられる `適合~IDL片@~WEBIDL#dfn-conforming-set-of-idl-fragments$に要求されるように解釈するモノトスル。 ◎ The SVG DOM is defined in terms of Web IDL interfaces. All IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [WebIDL]

~SVG~DOMは、いくつかの~DOM仕様 — 特に次に挙げるもの — の上に築かれる。 ◎ The SVG DOM builds upon a number of DOM specifications. In particular:

  • ~SVG~DOMには、[ この仕様が公表された時点における `Review Draft of the DOM living standard$cite に定義される~DOM ]用の全部的な~supportが要求される — ただし、その時点以降に[ 除去された/非推奨にされた ]特能は除く。 ~DOMを~supportする~SVG~softwareは、 アリな所では,少なくとも最新の `DOM$r を実装するベキである。 ◎ The SVG DOM requires full support for the DOM, as defined by the most recent Review Draft of the DOM living standard at the time this specification was published, except for any features that have been removed or deprecated since. SVG software with DOM support should implement the latest DOM standard wherever possible [DOM]
  • ~SVG~DOMには、 `uievents$r, `clipboard-apis$r の関連な側面の~supportが要求される (要求される特有な特能は、 `§ UI Events との関係性@~SVGinteract#RelationshipWithUIEVENTS$を見よ。) ◎ The SVG DOM requires support for relevant aspects of UI Events and Clipboard API and events ([uievents], [clipboard-apis]). (For the specific features that are required, see see Relationship with UI Events.)
  • ~SVG~DOMには、最低限[ `dom-level-2-style$r からのすべての~interfaceのうち `cssom-1$r 仕様にて落とされていないもの ]の完全な~supportが要求される。 ~SVG~softwareは、 アリな所では,最新~versionの `cssom-1$r を実装するベキである。 ◎ The SVG DOM requires, at a minimum, complete support for all interfaces from DOM Level 2 Style ([dom-level-2-style]) that have not been dropped in the CSS Object Model (CSSOM) specification. SVG software should implement the latest version of CSS Object Model (CSSOM) wherever possible ([cssom-1])
  • ~SVG~DOMには `geometry-1$r の完全な~supportが要求される。 ◎ The SVG DOM requires complete support for Geometry Interfaces Module Level 1 ([geometry-1]).

4.3.2. 命名~規約

~SVG~DOMは、 ~HTML, ~DOM標準に類似な命名~規約に従う。 `HTML$r `DOM$r ◎ The SVG DOM follows similar naming conventions to HTML and DOM standards ([HTML], [DOM]).

すべての名前は、 1 個~以上の英~単語を順に連結した単独の文字列を形成するように定義される。 ~prop名や~method名は、 先頭の単語は~~小文字から開始し, 後続な各~単語は~~大文字から開始する。 例えば,~fileが作成された日付などの文書~meta情報を返す~propは、 `fileDateCreated^l と命名されるであろう。 ◎ All names are defined as one or more English words concatenated together to form a single string. Property or method names start with the initial keyword in lowercase, and each subsequent word starts with a capital letter. For example, a property that returns document meta information such as the date the file was created might be named "fileDateCreated".

この仕様に定義される~interface名は、 ほぼすべて `SVG^l から開始される。 `~SVG名前空間$に属する要素~用の~DOM `Element$I ~objを表現する~interfaceは、[ `SVG^l, %要素~名, `Element^l ]を順に連結した形式に従う — ここで %要素~名 は、 要素の~tag名の頭文字を~~大文字化したものになる。 例えば `SVGRadialGradientElement$I は、 `radialGradient$e 要素~用の~interfaceを与える。 ◎ Interface names defined in this specification nearly all start with "SVG". Interfaces that represent the DOM Element object for an SVG-namespaced element follow the format SVGElementNameElement, where ElementName is the element's tag name with the initial letter capitalized. So SVGRadialGradientElement is the interface for an ‘radialGradient’ element.

この文字大小法~規約の例外は、 `SVGSVGElement$I であり,~tag名~全体が~~大文字化されている。 ◎ An exception to this casing convention is SVGSVGElement, in which the entire tag name is capitalized.

4.3.3. ~SVG~DOM内の要素

~SVG~softwareのうち,~SVG~DOMを~supportするよう要求されるものは、 `~SVG文書片$用に作成される~DOMを成す要素のうち`~SVG要素$に対応する `Element$I ~objを,次に従って~~増補するモノトスル: ◎ Any SVG software that is required to support the SVG DOM must enhance the DOM elements created for SVG document fragments as follows:

  • 自身が~supportする~SVG要素 (すなわち、~SVG名前~空間に属する要素のうち,その局所~名が[ この仕様/他の仕様 ]により定義され, 当の~softwareが実装するもの) は、その要素~定義にて識別される~DOM~interfaceも実装する。 ◎ Every Element object that corresponds to a supported SVG element (that is, an element with namespace URI "http://www.w3.org/2000/svg" and a local name that is one of the elements defined in this specification or another specification implemented by the software) must also implement the DOM interface identified in the element definition.
  • 自身が~supportしない~SVG要素は、 `SVGElement$I ~interfaceを実装する。 ◎ Elements in the SVG namespace whose local name does not match an element defined in any specification supported by the software must nonetheless implement the SVGElement interface.

`rect$e 要素~用に識別される~interfaceは、 `SVGRectElement$I である。 上の要件は、 `Element$I ~objのうち次を満たすものは, `SVGRectElement$I も実装するモノトスルことを意味する ⇒ [ 名前空間~URI ~EQ `http://www.w3.org/2000/svg^l ]~AND[ 局所~名 ~EQ `rect^l ] ◎ In The ‘rect’ element, the SVGRectElement interface is identified. This means that every Element object whose namespace URI is "http://www.w3.org/2000/svg" and whose local name is "rect" must also implement SVGRectElement.

4.3.4. ~DOMにおける 内容~属性の反映-法

多くの~SVG~DOM~prop(~IDL属性)が、 ある要素~型の対応する[ 内容~属性/~prop【~CSS~propに対応する`呈示~属性$】 ]を `反映する@ ものとされる — それは、内容~属性と~IDL属性が,同じ下層の~dataを表現することを意味する。 例えば, `SVGRectElement$I1 上の `ry$m1 属性は、 当の~objが~~表現する `rect$e 要素~上の `ry$p 呈示~属性を反映する。 ◎ Many SVG DOM properties (IDL attributes) reflect a content attribute or property on the corresponding element, meaning that content and IDL attributes represent the same underlying data. For example, the SVGAnimatedLength ry in an SVGRectElement reflects the ry presentation attribute on the associated ‘rect’ element.

この反映の仕方は、 当の~IDL属性の型に応じて,以下に従う: ◎ The way this reflection is done depends on the type of the IDL attribute:

`~primitive型$
`文字列~型$†
`DOMTokenList$I ††
`long^I 型(例: `SVGElement$I 上の `tabIndex$n )や `DOMString^I 型(例: `SVGStyleElement$I 上の `title$n )など。 ◎ If the type of the reflecting IDL attribute is a primitive type (such as long, as used by tabIndex on SVGElement) or DOMString (as used by title on SVGStyleElement),\
~HTMLによる[ `内容~属性を反映する~IDL属性の規則@~HTMLcdom#reflecting-content-attributes-in-idl-attributes$ ]に従う。 ◎ then the rules for reflecting content attributes in IDL attributes in HTML are used.
【† 文字列~型は、この訳による補完 (~Web~IDLに定義される~primitive型には、実際には含まれていないので)。 】【†† `DOMTokenList^I は、この訳による補完。 `SVGAElement$I 上の `relList$n 属性に利用される。 】
`SVGAnimatedBoolean$I
`SVGAnimatedString$I
`SVGAnimatedEnumeration$I
`SVGAnimatedNumber$I
`SVGAnimatedNumberList$I
`SVGAnimatedLength$I
`SVGAnimatedLengthList$I
`SVGAnimatedAngle$I
`SVGAnimatedRect$I
`SVGAnimatedPreserveAspectRatio$I
~IDL属性が返すこれらの~objも,当の内容~属性を`反映する$という。 ~objの挙動は,~objに`関連な要素$を通して述べられる。 それは、他が指定されない限り,[ ~objを返した当の~IDL属性を持つ~interfaceを実装する,特定0の要素 ]になるモノトスル。 【!それぞれ、反映している~interfaceを定義している節に与える規則に従う。】 ◎ If the type of the reflecting IDL attribute is an SVGAnimatedBoolean, SVGAnimatedString, SVGAnimatedEnumeration, SVGAnimatedNumber, SVGAnimatedNumberList, SVGAnimatedLength, SVGAnimatedLengthList, SVGAnimatedAngle, SVGAnimatedRect or SVGAnimatedPreserveAspectRatio, then the rules in the corresponding section defining the reflecting interface are used.
注記: 高~levelからは,これらの~obj上の `baseVal^m は、 【`反映を継承する$ことを通して】 ~objが~CSS~propを反映するならば 呈示~属性を反映するために利用され, そうでなければ 内容~属性の値を反映するために利用される。 ◎ At a high level, the object's baseVal is used to reflect the value of the content attribute. For objects that reflect a CSS property, the baseVal is used to reflect the presentation attribute.

`反映する$関係性は,~liveであり、 内容~属性, それを反映する~prop(~IDL属性)いずれかが改変されたときは, 互いの値は同期するモノトスル (`§ 反映される値の同期-法@#SynchronizingReflectedValues$に与える規則に従って)。 ◎ This relationship is live, and values must be synchronized (following the rules in Synchronizing reflected values) when either the attribute or its reflected property is modified.

当の属性が文書~markup内に明示的に指定されていない場合でも、 それを反映する~objは,~accessされる前に属性の初期~値に初期化される。 属性の初期~値は “(ナシ)” と記されている場合、 ~objは、`§ 空な初期~値の反映-法@#SVGObjectInitialization$に定義されるように初期化される。 この新たに構築された~objは、 初回に改変されるまでは,要素~上には属性を生成しない。 対応する属性に加えられた改変は、 当の~objに即時に反映される。 ◎ If the attribute hasn't been specified explicitly in the document markup, the reflected object is nonetheless initialized upon access, to the attribute's initial value. If the attribute's initial value is (none), the object is initialized as defined in Reflecting an empty initial value. This newly constructed object does not generate an attribute on the element until it is modified for the first time. Modifications made to the corresponding attribute are immediately reflected in the object.

ある `line$e 要素を表現している `SVGLineElement$I ~obj %E に対し, %E`.x1.baseVal^m が~accessされ,要素の `x1$a 属性は文書~内に指定されていなかった場合、 この属性~用の初期~値は `0^v なので,返される `SVGLength$I ~objは`利用元~単位$による値 `0^v を表現することになる。 ◎ If lineElement.x1.baseVal is accessed (where lineElement is an instance of SVGLineElement) and the ‘x1’ attribute was not specified in the document, the returned SVGLength object would represent the value 0 user units, because the initial value for the attribute is 0.

【 以下の用語は、原文にて様々な箇所に分散して述べられている[ 用語/言い回し/句 ]を整理して統一的に表現するために,この訳に導入している。 】

反映-法の目的においては、 一部の型の各~objには,次が定義される:

`関連な要素@
【!#NumberAssociatedElement/#LengthAssociatedElement/#AngleAssociatedElement/~SVGcoords#TransformAssociatedElement/~SVGshapes#PointAssociatedElement】 特定0の要素,または ε 。 他が指定されない限り, ε とする。 【ε は、原文では `detached^en という句で表現されている。】
`関連な要素$は、[ 当の~objを返した~IDL属性が,ある名前の内容~属性を`反映する$ものと定義されている ]場合に,どの要素のそれを更新するか決定するために利用される。
上述したように、 どの `SVGAnimated…^I ~objにも`関連な要素$は常にある。 他の~obj(例:`~list~interface~obj$)も、 別の~objの`反映を継承する$ことを通して,`関連な要素$が設定され得る。
`反映先の属性@
~objに`関連な要素$ ~NEQ ε ならば,[ その要素~上の,~objが反映する内容~属性 ]を指す(他の場合、この用語は利用し得ない)。
`関連な要素$が在っても,要素が反映先の属性を`有する^emことにはならないことに注意。 反映先の属性は、 実際には ( 特定0の要素, 属性の`名前^em ) の組を意味する。 同様に,属性を`反映する$の定義を成す “属性” は、 実際には ( 特定0の要素~型, 属性の名前 ) の組を意味する。

【!#NumberMode/#LengthMode/#AngleMode/~SVGshapes#PointMode/~SVGcoords#MatrixMode】 ~obj %A が~obj %B の `反映を継承する@ とは、次のようにすることを意味する ⇒# %A に`関連な要素$ ~SET %B に`関連な要素$, %A は %B と同じ内容~属性を`反映する$

4.3.5. 反映される値の同期-法

~obj %O の`反映先の属性$の`基底~値$が変化したときは、 その直後に次に与える `~objを同期する@ 手続きを走らすモノトスル: ◎ Whenever a reflected content attribute's base value changes, then the reflecting object must be synchronized, immediately after the value changed, by running the following steps:

  1. ~IF[ %O は`~list~interface~obj$である ] ⇒ `~list~interface~objを同期する$( %O ) ◎ If the reflecting object is a list interface object, then run the steps for synchronizing a list interface object.
  2. ~ELSE ⇒ %O の値 ~SET %O の`反映先の属性$の`基底~値$ ◎ Otherwise, update the object's value to be the base value of the reflected content attribute (using the attribute's initial value if it is not present or invalid).

    注記: これにより、例えば `SVGLength$I ~objの`長さ値$は,更新されることになる。 ◎ This will, for example, update the value of an SVGLength object.

`必要なら内容~属性を直列化し直す@ ときは、所与の ( ~obj %O ) に対し,次を走らす:

  1. ~IF[ %O に`関連な要素$ ~EQ ε ] ⇒ ~RET
  2. `内容~属性を直列化し直す$( %O の`反映先の属性$ )

【 この手続きは、他所を簡潔に記すため,この訳に導入している。 】

`内容~属性を直列化し直す@ ときは、所与の ( ある`反映先の属性$ %属性, 特定の値 %値 (省略時は ε ) ) に対し, %属性 の値を次の手続きを遂行した結果に設定するモノトスル: ◎ When a reflected content attribute is to be reserialized, optionally using a specific value, the following steps must be performed:

  1. ~IF[ %値 ~EQ ε ] ⇒ %値 ~SET %属性 を反映している~IDL属性の値 ◎ Let value be the specific value given, or the value of the content attribute's reflecting IDL attribute if a specific value was not provided.
  2. %値 の型に応じて: ◎ Depending on value's type:

    `SVGAnimatedBoolean$I
    `SVGAnimatedNumber$I
    `SVGAnimatedLength$I
    `SVGAnimatedAngle$I
    `SVGAnimatedRect$I
    `SVGAnimatedString$I
    `SVGAnimatedNumberList$I
    `SVGAnimatedLengthList$I
    `SVGAnimatedTransformList$I
    ~RET `内容~属性を直列化し直す$( %属性, %値 の `baseVal^m ~memberの値 ) ◎ Reserialize the content attribute using value's baseVal member.
    `SVGAnimatedEnumeration$I
    1. ~RET [ %値 の `baseVal^m ~memberが返す数-値に対応する %属性 の~keyword値があれば それ / ~ELSE_ (すなわち数-値 ~EQ 0 )空~文字列 ] ◎ Let number be the value of value's baseVal member. ◎ Let keyword be the content attribute's keyword value corresponding to number, or the empty string if number is 0.

      注記: これは、当の列挙~値が どうにかして “未知な” 値に設定された場合、 %属性 は 空~文字列に設定されることを意味する。 しかしながら、 この未知な値が `SVGAnimatedEnumeration$I ~obj上に直に設定されることは決してない — それは、~markup内に未知な属性~値が設定されたことを表現する。 ◎ This means that if the enumeration value is somehow set to the "unknown" value, the content attribute will be set to the empty string. However, this unknown value can never be set directly on the SVGAnimatedEnumeration object; it represents an unknown attribute value set in the markup. ◎ Set the content attribute to keyword.

    `boolean^I
    ~RET [ %値 ~EQ ~T ならば `true^l / ~ELSE_ `false^l ] ◎ Set the content attribute to "true" if value is true, and "false" otherwise.
    `float^I
    `double^I
    ~RET %値 を`最も精確に表現する文字列$ ◎ Set the content attribute to an implementation specific string that, if parsed as a <number> using CSS syntax, would return the number value closest to value, given the implementation's supported real number precision.
    `SVGLength$I1
    ~RET %値 の `valueAsString$m1 ~memberが返すことになる値 ◎ Set the content attribute to the value that would be returned from getting value's valueAsString member.
    `SVGAngle$I1
    ~RET %値 の `valueAsString$m1 ~memberが返すことになる値 ◎ Set the content attribute to the value that would be returned from getting value's valueAsString member.
    `DOMRect$I
    1. %成分たち ~LET 次に挙げる文字列からなる同順の~list ⇒ %値 の[ `x$n, `y$n, `width$n, `height$n ]~memberの値を`最も精確に表現する文字列$ ◎ Let components be a list of four values, being the values of the x, y, width and height members of value. ◎ Let serialized components be a list of four strings, where each is an implementation specific string that, if parsed as a <number> using CSS syntax, would return the number value closest to the corresponding value in components, given the implementation's supported real number precision.
    2. ~RET %成分たち を `0020^U `SPACE^cn で`連結する$ ◎ Set the content attribute to a string consisting of the strings in serialized components joined and separated by single U+0020 SPACE characters.
    `DOMString^I
    ~RET %値 ◎ Set the content attribute to value.
    `~list~interface$ ◎ SVGNumberList SVGLengthList SVGPointList SVGTransformList SVGStringList
    1. %結果 ~LET 新たな`~list$ ◎ ↓
    2. %値 が表現する~listを成す ~EACH( %~item ) に対し ⇒ %~item の型に応じて,次に与える文字列を %結果 に`付加する$: ◎ Let elements be the list of values in value. ◎ The values will be SVGNumber, SVGLength, DOMPoint or SVGTransform objects, or DOMString values, depending on value's type. ◎ Let serialized elements be a list of strings, where each string is formed based on the corresponding value in elements and its type:

      • `SVGNumber$I1 ⇒ %~item の `value$m1 ~memberが返すことになる値を`最も精確に表現する文字列$ ◎ an SVGNumber object • The string is an implementation specific string that, if parsed as a <number> using CSS syntax, would return the number value closest to the SVGNumber object's value member, given the implementation's supported real number precision.
      • `SVGLength$I1 ⇒ %~item の `valueAsString$m1 ~memberが返すことになる値 ◎ an SVGLength object • The string is the value that would be returned from getting the value's valueAsString member.
      • `DOMPoint$I ⇒ 次を順に~~連結した結果 ⇒# %~item の `x 座標$の値を`最も精確に表現する文字列$, 1 個の `002C^U `COMMA^cn, %~item の `y 座標$の値を`最も精確に表現する文字列$ ◎ a DOMPoint object ◎ The string value is computed as follows: • Let string be an empty string. • Let x and y be the values of the DOMPoint object's x and y coordinates, respectively. • Append to string an implementation specific string that, if parsed as <number> using CSS syntax, would return the number value closest to x, given the implementation's supported real number precision. • Append a single U+002C COMMA character to string. • Append to string an implementation specific string that, if parsed as <number> using CSS syntax, would return the number value closest to y, given the implementation's supported real number precision. • The string is string.
      • `SVGTransform$I ⇒ %~item を成す`行列~obj$を`直列化-@~TRANSFORM#serialization-of-transform-functions$した結果 ◎ a SVGTransform object • The string is the serialization of the SVGTransform object's matrix object.
      • `DOMString^I ⇒ %~item ◎ a DOMString • The string is the DOMString's value itself.
    3. ~RET %結果 を `0020^U `SPACE^cn で`連結する$ ◎ Set the content attribute to a string consisting of the strings in serialized elements joined and separated by single U+0020 SPACE characters.

4.3.6. 空な初期~値の反映-法

~NULLまたは空な初期~値を`反映する$ ~SVG~DOM属性を初期化するときは、 当の~propはこの節に定義されるように,その~data型に則って初期化するモノトスル。 これは、`反映先の属性$用の明示的な値がない, かつ属性の定義~表tにて初期~値は “(ナシ)” と記されている 場合に限り生じる。 ◎ When initializing an SVG DOM attribute that reflects a null or empty initial value, then the property must be initialized according to its data type, as defined in this section. This occurs only if there is no explicit value for the reflected content attribute, and the initial value in the attribute's definition table is (none).

以下に挙げられていない~interfaceを実装する~objの初期化は、[ ~interfaceが包含する,当の~obj用の値を利用して行うモノトスル ]ことを意味する — 例えば、 `SVGAnimatedString$I は 2 個の `DOMString^I ~memberからなる一方で, `DOMRect$I は多くの `double^I 型からなる。 ◎ If an interface is not listed below that means that the object initialization shall be done using the values for the objects that the interface contains, e.g., an SVGAnimatedString consists of two DOMString members, while a DOMRect consists of many doubles.

`DOMString^I
空~文字列に初期化する。 ◎ Initialized as the empty string ("").
`数量-型$ `WebIDL$r ◎ float ◎ long ◎ short ◎ Any other numeric type defined in WebIDL
`0^v に初期化する。 ◎ Initialized as 0.
`boolean^I
`false^v に初期化する。 ◎ Initialized as false.
`SVGLength$I1
`長さ値$を ( 0, 単位無し ) に初期化する。 ◎ Initialized as 0 user units (SVG_LENGTHTYPE_NUMBER).
`SVGLengthList$I
`SVGNumberList$I
`SVGPointList$I
`SVGStringList$I
`SVGTransformList$I
空~listに初期化する。 ◎ Initialized as the empty list.
`SVGAngle$I1
`角度~値$を ( 0, 単位無し ) に初期化する。 ◎ Initialized as 0 in unspecified units (SVG_ANGLETYPE_UNSPECIFIED).
`SVGPreserveAspectRatio$I
`xMidYMid meet^v に初期化する。 ◎ Initialized as 'xMidYMid meet'.

`SVGTextElement$I のある~instance %textElement 上で `dx.baseVal^c が~accessされたとき, `dx$a 属性が文書~内では指定されていなかった場合、 返される `SVGLengthList$I ~objは空になる。 ◎ If textElement.dx.baseVal is accessed (where textElement is an instance of SVGTextElement) and the ‘dx’ attribute was not specified in the document, the returned SVGLengthList object would be empty.

4.3.7. 無効な値

~scriptが,ある内容~属性を`反映する$~DOM属性に`無効な値$を設定しようとした場合でも(例:負でない数を要求する属性に対する負な数)、 この仕様が他を指示しない限り,例外は投出しないモノトスルが、 所与の文書片は — `§ ~error処理@~SVGconform#ErrorProcessing$に述べたとおり — 形上では`~errorになる^emモノトスル。 ◎ If a script sets a reflected DOM attribute to an invalid value for the content attribute (e.g., a negative number for an attribute that requires a non-negative number), unless this specification indicates otherwise, no exception shall be raised on setting, but the given document fragment shall become technically in error as described in Error processing.

注記: 整数~定数を利用している列挙d値を反映する~DOM属性は,例外であり、 これらに[ 範囲~外の整数/未知な属性~値を表現する定数( 0 ) ]が設定されようとしたときは, `TypeError$E が投出される。 これは、`~Web~IDL列挙~型の挙動@~WEBIDLjs#js-enumeration$と一貫する。 `WebIDL$r ◎ DOM attributes that reflect enumerated values using integer constants are an exception: these throw a TypeError when set to an out-of-range integer, or to the constant (0) that represents an unknown attribute value. This is consistent with the behavior of the WebIDL enumeration type [WebIDL].

4.4. ~SVG要素~用の各種~DOM~interface

4.4.1. `SVGElement^I ~interface

~SVG~DOM~interfaceのうち,~SVG言語に属する要素に直に対応するもの (例: `path$e 要素~用の `SVGPathElement$I ~interface)は、 すべて `SVGElement$I ~interfaceから導出される。 ◎ All of the SVG DOM interfaces that correspond directly to elements in the SVG language (such as the SVGPathElement interface for the ‘path’ element) derive from the SVGElement interface.

注記: `SVGElement^I には、 ~CSSOM仕様により `style^m ~IDL属性が増補される — ~HTML要素と同じ仕方で `style$a 属性に~accessできるように。 ◎ The CSSOM specification augments SVGElement with a style IDL attribute, so that the ‘style’ attribute can be accessed in the same way as on HTML elements.

[Exposed=Window]
interface `SVGElement^I0 : `Element$I {

  [SameObject] readonly attribute `SVGAnimatedString$I `className$m;

  readonly attribute `SVGSVGElement$I? `ownerSVGElement$m;
  readonly attribute `SVGElement$I? `viewportElement$m;
};

`SVGElement$I includes `GlobalEventHandlers$I;
`SVGElement$I includes `DocumentAndElementEventHandlers$I;
`SVGElement$I includes `SVGElementInstance$I;
`SVGElement$I includes `HTMLOrSVGElement$I;
`className@m
コレの `class$a 内容~属性を`反映する$。 ◎ The className IDL attribute reflects the ‘class’ attribute.
注記: この属性は非推奨にされた。 この仕様の将来~versionでは除去され得る。 作者には、代わりに `Element.classList^m を利用することを勧める。 ◎ This attribute is deprecated and may be removed in a future version of this specification. Authors are advised to use Element.classList instead.
注記: この属性は、 ~Web~IDLによる継承~用の規則に従って, `Element$I 上の対応する属性を上書きする。 ◎ The className attribute on SVGElement overrides the correspond attribute on Element, following the WebIDL rules for inheritance.
`ownerSVGElement@m
最も近い先祖 `svg$e 要素を表現する。 ◎ The ownerSVGElement IDL attribute represents the nearest ancestor ‘svg’ element.
その取得子~手続きは ⇒ ~RET [ コレは`最外縁の~svg要素$であるならば ~NULL / ~ELSE_ コレに最も近い先祖 `svg$e 要素 ] ◎ On getting ownerSVGElement, the nearest ancestor ‘svg’ element is returned; if the current element is the outermost svg element, then null is returned.
`viewportElement@m
コレ用の~SVG表示域を供する要素を表現する。 ◎ The viewportElement IDL attribute represents the element that provides the SVG viewport for the current element.\
その取得子~手続きは ⇒ ~RET [ コレは`最外縁の~svg要素$であるならば ~NULL / ~ELSE_ コレの先祖であって~SVG表示域を確立する要素のうち コレに最も近いもの ] ◎ On getting viewport, the nearest ancestor element that establishes an SVG viewport is returned; if the current element is the outermost svg element, then null is returned.

4.4.2. `SVGGraphicsElement^I ~interface

~SVG-2要件: [ ~mouse~eventは図形の~fill, ~strokeどっちで生じたか ]を検出する。 ◎ SVG 2 Requirement: Detect if a mouse event is on the fill or stroke of a shape.

  • 解決: ~SVG-2は、[ ~mouse~eventは要素の~fill, ~strokeどっちで生じたか ]を,より容易に検出-可能にする (`~~参照先@http://www.w3.org/2012/03/22-svg-irc#T20-20-03$)。 ◎ Resolution: SVG 2 will make it easier to detect if an mouse event is on the stroke or fill of an element.
  • 目的: 要素を重複する必要なく[ ~pointer~eventは,要素の~fill, ~strokeどっちで生じたか ]で差別化することを,作者に許容する ◎ Purpose: To allow authors to discriminate between pointer events on the fill and stroke of an element without having to duplicate the element
  • Owner: Cameron (`3279$ACTION)
  • Status: Done.

`SVGGraphicsElement$I ~interfaceは、 ~SVG要素を表現するために利用される。 その首な目的は、 ある~groupの中に~graphicを直に描画することである。 ◎ The SVGGraphicsElement interface represents SVG elements whose primary purpose is to directly render graphics into a group.

dictionary `SVGBoundingBoxOptions@I {
  boolean fill = true;
  boolean stroke = false;
  boolean markers = false;
  boolean clipped = false;
};

[Exposed=Window]
interface `SVGGraphicsElement^I0 : `SVGElement$I {
  [SameObject] readonly attribute `SVGAnimatedTransformList$I `transform$m;

  `DOMRect$I `getBBox$m(optional `SVGBoundingBoxOptions$I %options = {});
  `DOMMatrix$I? `getCTM$m();
  `DOMMatrix$I? `getScreenCTM$m();
};

`SVGGraphicsElement$I includes `SVGTests$I;
`transform@m
コレの `transform$p ~propとそれに対応する `transform^a 呈示~属性の算出d値を`反映する$。 ◎ The transform IDL attribute reflects the computed value of the transform property and its corresponding ‘transform’ presentation attribute.
`getBBox(options)@m
コレの限界~boxを算出するために利用される。 ◎ The getBBox method is used to compute the bounding box of the current element.\
その~method~手続きは、[ コレに対し `限界~box~algo@~SVGcoords#BoundingBoxes$を呼出して算出された限界~box ]をコレの利用元~座標系で定義する,新たな `DOMRect$I ~objを返す — %options 辞書~引数の[ `fill^c, `stroke^c, `markers^c, `clipped^c ]~memberは、 コレの限界~boxのどの部位を含むか制御するために利用される。 ◎ When the getBBox(options) method is called, the bounding box algorithm is invoked for the current element, with fill, stroke, markers and clipped members of the options dictionary argument used to control which parts of the element are included in the bounding box, using the element's user coordinate system as the coordinate system to return the bounding box in. A newly created DOMRect object that defines the computed bounding box is returned.\
`描画されない要素$上で~callされた場合、 ~UAは要素の幾何を算出-可能でないならば `InvalidStateError$E が投出される。 ◎ If getBBox gets called on a non-rendered element, and the UA is not able to compute the geometry of the element, then throw an InvalidStateError.
`getCTM()@m
コレの座標系からコレの~SVG表示域の座標系へ変形する行列を取得する。 ◎ The getCTM method is used to get the matrix that transforms the current element's coordinate system to its SVG viewport's coordinate system.\

その~method~手続きは: ◎ When getCTM() is called, the following steps are run:

  1. ~IF[ コレは文書~内にない ] ⇒ ~RET ~NULL ◎ If the current element is not in the document, then return null.
  2. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは コレの~styleを解決-可能でない ] ⇒ ~RET ~NULL ◎ If the current element is a non-rendered element, and the UA is not able to resolve the style of the element, then return null.
  3. %ctm ~LET コレに応じて次で決定される行列: ◎ Let ctm be a matrix determined based on what the current element is:

    `最外縁の~svg要素$ ◎ the current element is the outermost svg element
    コレの座標~空間から文書の表示域の座標~空間へ変形する行列(コレの `transform$p ~propを含めて) — この行列は、 コレ上の次に挙げるものに因り生産される変形を含む ⇒# `viewBox$a 内容~属性, `preserveAspectRatio$a 内容~属性, `transform$p ~prop, `currentScale$n ~IDL属性, `currentTranslate$n ~IDL属性 ◎ ctm is a matrix that transforms the coordinate space of the ‘svg’ (including its transform property) to the coordinate space of the document's viewport. The matrix includes the transforms produced by the ‘viewBox’ and ‘preserveAspectRatio’ attributes, the transform property, and any transform due to currentScale and currentTranslate properties on the SVGSVGElement.
    他の要素 ◎ any other element
    コレの座標~空間から[ コレの先祖であって表示域を確立している要素のうち,コレに最も近いもの ]の座標~空間へ変形する行列(コレ, および先祖の `transform$p ~propを含めて) ◎ ctm is a matrix that transforms the coordinate space of the current element (including its transform property) to the coordinate space of its closest ancestor viewport-establishing element (also including its transform property).
  4. ~RET %ctm と同じ行列を表現する新たな `DOMMatrix$I ~obj 【!detached/~SVGcoords#MatrixMode】 ◎ Return a newly created, detached DOMMatrix object that represents the same matrix as ctm.
`getScreenCTM()@m
コレの座標系から~SVG文書片~用の~SVG表示域の座標系へ変形する行列を取得する。 ◎ The getScreenCTM method is used to get the matrix that transforms the current element's coordinate system to the coordinate system of the SVG viewport for the SVG document fragment.\

その~method~手続きは: ◎ When getScreenCTM() is called, the following steps are run:

  1. ~IF[ コレは文書~内にない ] ⇒ ~RET ~NULL ◎ If the current element is not in the document, then return null.
  2. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは コレの~styleを解決-可能でない ] ⇒ ~RET ~NULL ◎ If the current element is a non-rendered element, and the UA is not able to resolve the style of the element, then return null.
  3. %ctm ~LET コレの座標~空間から文書の表示域の座標~空間へ変形する行列(コレの `transform$p ~propも含めて) ◎ Let ctm be a matrix that transforms the coordinate space of the current element (including its transform property) to the coordinate space of the document's viewport.

    注記: これには、次に挙げるものが含まれる: ◎ This will include:

    • コレから`最外縁の~svg要素$までのすべての変形 ◎ all of the transforms from the current element up to the outermost svg element
    • 次に挙げるものに因る変形 ⇒ コレ上の[ `viewBox$a 内容~属性, `preserveAspectRatio$a 内容~属性, コレ上の `transform$p ~prop ], `最外縁の~svg要素$上の[ `currentScale$n, `currentTranslate$n ]~IDL属性 ◎ any transforms due to ‘viewBox’, ‘preserveAspectRatio’, the transform property and any transform due to currentScale and currentTranslate properties on the SVGSVGElement for the outermost svg element
    • ~SVG表示域の座標~空間から文書の表示域への変形 — すなわち,~SVG文書片が~HTML文書~内の~inlineであるときは、 `最外縁の~svg要素$の~boxから初期~包含塊までの すべての~CSS~boxの位置を織り込む。 ◎ any transforms from the SVG viewport's coordinate space to the document's viewport, i.e. taking into account the positions of all of the CSS boxes from the outermost svg element's box to the initial containing block when the SVG document fragment is inline in an HTML document
  4. ~RET %ctm と同じ行列を表現する,新たな `DOMMatrix$I ~obj 【!detached】 ◎ Return a newly created, detached DOMMatrix object that represents the same matrix as ctm.
注記: この~methodは `getClientCTM^l と命名された方がふさわしいが、 歴史的な理由から名前 `getScreenCTM^l が保たれている。 ◎ This method would have been more aptly named as getClientCTM, but the name getScreenCTM is kept for historical reasons.

4.4.3. `SVGGeometryElement^I ~interface

`SVGGeometryElement$I ~interfaceは、 ~SVG要素のうち[ その描画が `等価な~path$を伴う幾何により定義され,[ ~fill/~stroke ]できるもの ]を表現する。 これには、~pathと基本~図形が含まれる。 ◎ Interface SVGGeometryElement represents SVG elements whose rendering is defined by geometry with an equivalent path, and which can be filled and stroked. This includes paths and the basic shapes.

[Exposed=Window]
interface `SVGGeometryElement^I0 : `SVGGraphicsElement$I {
  [SameObject] readonly attribute `SVGAnimatedNumber$I `pathLength$m;

  boolean `isPointInFill$m(optional `DOMPointInit$I %point = {});
  boolean `isPointInStroke$m(optional `DOMPointInit$I %point = {});
  float `getTotalLength$m();
  `DOMPoint$I `getPointAtLength$m(float %distance);
};
`isPointInFill(point)@m

その~method~手続きは:

  1. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは コレの~styleを解決-可能でない ] ⇒ ~THROW `InvalidStateError$E
  2. ~RET ~IS ~AND↓:

    • %point の `x^m, `y^m 両~memberとも有限である
    • %point が与えるコレの座標~空間における点は、 コレの `fill-rule$p ~propが指示する巻数~規則で決定される~pathの内側にある ⇒ ~pathの内側を算出するときには、 開な下位pathは — 実際の下位pathに影響することなく — 暗黙的に閉じられ,~path上の点は ~pathの内側にあると見なす。

    返される値は、 `fill-rule$p 以外の どの視覚的な~CSS~propにも依存しない。

◎ The isPointInFill method, when invoked, must return true if the point given by point passed to the method, in the coordinate space of an element, is inside the intended path as determined by the winding rule indicated by the fill-rule property of an element; and must return false otherwise. Open subpaths must be implicitly closed when computing the area inside the path, without affecting the actual subpaths. Points on the path itself must be considered to be inside the path. The returned value is independent of any visual CSS property but fill-rule If either of the x or y properties on point are infinite or NaN, then the method must return false. If current element is a non-rendered element, and the UA is not able to compute the geometry of the element, then throw an InvalidStateError.
注記: この~methodは、 当の要素が `clipPath$e 要素の子であっても,自身の `fill-rule$p ~propが指示する巻数~規則を用いる。 ◎ isPointInFill takes the winding rule indicated by the fill-rule property of an element even if the element is a child of a ‘clipPath’ element.
注記: この~methodは、 `CanvasDrawPath$I ~mixin上の `isPointInPath()$n ~methodに, ~SVG文脈が許容する限り揃うようにされている。 ◎ isPointInFill is aligned with the isPointInPath method on the CanvasDrawPath mixin as much as the SVG context allows it to be.
`isPointInStroke(point)@m

その~method~手続きは:

  1. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは コレの~styleを解決-可能でない ] ⇒ ~THROW `InvalidStateError$E
  2. ~RET ~IS ~AND↓:

    • %point の `x^m, `y^m 両~memberとも有限である
    • %point が与えるコレの座標~空間における点は、 コレに適用された~strokeが成す外形線~path上にある ⇒ この外形線~pathには、 次に挙げる,コレの~stroke~propを織り込むモノトスル ⇒# `stroke-width$p, `stroke-linecap$p, `stroke-linejoin$p, `stroke-miterlimit$p, `stroke-dasharray$p, `stroke-dashoffset$p, `vector-effect$p

      詳細は `§ ~strokeを成す図形の算出-法@~SVGpainting#StrokeShape$, `§ ~vector効果@~SVGpainting#PaintingVectorEffects$ を見よ。

    返される値は、 上に挙げた~prop以外の どの視覚的な~CSS~propにも依存しない。

◎ The isPointInStroke method, when invoked, must return true if the point given by point passed to the method, in the coordinate space of an element, is in or on the outline path of an applied stroke on an element; and must return false otherwise. The outline path must take the stroke properties stroke-width, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-dasharray, stroke-dashoffset and vector-effect of an element into account. See sections Computing the shape of the stroke and Vector effects for details. The returned value is independent of any visual CSS property but the listed stroke properties. If either of the x or y properties on point are infinite or NaN, then the method must return false. If current element is a non-rendered element, and the UA is not able to compute the geometry of the element, then throw an InvalidStateError.
注記: この~methodは、 `CanvasDrawPath$I ~mixin上の `isPointInStroke()$n ~methodに, ~SVG文脈が許容する限り揃うようにされている。 ◎ isPointInStroke is aligned with the isPointInStroke method on the CanvasDrawPath mixin as much as the SVG context allows it to be.
`pathLength@m
`pathLength$a 内容~属性を`反映する$。 ◎ The pathLength IDL attribute reflects the ‘pathLength’ content attribute.
`getTotalLength()@m
~pathの長さを算出する。 ◎ The getTotalLength method is used to compute the length of the path.\

その~method~手続きは:

  1. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは ~pathの総-長さを解決-可能でない ] ⇒ ~THROW `InvalidStateError$E
  2. ~RET ~UAにより算出された,利用元~単位による~pathの総-長さ値
◎ When getTotalLength() is called, the user agent's computed value for the total length of the path, in user units, is returned. If current element is a non-rendered element, and the UA is not able to compute the total length of the path, then throw an InvalidStateError.
注記: この~path長さには `pathLength$a 属性は織り込まれない。 ◎ The user agent's computed path length does not take the ‘pathLength’ attribute into account.
`getPointAtLength(distance)@m
~pathに沿って所与の %distance にある点を返す。 ◎ The getPointAtLength method is used to return the point at a given distance along the path.\

その~method~手続きは: ◎ When getPointAtLength(distance) is called, the following steps are run:

  1. ~IF[ コレは`描画されない要素$である ]~AND[ ~UAは ~pathの総-長さを解決-可能でない ] ⇒ ~THROW `InvalidStateError$E ◎ If current element is a non-rendered element, and the UA is not able to compute the total length of the path, then throw an InvalidStateError.
  2. %長さ ~LET ~UAが算出した~pathの総-長さ値(利用元~単位による) ◎ Let length be the user agent's computed value for the total length of the path, in user units.

    注記: `getTotalLength$m と同様に,これには `pathLength$a 属性は織り込まれない。 ◎ As with getTotalLength, this does not take into account the ‘pathLength’ attribute.

  3. %distance を 0 以上, %長さ 以下に切詰める ◎ Clamp distance to [0, length].
  4. %P ~LET ~path上の距離 %distance にある点 ◎ Let (x, y) be the point on the path at distance distance.
  5. ~RET %P を表現する新たな `DOMPoint$I ~obj 【!detached】 ◎ Return a newly created, detached DOMPoint object representing the point (x, y).

4.5. 基本~data型~用の各種~DOM~interface

【!~SVGshapes#ReadOnlyPoint】 【!~SVGcoords#ReadOnlyTransform】

次に挙げる型の各~objは、 `読専~flag@ を持ち,他が指定されない限り ~F をとるとする ⇒# `~list~interface$, `SVGNumber$I, `SVGLength$I, `SVGAngle$I, `SVGTransform$I, `DOMPoint$I,【!`DOMMatrix$I,】 `SVGPreserveAspectRatio$I,

`読専~flag$が ~T にされた下で,当の~objを改変しようと試みた場合、 以下に述べるように例外が投出される。

【 `読専~flag$は、 原文にて各~型ごとに定義されている同じ意味の句を 1 つに集約するため, この訳に導入している (加えて、~algoの記述を簡明にするため,~flagとして形式化している)。 】【 `~list~interface~obj$の`読専~flag$は、 それが表現する~listを成す各~itemにも “継承される”。 】【 一般に、各種 `SVGAnimated…^I ~interfaceの `animVal^m 属性が返す~objの`読専~flag$は, ~T にされる。 】【 原文には、 `読専~flag$を利用しつつ, ~T にする機会が見当たらない~objも散見される — この訳における読専~flagの設定-法には、 実装の挙動から推定している箇所もある。 】

4.5.1. `SVGNumber^I ~interface

`SVGNumber$I ~interfaceは、 首に `SVGNumberList$I の一部を成す `number$t 値を表現するために利用される。 ~scriptも個々の `SVGNumber$I ~objを作成できる。 ◎ The SVGNumber interface is used primarily to represent a <number> value that is a part of an SVGNumberList. Individual SVGNumber objects can also be created by script. ◎ (読専 flag に集約) An SVGNumber object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below. SVGNumber objects reflected through the animVal IDL attribute are always read only. ◎ (反映を継承する/関連な要素に集約) An SVGNumber object can be associated with a particular element. The associated element is used to determine which element's content attribute to update if the object reflects an attribute. Unless otherwise described, an SVGNumber object is not associated with any element. ◎ Every SVGNumber object operates in one of two modes. It can: • reflect an element of the base value of a reflected animatable attribute (being exposed through the methods on the baseVal member of an SVGAnimatedNumberList), • be detached, which is the case for SVGNumber objects created with createSVGNumber.

【!id=ReadOnlyNumber/NumberAssociatedElement/NumberMode】

各 `SVGNumber$I ~objは、 `数-値@ と呼ばれる内部的な数-値を保守する。 ◎ An SVGNumber object maintains an internal number value, which is called its value.

[Exposed=Window]
interface `SVGNumber^I0 {
  attribute float `value$m;
};
`value@m
数-を表現する。 ◎ The value IDL attribute represents the number.\
その取得子~手続きは ⇒ ~RET コレの`数-値$ ◎ On getting value, the SVGNumber's value is returned.

その設定子~手続きは: ◎ On setting value, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGNumber is read only, then throw a NoModificationAllowedError.
  2. コレの`数-値$ ~SET 所与の値 ◎ Set the SVGNumber's value to the value being assigned to the value member.
  3. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGNumber reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.

4.5.2. `SVGLength^I ~interface

`SVGLength$I ~interfaceは[ `length$t / `percentage$t / `number$t ]値をとり得る値を表現するために利用される。 ◎ The SVGLength interface is used to represent a value that can be a <length>, <percentage> or <number> value. ◎ (読専 flag に集約) An SVGLength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below. SVGLength objects reflected through the animVal IDL attribute are always read only.

【!id=ReadOnlyLength/LengthAssociatedElement/LengthMode】

各 `SVGLength$I ~objは、 `方向性@ を持つ。 それは[ `横^i, `縦^i, ε(未指定) ]のいずれかをとり,特に言明されない限り ε とする。 `方向性$は、百分率~値を利用元~単位に解決するときに利用される。 ◎ An SVGLength object can be associated with a particular element, as well as being designated with a directionality: horizontal, vertical or unspecified.\ ◎ (反映を継承する/関連な要素に集約) The associated element and the directionality of the length are used to resolve percentage values to user units and is also used to determine which element's content attribute to update if the object reflects an attribute. Unless otherwise described, an SVGLength object is not associated with any element and has unspecified directionality. ◎ Every SVGLength object operates in one of four modes. It can: • reflect the base value of a reflected animatable attribute (being exposed through the baseVal member of an SVGAnimatedLength), • reflect a presentation attribute value (such as by SVGRectElement.width.baseVal), • reflect an element of the base value of a reflected animatable attribute (being exposed through the methods on the baseVal member of an SVGAnimatedLengthList), or • be detached, which is the case for SVGLength objects created with createSVGLength.

各 `SVGLength$I ~objは、 `長さ値@ と呼ばれる[ `length$t / `percentage$t / `number$t ]値を[ ( 数量-係数, 単位 ) が成す組, または 非~scalar値( `calc()^v などの複合的な値) ]として,内部的に保守する。 この目的においては[ `percentage$t / `number$t ]値を成す単位は[ `百分率^i / `単位無し^i ]と表記される。 ◎ An SVGLength object maintains an internal <length> or <percentage> or <number> value, which is called its value.

[Exposed=Window]
interface `SVGLength^I0 {

  // Length Unit Types
  const unsigned short `SVG_LENGTHTYPE_UNKNOWN$m = 0;
  const unsigned short `SVG_LENGTHTYPE_NUMBER$m = 1;
  const unsigned short `SVG_LENGTHTYPE_PERCENTAGE$m = 2;
  const unsigned short `SVG_LENGTHTYPE_EMS$m = 3;
  const unsigned short `SVG_LENGTHTYPE_EXS$m = 4;
  const unsigned short `SVG_LENGTHTYPE_PX$m = 5;
  const unsigned short `SVG_LENGTHTYPE_CM$m = 6;
  const unsigned short `SVG_LENGTHTYPE_MM$m = 7;
  const unsigned short `SVG_LENGTHTYPE_IN$m = 8;
  const unsigned short `SVG_LENGTHTYPE_PT$m = 9;
  const unsigned short `SVG_LENGTHTYPE_PC$m = 10;

  readonly attribute unsigned short `unitType$m;
           attribute float `value$m;
           attribute float `valueInSpecifiedUnits$m;
           attribute DOMString `valueAsString$m;

  undefined `newValueSpecifiedUnits$m(unsigned short %unitType, float %valueInSpecifiedUnits);
  undefined `convertToSpecifiedUnits$m(unsigned short %unitType);
};

`SVGLength$I 上に定義される数量-長さ単位~型~定数は、 `SVGLength$I の`長さ値$の型を表現するために利用される。 各種 値の意味は: ◎ The numeric length unit type constants defined on SVGLength are used to represent the type of an SVGLength's value. Their meanings are as follows:

定数 単位 値~型
`SVG_LENGTHTYPE_NUMBER@m `単位無し^i `px^u 値として解釈される `number$t
`SVG_LENGTHTYPE_PERCENTAGE@m `百分率^i `percentage$t
`SVG_LENGTHTYPE_EMS@m `em^u `length$t
`SVG_LENGTHTYPE_EXS@m `ex^u `length$t
`SVG_LENGTHTYPE_PX@m `px^u `length$t
`SVG_LENGTHTYPE_CM@m `cm^u `length$t
`SVG_LENGTHTYPE_MM@m `mm^u `length$t
`SVG_LENGTHTYPE_IN@m `in^u `length$t
`SVG_LENGTHTYPE_PT@m `pt^u `length$t
`SVG_LENGTHTYPE_PC@m `pc^u `length$t
`SVG_LENGTHTYPE_UNKNOWN@m その他の単位 ~APIからは未知な値~型
◎ Constant Meaning SVG_LENGTHTYPE_NUMBER A unitless <number> interpreted as a value in px. SVG_LENGTHTYPE_PERCENTAGE A <percentage>. SVG_LENGTHTYPE_EMS A <length> with an em unit. SVG_LENGTHTYPE_EXS A <length> with an ex unit. SVG_LENGTHTYPE_PX A <length> with a px unit. SVG_LENGTHTYPE_CM A <length> with a cm unit. SVG_LENGTHTYPE_MM A <length> with a mm unit. SVG_LENGTHTYPE_IN A <length> with an in unit. SVG_LENGTHTYPE_PT A <length> with a pt unit. SVG_LENGTHTYPE_PC A <length> with a pc unit. SVG_LENGTHTYPE_UNKNOWN Some other type of value.

注記: 数量-長さ単位~型~定数の利用は~anti-patternであり、 新たな定数~値が[ `SVGLength$I が~supportする他の型の単位や長さ ]用に導入されることはない — そのような型には、 単位~型 `SVG_LENGTHTYPE_UNKNOWN$m が利用されることになる。 `SVGLength$I の他の~propが,これらの型の長さにどう演算するかについての詳細は、 下を見よ。 ◎ The use of numeric length unit type constants is an anti-pattern and new constant values will not be introduced for any other units or length types supported by SVGLength. If other types of lengths are supported and used, the SVGLength uses the SVG_LENGTHTYPE_UNKNOWN unit type. See below for details on how the other properties of an SVGLength operate with these types of lengths.

`unitType@m
`SVGLength$I の`長さ値$の型を表現する。 ◎ The unitType IDL attribute represents the type of value that the SVGLength's value is.\
その取得子~手続きは ⇒ ~RET [ コレの`長さ値$を成す単位が,上の長さ単位~型~表tの 2 列目のどれに該当するか ]に応じて,同じ行の 1 列目に挙げられる定数~値 ◎ On getting unitType, the following steps are run: ◎ If the SVGLength's value is a unitless <number>, a <percentage>, or a <length> with an em, ex, px, cm, mm, in, pt or pc unit, then return the corresponding constant value from the length unit type table above. ◎ Otherwise, return SVG_LENGTHTYPE_UNKNOWN.
注記: 例えば,[ `ch^u 単位を伴う `length$t / `calc()^v などの非~scalar値 ]に対しては、 `SVG_LENGTHTYPE_UNKNOWN$m が返されることになる。 ◎ For example, for a <length> with a ch unit or one that has a non-scalar value such as calc(), SVG_LENGTHTYPE_UNKNOWN would be returned.
`value@m
利用元~単位による`長さ値$を表現する。 ◎ The value IDL attribute represents the SVGLength's value in user units.\

その取得子~手続きは: ◎ On getting value, the following steps are run:

  1. ( %係数, %単位 ) ~LET コレの`長さ値$ ◎ Let value be the SVGLength's value.
  2. ~IF[ %単位 ~EQ `単位無し^i ] ⇒ ~RET %係数 ◎ If value is a <number>, return that number.
  3. %要素 ~LET コレに`関連な要素$ ◎ ↓
  4. %表示域 ~LET %要素 の`~SVG表示域$ ◎ ↓
  5. %表示域~size ~LET [ %要素 ~EQ ε ならば 100 / ~ELSE_ `方向性$に応じて 次に与える値 ](百分率は、これを~~基準に解決される) ⇒# `横^i ならば %表示域 の横幅 / `縦^i ならば %表示域 の縦幅 / ε ならば %表示域 の`正規化-済み対角線長さ$ ◎ Let viewport size be a basis to resolve percentages against, based on the SVGLength's associated element and directionality: • has no associated element •• size is 100 • has an associated element and horizontal directionality •• size is the width of the associated element's SVG viewport • has an associated element and vertical directionality •• size is the height of the associated element's SVG viewport • has an associated element and unspecified directionality •• size is the length of the associated element's SVG viewport diagonal (see Units)
  6. %~font~size ~LET %要素 に応じて,次に与える値(~font~size値はこれを~~基準に解決される) ⇒# ε ならば `font-size$p ~propの初期~値に等しい絶対~長さ / ε でないならば %要素 の `font-size$p ~propの算出d値 ◎ Let font size be a basis to resolve font size values against, based on the SVGLength's associated element: • has no associated element •• font size is the absolute length of the initial value of the font-size property • has an associated element •• size is the computed value of the associated element's font-size property
  7. ~RET [ %表示域~size, %~font~size ]を用いて %係数 を絶対~長さに[ 換算できるならば その結果 / %要素 ~EQ ε であることに因り換算できないならば 0 ] 【 %要素 ~EQ ε であっても,換算できる場合はある。】 ◎ Return the result of converting value to an absolute length, using viewport size and font size as percentage and font size bases. If the conversion is not possible due to the lack of an associated element, return 0.

その設定子~手続きは: ◎ On setting value, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGLength object is read only, then throw a NoModificationAllowedError.
  2. コレの`長さ値$ ~SET ( 所与の値, `単位無し^i ) ◎ Let value be the value being assigned to value. ◎ Set the SVGLength's value to a <number> whose value is value.
  3. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGLength reflects the base value of a reflected attribute, reflects a presentation attribute, or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`valueInSpecifiedUnits@m
コレの`長さ値$を成す数量-係数を表現する。 ◎ The valueInSpecifiedUnits IDL attribute represents the numeric factor of the SVGLength's value.\

その取得子~手続きは: ◎ On getting valueInSpecifiedUnits, the following steps are run:

  1. ~IF[ コレの`長さ値$は~scalarである ] ⇒ ~RET コレの`長さ値$を成す数量-係数 ◎ Let value be the SVGLength's value. ◎ If value is a <number>, return that number. ◎ Otherwise, if value is a <percentage> or any scalar <length> value, return the numeric factor before its unit.
  2. ~RET 0 ◎ Otherwise, return 0.

    注記: したがって `valueInSpecifiedUnits$m は、 `12%^v, `12em^v 両者 に対しては `12^v を返すが, `calc(12px + 5%)^v の様な~scalarでない値に対しては `0^v を返すことになる。 ◎ Thus valueInSpecifiedUnits would return 12 for both '12%' and 12em, but 0 would be returned for non-scalar values like calc(12px + 5%).

その設定子~手続きは: ◎ On setting valueInSpecifiedUnits, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGLength object is read only, then throw a NoModificationAllowedError.
  2. ~IF[ コレの`長さ値$は~scalarである ] ⇒ コレの`長さ値$を成す数量-係数 ~SET 所与の値 ◎ Let value be the value being assigned to valueInSpecifiedUnits. ◎ If the SVGLength's value is a <number>, then update its value to value. ◎ Otherwise, if the SVGLength's value is a <percentage> or a scalar-valued <length>, then update its numeric factor to value.
  3. ~ELSE ⇒ コレの`長さ値$ ~SET ( 所与の値, `単位無し^i ) ◎ Otherwise, the SVGLength's value is of some other type. Set it to a <number> whose value is value.
  4. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGLength reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`valueAsString@m
`SVGLength$I の`長さ値$を文字列として表現する。 ◎ The valueAsString IDL attribute represents the SVGLength's value as a string.\

その取得子~手続きは: ◎ On getting valueAsString, the following steps are run:

  1. ~IF[ コレの`長さ値$は~scalarである ]: ◎ Let value be the SVGLength's value. ◎ Let string be an empty string. ◎ If value is a <number>, <percentage> or scalar <length> value, then:

    1. ( %係数, %単位 ) ~LET コレの`長さ値$ ◎ Let factor be value's numeric factor, if it is a <percentage> or <length>, or value itself it is a <number>.
    2. %文字列 ~LET %係数 を`最も精確に表現する文字列$ ◎ Append to string an implementation specific string that, if parsed as a <number> using CSS syntax, would return the number value closest to factor, given the implementation's supported real number precision.
    3. ~IF[ %単位 ~EQ `百分率^i ] ⇒ %文字列 に 1 個の `0025^U `PERCENT SIGN^cn を付加する ◎ If value is a <percentage> then append to string a single U+0025 PERCENT SIGN character.
    4. ~ELIF[ %単位 ~NEQ `単位無し^i ] ⇒ %文字列 に %単位 の正準的な綴りを付加する ◎ Otherwise, if value is a <length>, then append to string the canonical spelling of value's unit.
    5. ~RET %文字列 ◎ Return string.
  2. ~RET 次を満たす実装に特有な文字列 ⇒ `length$t の文法に`則って構文解析-$したときにコレの`長さ値$を`最も精確に表現する文字列$ ◎ Otherwise, return an implementation specific string that, if parsed as a <length>, would return the closest length value to value, given the implementation's supported real number precision.

その設定子~手続きは: ◎ On setting valueAsString, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGLength object is read only, then throw a NoModificationAllowedError.
  2. %結果 ~LET 所与の値を文法 [ `number$t | `length$t | `percentage$t ] に`則って構文解析-$した結果 ◎ Let value be the value being assigned to valueAsString. ◎ Parse value using the CSS syntax [ <number> | <length> | <percentage> ].
  3. ~IF[ %結果 ~EQ `失敗^i ] ⇒ ~THROW `SyntaxError$E ◎ If parsing failed, then throw a SyntaxError.
  4. `SVGLength$I の`長さ値$ ~SET %結果 ◎ Otherwise, parsing succeeded. Set SVGLength's value to the parsed value.
  5. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGLength reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`newValueSpecifiedUnits(unitType, valueInSpecifiedUnits)@m
`SVGLength$I の値を型も伴わせて設定するために利用される。 ◎ The newValueSpecifiedUnits method is used to set the SVGLength's value in a typed manner.\

その~method~手続きは: ◎ When newValueSpecifiedUnits(unitType, valueInSpecifiedUnits) is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGLength object is read only, then throw a NoModificationAllowedError.
  2. ~IF[ %unitType は 上の長さ単位~型~表tに現れない値である ]~OR[ %unitType ~EQ `SVG_LENGTHTYPE_UNKNOWN$m ] ⇒ ~THROW `NotSupportedError$E ◎ If unitType is SVG_LENGTHTYPE_UNKNOWN or is a value that does not appear in the length unit type table above, then throw a NotSupportedError.
  3. %単位 ~LET 上の長さ単位~型~表tの 2 列目に指示される %unitType に対応する単位 ◎ Set SVGLength's value depending on the value of unitType: • SVG_LENGTHTYPE_NUMBER •• a <number> whose value is valueInSpecifiedUnits • SVG_LENGTHTYPE_PERCENTAGE •• a <percentage> whose numeric factor is valueInSpecifiedUnits • anything else •• a <length> whose numeric factor is valueInSpecifiedUnits and whose unit is as indicated by the length unit type table above
  4. コレの`長さ値$ ~SET ( %valueInSpecifiedUnits, %単位 ) ◎ ↑
  5. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGLength reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`convertToSpecifiedUnits(unitType)@m
`SVGLength$I の値を特定の型に変換するために利用される。 ◎ The convertToSpecifiedUnits method is used to convert the SVGLength's value to a specific type.\

その~method~手続きは: ◎ When convertToSpecifiedUnits(unitType) is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGLength object is read only, then throw a NoModificationAllowedError.
  2. ~IF[ %unitType ~EQ `SVG_LENGTHTYPE_UNKNOWN$m ]~OR[ %unitType は上の長さ単位~型~表tに現れない値である ] ⇒ ~THROW `NotSupportedError$E ◎ If unitType is SVG_LENGTHTYPE_UNKNOWN or is a value that does not appear in the length unit type table above, then throw a NotSupportedError.
  3. %単位 ~LET 上の長さ単位~型~表tの 2 列目に指示される %unitType に対応する単位 ◎ ↓
  4. %係数 ~LET コレの `value$m ~memberが返すことになる値 ◎ Let absolute be the value that would be returned from the value member.
  5. %単位 に応じて: ◎ ↓

    `単位無し^i ◎ If unitType is SVG_LENGTHTYPE_NUMBER, then:
    何もしない ◎ Set the SVGLength's value to a <number> whose value is absolute.
    `百分率^i ◎ Otherwise, if unitType is SVG_LENGTHTYPE_PERCENTAGE, then:
    1. %表示域~size ~LET 100 ◎ ↓
    2. ~IF[ コレに`関連な要素$ %要素 ~NEQ ε ] ⇒ %表示域~size ~SET コレの`方向性$に応じて, %要素 の表示域の ⇒# `横^i ならば横幅 / `縦^i ならば縦幅 / ε ならば`正規化-済み対角線長さ$ ◎ Let viewport size be a basis to resolve percentages against, based on the SVGLength's associated element and directionality: • has no associated element •• size is 100 • has an associated element and horizontal directionality •• size is the width of the associated element's SVG viewport • has an associated element and vertical directionality •• size is the height of the associated element's SVG viewport • has an associated element and unspecified directionality •• size is the length of the associated element's SVG viewport diagonal (see Units)
    3. %係数 ~SET ( %係数 ~DIV %表示域~size ) ~MUL 100 ◎ Set the SVGLength's value to the result of converting absolute to a <percentage>, using viewport size as the percentage basis.
    `em^u / `ex^u ◎ Otherwise, if unitType is SVG_LENGTHTYPE_EMS or SVG_LENGTHTYPE_EXS, then:
    1. %~font~size ~LET `font-size$p ~propの初期~値の絶対~長さ
    2. ~IF[ コレに`関連な要素$ %要素 ~NEQ ε ] ⇒ %~font~size ~SET %要素 の`font-size$p ~propの算出d値
    3. %係数 ~SET %係数 ~DIV %~font~size
    4. ~IF[ %単位 ~EQ `ex^u ] ⇒ %係数 ~SET %係数 を `em^u 単位から `ex^u 単位の数に換算した結果
    ◎ Let font size be a basis to resolve font size values against, based on the SVGLength's associated element: • has no associated element •• font size is the absolute length of the initial value of the font-size property • has an associated element •• size is the computed value of the associated element's font-size property ◎ Set the SVGLength's value to the result of converting absolute to a <length> with an em or ex unit (depending on unitType), using font size as the font-size basis.
    その他 ◎ Otherwise:
    %係数 ~SET %係数 を `px^u 単位から %単位 の数に換算した結果 ◎ Set the SVGLength's value to the result of converting absolute to a <length> with the unit found by looking up unitType in the length unit type table above.
  6. コレの`長さ値$ ~SET ( %係数, %単位 ) ◎ ↑
  7. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGLength reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.

4.5.3. `SVGAngle^I ~interface

【!id=ReadOnlyAngle/AngleAssociatedElement/AngleMode】

`SVGAngle$I ~interfaceは、[ `angle$t / `number$t ]値をとり得る値を表現するために利用される。 ◎ The SVGAngle interface is used to represent a value that can be an <angle> or <number> value. ◎ (読専 flag に集約) An SVGAngle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below. An SVGAngle reflected through the animVal attribute is always read only. ◎ (反映を継承する/関連な要素に集約) An SVGAngle object can be associated with a particular element. The associated element is used to determine which element's content attribute to update if the object reflects an attribute. Unless otherwise described, an SVGAngle object is not associated with any element. ◎ Every SVGAngle object operates in one of two modes. It can: • reflect the base value of a reflected animatable attribute (being exposed through the baseVal member of an SVGAnimatedAngle), • be detached, which is the case for SVGAngle objects created with createSVGAngle.

各 `SVGAngle$I ~objは、 `角度~値@ と呼ばれる[ `angle$t / `number$t ]値を ( 数量-係数, 単位 ) が成す組として,内部的に保守する†。 この目的においては `number$t 値を成す単位は `単位無し^i と表記される。 【†実際には`長さ値$と同様に非~scalarもとり得るはずだが、この仕様には言及されていない。】 ◎ An SVGAngle object maintains an internal <angle> or <number> value, which is called its value.

[Exposed=Window]
interface `SVGAngle^I0 {

  // Angle Unit Types
  const unsigned short `SVG_ANGLETYPE_UNKNOWN$m = 0;
  const unsigned short `SVG_ANGLETYPE_UNSPECIFIED$m = 1;
  const unsigned short `SVG_ANGLETYPE_DEG$m = 2;
  const unsigned short `SVG_ANGLETYPE_RAD$m = 3;
  const unsigned short `SVG_ANGLETYPE_GRAD$m = 4;

  readonly attribute unsigned short `unitType$m;
           attribute float `value$m;
           attribute float `valueInSpecifiedUnits$m;
           attribute DOMString `valueAsString$m;

  undefined `newValueSpecifiedUnits$m(unsigned short %unitType, float %valueInSpecifiedUnits);
  undefined `convertToSpecifiedUnits$m(unsigned short %unitType);
};

`SVGAngle$I 上で定義される数量-角度~単位~型~定数は、 `SVGAngle$I の`角度~値$の型を表現するために利用される。 各種 値の意味は: ◎ The numeric angle unit type constants defined on SVGAngle are used to represent the type of an SVGAngle's value. Their meanings are as follows:

定数 単位 値~型
`SVG_ANGLETYPE_UNSPECIFIED@m `単位無し^i `deg^u 単位の値として解釈される `number$t
`SVG_ANGLETYPE_DEG@m `deg^u `angle$t
`SVG_ANGLETYPE_RAD@m `rad^u `angle$t
`SVG_ANGLETYPE_GRAD@m `grad^u `angle$t
`SVG_ANGLETYPE_UNKNOWN@m その他の単位 ~APIからは未知な値~型
◎ Constant Meaning SVG_ANGLETYPE_UNSPECIFIED A unitless <number> interpreted as a value in degrees. SVG_ANGLETYPE_DEG An <angle> with a deg unit. SVG_ANGLETYPE_RAD An <angle> with a rad unit. SVG_ANGLETYPE_GRAD An <angle> with a grad unit. SVG_ANGLETYPE_UNKNOWN Some other type of value.

注記: 数量-角度~単位~型~定数の利用は~anti-patternであり、 新たな定数~値が[ `SVGAngle$I が~supportする他の型の単位や角度 ]用に導入されることはない — そのような型には、 単位~型 `SVG_ANGLETYPE_UNKNOWN$m が利用されることになる。 `SVGAngle$I の他の~propが,これらの型の角度にどう演算するかについての詳細は、 下を見よ。 ◎ The use of numeric angle unit type constants is an anti-pattern and new constant values will not be introduced for any other units or angle types supported by SVGAngle. If other types of angles are supported and used, the SVGAngle uses the SVG_ANGLETYPE_UNKNOWN unit type. See below for details on how the other properties of an SVGAngle operate with these types of angles.

`unitType@m
`SVGAngle$I の`角度~値$の型を表現する。 ◎ The unitType IDL attribute represents the type of value that the SVGAngle's value is.\

その取得子~手続きは: ◎ On getting unitType, the following steps are run:

  1. ~IF[ コレの`角度~値$を成す単位 ~IN { `単位無し^i, `deg^u, `rad^u, `grad^u } ] ⇒ ~RET 単位に対応する,上の角度~単位~型~表tの 1 列目に挙げられた定数~値 ◎ If the SVGAngle's value is a unitless <number> or a <length> with a deg, rad or grad unit, then return the corresponding constant value from the angle unit type table above.
  2. ~RET `SVG_ANGLETYPE_UNKNOWN$m ◎ Otherwise, return SVG_ANGLETYPE_UNKNOWN.
注記: 例えば, `turn^u 単位を伴う `angle$t に対しては、 `SVG_ANGLETYPE_UNKNOWN$m が返される。 ◎ For example, for an <angle> with a turn unit, SVG_ANGLETYPE_UNKNOWN would be returned.
`value@m
コレの`角度~値$を `deg^u 単位で表現する。 ◎ The value IDL attribute represents the SVGAngle's value in degrees.\

その取得子~手続きは: ◎ On getting value, the following steps are run:

  1. ( %係数, %単位 ) ~LET コレの`角度~値$ ◎ Let value be the SVGAngle's value.
  2. ~IF[ %単位 ~EQ `単位無し^i ] ⇒ ~RET %係数 ◎ If value is a <number>, return that number.
  3. ~RET %係数 を %単位 から `deg^u 単位に換算した結果 ◎ Return the result of converting value to an angle in degrees.

その設定子~手続きは: ◎ On setting value, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGAngle object is read only, then throw a NoModificationAllowedError.
  2. コレの`角度~値$ ~SET ( 所与の値, `単位無し^i ) ◎ Let value be the value being assigned to value. ◎ Set the SVGAngle's value to a <number> whose value is value.
  3. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGAngle reflects the base value of a reflected attribute, then reserialize the reflected attribute.
`valueInSpecifiedUnits@m
コレの`角度~値$の数量-係数を表現する。 ◎ The valueInSpecifiedUnits IDL attribute represents the numeric factor of the SVGAngle's value.\

その取得子~手続きは: ◎ On getting valueInSpecifiedUnits, the following steps are run:

  1. ~RET コレの`角度~値$を成す数量-係数 ◎ Let value be the SVGAngle's value. ◎ If value is a <number>, return that number. ◎ Otherwise, value is an <angle> value. Return the numeric factor before its unit.

その設定子~手続きは: ◎ On setting valueInSpecifiedUnits, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGAngle object is read only, then throw a NoModificationAllowedError.
  2. コレの`角度~値$を成す数量-係数 ~SET 所与の値 ◎ Let value be the value being assigned to valueInSpecifiedUnits. ◎ If the SVGAngle's value is a <number>, then update its value to value. ◎ Otherwise, if the SVGAngle's value is an <angle>, then update its numeric factor to value.
  3. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGAngle reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`valueAsString@m
コレの`角度~値$を文字列として表現する。 ◎ The valueAsString IDL attribute represents the SVGAngle's value as a string.\

その取得子~手続きは: ◎ On getting valueAsString, the following steps are run:

  1. ( %係数, %単位 ) ~LET コレの`角度~値$ ◎ Let value be the SVGAngle's value. ◎ Let string be an empty string. ◎ Let factor be value's numeric factor, if it is an <angle>, or value itself it is a <number>.
  2. %文字列 ~LET %係数 を`最も精確に表現する文字列$ ◎ Append to string an implementation specific string that, if parsed as a <number> using CSS syntax, would return the number value closest to factor, given the implementation's supported real number precision.
  3. ~IF[ %単位 ~NEQ `単位無し^i ] ⇒ %文字列 に %単位 の正準的な綴りを付加する ◎ If value is an <angle>, then append to string the canonical spelling of value's unit.
  4. ~RET %文字列 ◎ Return string.

その設定子~手続きは: ◎ On setting valueAsString, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGAngle object is read only, then throw a NoModificationAllowedError.
  2. %結果 ~LET 所与の値を文法 [ `number$t | `angle$t ] に`則って構文解析-$した結果 ◎ Let value be the value being assigned to valueAsString. ◎ Parse value using the CSS syntax [ <number> | <angle> ].
  3. ~IF[ %結果 ~EQ `失敗^i ] ⇒ ~THROW `SyntaxError$E ◎ If parsing failed, then throw a SyntaxError.
  4. コレの`角度~値$ ~SET %結果 ◎ Otherwise, parsing succeeded. Set SVGAngle's value to the parsed value.
  5. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGAngle reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`newValueSpecifiedUnits(unitType, valueInSpecifiedUnits)@m
`SVGAngle$I の値を型も伴わせて設定する。 ◎ The newValueSpecifiedUnits method is used to set the SVGAngle's value in a typed manner. \

その~method~手続きは: ◎ When newValueSpecifiedUnits(unitType, valueInSpecifiedUnits) is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGAngle object is read only, then throw a NoModificationAllowedError.
  2. ~IF[ %unitType は上の角度~単位~型~表tの 1 列目に現れない値である ]~OR[ %unitType ~EQ `SVG_ANGLETYPE_UNKNOWN$m ] ⇒ ~THROW `NotSupportedError$E ◎ If unitType is SVG_ANGLETYPE_UNKNOWN or is a value that does not appear in the angle unit type table above, then throw a NotSupportedError.
  3. %単位 ~LET 上の角度~単位~型~表tの 2 列目に指示される対応する単位 ◎ ↓
  4. コレの`角度~値$ ~SET ( %valueInSpecifiedUnits, %単位 ) ◎ Set SVGAngle's value depending on the value of unitType: • SVG_ANGLETYPE_UNSPECIFIED •• a <number> whose value is valueInSpecifiedUnits ◎ anything else • an <angle> whose numeric factor is valueInSpecifiedUnits and whose unit is as indicated by the angle unit type table above
  5. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGAngle reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.
`convertToSpecifiedUnits(unitType)@m
コレの値を特定の型に変換する。 ◎ The convertToSpecifiedUnits method is used to convert the SVGAngle's value to a specific type. \

その~method~手続きは: ◎ When convertToSpecifiedUnits(unitType) is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the SVGAngle object is read only, then throw a NoModificationAllowedError.
  2. ~IF[ %unitType は上の角度~単位~型~表tの 1 列目に現れない値である ]~OR[ %unitType ~EQ `SVG_ANGLETYPE_UNKNOWN$m ] ⇒ ~THROW `NotSupportedError$E ◎ If unitType is SVG_ANGLETYPE_UNKNOWN or is a value that does not appear in the angle unit type table above, then throw a NotSupportedError.
  3. %単位 ~LET 上の角度~単位~型~表tの 2 列目に指示される対応する単位 ◎ ↓
  4. %係数 ~LET コレの `value$m ~memberが返すことになる値 ◎ Let degrees be the value that would be returned from the value member.
  5. ~IF[ %単位 ~NEQ `単位無し^i ] ⇒ %係数 ~LET %係数 を `deg^u 単位から %単位 に換算した結果 ◎ If unitType is SVG_ANGLETYPE_UNSPECIFIED, then: • Set the SVGAngle's value to a <number> whose value is degrees.
  6. コレの`角度~値$ ~SET ( %係数, %単位 ) ◎ Otherwise: • Set the SVGAngle's value to the result of converting degrees to an <angle> with the unit found by looking up unitType in the angle unit type table above.
  7. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the SVGAngle reflects the base value of a reflected attribute or reflects an element of the base value of a reflected attribute, then reserialize the reflected attribute.

4.5.4. ~list用の各種~interface

~SVG-2要件: `SVGList*^I ~interfaceを他の[ ~list/配列 ]に近づける。 ◎ SVG 2 Requirement: Make the SVGList* interfaces a bit more like other lists/arrays.

  • 解決: ~SVG~list型に配列~styleの~index法と `length^m, `item^m ~memberを追加する (`~~参照先@http://www.w3.org/2011/02/28-svg-minutes.html#item04$)。 ◎ Resolution: Add array style indexing and .length and .item to svg list types.
  • 目的: 他の配列~型(例: `NodeList^I )に揃える。 Opera, Firefox ではすでに実装されている。 ◎ Purpose: To align with other array types (e.g. NodeList). Already implemented in Opera and Firefox.
  • Owner: Erik (`2975$ACTION)
  • Status: Done

~SVG属性には、 何個かの値からなる~listを包含するものもあり,それらの値を表現するために いくつかの~SVG~DOM `~list~interface@ が在る — 要求される各~item型ごとに 1 個ずつ ⇒# `SVGNumberList$I, `SVGLengthList$I, `SVGPointList$I, `SVGTransformList$I, `SVGStringList$I ◎ Some SVG attributes contain lists of values, and to represent these values there are a number of SVG DOM list interfaces, one for each required element type – SVGNumberList, SVGLengthList, SVGPointList, SVGTransformList and SVGStringList.\

これらは,順に[ `SVGAnimatedNumberList$I, `SVGAnimatedLengthList$I, `SVGAnimatedPoints$I, `SVGTransformList$I, `SVGStringList$I ]~objの[ `baseVal^m / `animVal^m ]成分を表現するために利用される。 最後の `SVGStringList$I は,文字列の~listをとる少数の属性を`反映する$ために利用される。 ◎ The first four are used to represent the base and animated components of SVGAnimatedNumberList, SVGAnimatedLengthList, SVGAnimatedPoints and SVGTransformList objects, while the fifth, SVGStringList, is used to reflect a few unanimated attributes that take a list of strings.

【 ~listを成す “~item” は,原文では “要素” と記されているが、 ~DOM要素と紛らわしいので,この訳ではすべて “~item” に置換している。 】

ほとんどの`~list~interface$は、 次の形をとる: ◎ Most list interfaces take the following form:

interface SVGNameList {

  readonly attribute unsigned long `length$n;
  readonly attribute unsigned long `numberOfItems$n;

  undefined `clear$n();
  %Type `initialize$n(%Type %newItem);
  getter %Type `getItem$n(unsigned long %index);
  %Type `insertItemBefore$n(%Type %newItem, unsigned long %index);
  %Type `replaceItem$n(%Type %newItem, unsigned long %index);
  %Type `removeItem$n(unsigned long %index);
  %Type `appendItem$n(%Type %newItem);
  `setter$n undefined (unsigned long %index, %Type %newItem);
};

ここで: ◎ where\

  • %Name は、 ~listの~item型の記述的な名前を次のいずれかとして与える ⇒ "Number", "Length", "Point", "Transform", "String" ◎ Name is a descriptive name for the list element's ("Number", "Length", "Point", "Transform" or "String") and\
  • %Type は、 ~listを成す~itemの~IDL型を — 前項と同順に — 次のいずれかとして与える ⇒ `SVGNumber$I, `SVGLength$I, `DOMPoint$I, `SVGTransform$I, `DOMString^I ◎ Type is the IDL type of the list's elements (SVGNumber, SVGLength, DOMPoint, SVGTransform or DOMString).

`SVGTransformList$I ~interfaceは、 上の形をとる他に, 2 個の追加的な~methodもある。 ◎ The SVGTransformList interface takes the above form but has two additional methods on it.

`SVGTransformList$I は、 ある呈示~属性 ( `transform^a, `gradientTransform$a, `patternTransform$a ) を`反映する$。 他の`~list~interface$ ~objは、 ある内容~属性を`反映する$。 `SVGLength$I やそれに類似な~objと違って,どの`~list~interface~obj$も、 それに`関連な要素$は常に在り( ~NEQ ε になる),他の~objの`反映を継承する$ことを通して設定される。 ◎ All list interface objects apart from SVGTransformList reflect the base value of a reflected content attribute. SVGTransformList objects reflect a presentation attribute (‘transform’, ‘gradientTransform’ or ‘patternTransform’). All list interface objects are associated with a particular element. Unlike SVGLength and similar objects, there are no "detached" list interface objects.

【!id=ReadOnlyList】

`~list~interface$ ~objは、 ~itemの~listを内部的に保守する — 以下の~textにおいては,~objが “表現する~list” と称される。 ~objの各種~IDL[ 属性/~method ]は、この~listを成す~itemたちを検分したり操作するために利用される。 この~listは、`反映先の属性$に対する[ 変更/~animation ]に呼応して変化し得る (あるいは `SVGTransformList$I ~objに対しては、 `transform$p ~propの算出d値の変化に呼応して)。 ◎ A list interface object maintains an internal list of elements, which is referred to in the text below simply as "the list". The IDL attributes and methods are used to inspect and manipulate elements of the list. The list can also be changed in response to changes to the reflected content attribute and to animation of the content attribute (or, for SVGTransformList objects, in response to changes to the computed value of the transform property). ◎ (読専 flag に集約) A list interface object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below. list interface objects reflected through the animVal IDL attribute are always read only.

`~list~interface~objを同期する@ ときは、所与の`~list~interface$ %O に対し,次の手続きを走らす: ◎ A list interface object is synchronized by running the following steps:

  1. %~list ~LET %O が表現する~list
  2. %値~list ~LET %O の`反映先の属性$の`基底~値$に応じて ⇒# `none^v ならば 新たな`~list$( `none^v は `transform$p ~propが~supportする) / ~ELSE_ 値を成す一連の成分からなる同順の`~list$ ◎ Let value be the base value of the reflected content attribute (using the attribute's initial value if it is not present or invalid).
  3. %新~size ~LET %値~list の`~size$ ◎ Let length be the number of items in the list. ◎ Let new length be the number of values in value. If value is the keyword none (as supported by the transform property), new length is 0.
  4. ~IF[ %~list の~item型は `DOMString^I 型である ] ⇒# %O が表現する~list ~SET %値~list; ~RET ◎ ↓↓ ◎ If the list element type is SVGNumber, SVGLength, DOMPoint or SVGTransform, then:
  5. ~WHILE[ %~list の`~size$ ~GT %新~size ]: ◎ If length > new length, then:

    1. `~itemを~listから~detachする$( %~list の最後の~item ) ◎ Detach each object in the list at an index greater than or equal to new length.
    2. %~list から最後の~itemを`除去する$ ◎ Truncate the list to length new length. ◎ Set length to new length.
  6. ~WHILE[ %~list の`~size$ ~LT %新~size ]: ◎ While length < new length:

    1. %~item ~LET %~list の~item型の新たな~obj ◎ Let item be a newly created object of the list element type.
    2. `~itemを~listに~attachする$( %~item, %O ) ◎ Attach item to this list interface object.
    3. %~list に %~item を`付加する$ ◎ Append item to the list. ◎ Set length to length + 1.
  7. ~EACH( 整数 %~index ~IN { 0 〜 %新~size ~MINUS 1 } ) に対し, %~list の~item型に応じて:

    `SVGNumber$I
    %~list[ %~index ] の`数-値$ ~SET %値~list[ %index ] の`数-値$
    `SVGLength$I
    %~list[ %~index ] の`長さ値$ ~SET %値~list[ %index ] の`長さ値$
    `DOMPoint$I
    %~list[ %~index ] の ( `x 座標$pT, `y 座標$pT ) ~SET %値~list[ %index ] の ( `x 座標$pT, `y 座標$pT )
    `SVGTransform$I
    %~list[ %~index ] の`変形-関数~値$ ~SET %値~list[ %index ] の`変形-関数~値$
    %~list[ %~index ] の`行列~obj$を成す各~成分 ~SET %値~list[ %index ] の`変形-関数~値$に合致する値
    ◎ Let index be 0. ◎ While index < length: • Let item be the object in the list at index index. • Let v be the value in value at index index. • Set item's value to v. • If item is an SVGTransform object, then set the components of its matrix object to match the new transform function value. • Set index to index + 1. ◎ Otherwise, the list element type is DOMString: • Replace the list with a new list consisting of the values in value.

`~itemを~listから~detachする@ ときは、所与の ( %~item ) に対し,次を走らす:

  1. ~Assert: %~item は次のいずれかの型の~objである ⇒ `SVGNumber$I, `SVGLength$I, `DOMPoint$I, `SVGTransform$I, `DOMString^I
  2. ~IF[ %~item は `DOMString^I 型である ] ⇒ ~RET
  3. %~item に`関連な要素$ ~SET ε
  4. %~item の`読専~flag$ ~SET ~F
  5. ~IF[ %~item は `SVGLength$I 型である ] ⇒ %~item の`方向性$ ~SET ε
◎ Whenever a list element object is to be detached, the following steps are run, depending on the list element type: SVGNumber • Set the SVGNumber to no longer be associated with any element. If the SVGNumber is read only, set it to be no longer read only. SVGLength • Set the SVGLength to no longer be associated with any element. If the SVGLength is read only, set it to be no longer read only. Set the SVGLength to have unspecified directionality. DOMPoint • Set the DOMPoint to no longer be associated with any element. If the DOMPoint is read only, set it to be no longer read only. SVGTransform • Set the SVGTransform to no longer be associated with any element. If the SVGTransform is read only, set it to be no longer read only. DOMString • Nothing is done.

`~itemを必要なら複製してから~listに~attachする@ ときは、所与の ( %~item, %~list ) に対し,次を走らす:

  1. ~IF[ %~item は `DOMString^I 型である( %~item は~objでない) ] ⇒ ~RET %~item
  2. ~IF[ %~item に`関連な要素$ ~NEQ ε ] ⇒ %~item ~SET %~item の複製
  3. `~itemを~listに~attachする$( %~item, %~list )
  4. ~RET %~item

【 この手続きは、 他所を簡潔に記すため,この訳に導入している。 】

`~itemを~listに~attachする@ ときは、所与の ( %~item, `~list~interface~obj$ %~list ) に対し,次を走らす:

  1. ~IF[ %~item は `DOMString^I 型である ] ⇒ ~RET
  2. %~item は %~list の`反映を継承する$
  3. %~item の`読専~flag$ ~SET %~list の`読専~flag$
  4. ~IF[ %~item は `SVGLength$I 型である ] ⇒ %~item の`方向性$ ~SET %~list の`反映先の属性$により定義される特定のそれ
◎ Whenever a list element object is to be attached, the following steps are run, depending on the list element type: ◎ SVGNumber • Associate the SVGNumber with the element that the list interface object is associated with. Additionally, depending on which IDL attribute the list interface object is reflected through: •• baseVal ••• Set the SVGNumber to reflect an element of the base value. •• animVal ••• Set the SVGNumber to reflect an element of the base value. ◎ SVGLength • Associate the SVGLength with the element that the list interface object is associated with and set its directionality to that specified by the attribute being reflected. Additionally, depending on which IDL attribute the list interface object is reflected through: •• baseVal ••• Set the SVGLength to reflect an element of the base value. •• animVal ••• Set the SVGLength to reflect an element of the base value. Set the SVGLength to be read only. ◎ DOMPoint • Associate the DOMPoint with the element that the list interface object is associated with. Additionally, depending on which IDL attribute the list interface object is reflected through: •• baseVal ••• Set the DOMPoint to reflect an element of the base value. •• animVal ••• Set the DOMPoint to reflect an element of the base value. ◎ SVGTransform • Associate the SVGTransform with the element that the list interface object is associated with. Set the SVGTransform to reflect an element of a presentation attribute value. ◎ DOMString • Nothing is done.

`~list~interface$ ~objが`~supportする~prop~index$は、 { 0 〜 ~objが表現する~listの`~size$ ~MINUS 1 } とする。 ◎ The supported property indices of a list interface object is the set of all non-negative integers less than the length of the list.

`length@n
`numberOfItems@n
これらの取得子~手続きは ⇒ ~RET コレが表現する~listの`~size$ ◎ The length and numberOfItems IDL attributes represents the length of the list, and on getting simply return the length of the list.
`clear()@n
コレが表現する~listからすべての~itemを除去する。 ◎ The clear method is used to remove all items in the list.\

その~method~手続きは: ◎ When clear() is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  2. %~list ~LET コレが表現する~list ◎ ↓
  3. %~list を成す ~EACH( %~item ) に対し ⇒# `~itemを~listから~detachする$( %~item ); %~list から %~item を`除去する$ ◎ Detach and then remove all elements in the list.
  4. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
`initialize(newItem)@n
%~list を空にした上で,新たな~itemを追加する。 ◎ The initialize method is used to clear the list and add a single, specified value to it.\

その~method~手続きは: ◎ When initialize(newItem) is called, the following steps are run:

  1. ~IF[ コレの`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  2. %~list ~LET コレが表現する~list ◎ ↓
  3. %~list を成す ~EACH( %~item ) に対し ⇒ `~itemを~listから~detachする$( %~item ) ◎ ↓
  4. %~list を`空にする$ ◎ Detach and then remove all elements in the list.
  5. %新~item ~SET `~itemを必要なら複製してから~listに~attachする$( %newItem, コレ ) ◎ If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created object of the same type as newItem and which has the same (number or length) value. ◎ Attach newItem to the list interface object.
  6. %~list に %新~item を`付加する$ ◎ Append newItem to this list.
  7. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
  8. ~RET %新~item ◎ Return newItem.
`getItem(index)@n
コレが表現する~list内の指定された位置にある~itemを取得する。 ◎ The getItem method is used to get an item from the list at the specified position. \

その~method~手続きは: ◎ When getItem(index) is called, the following steps are run:

  1. %~list ~LET コレが表現する~list ◎ ↓
  2. ~IF[ %index ~GTE %~list の長さ ] ⇒ ~THROW `IndexSizeError$E ◎ If index is greater than or equal to the length of the list, then throw an IndexSizeError.
  3. ~RET %~list[ %index ] ◎ Return the element in the list at position index.

    注記: %~list の要素~型が `SVGLength$I などの~obj型である場合、 返されるのは その~objへの参照であり,複製ではないことに注意。 ◎ Note that if the list's element type is an object type, such as SVGLength, then a reference to that object and not a copy of it is returned.

`insertItemBefore(newItem, index)@n
要素をコレが表現する~list内の特定の位置に挿入するために利用される。 ◎ The insertItemBefore method is used to insert an element into the list at a specific position. \

その~method~手続きは: ◎ When insertItemBefore(newItem, index) is called, the following steps are run:

  1. %~list ~LET コレが表現する~list ◎ ↓
  2. ~IF[ %~list の`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  3. %新~item ~SET `~itemを必要なら複製してから~listに~attachする$( %newItem, コレ ) ◎ If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created object of the same type as newItem and which has the same (number or length) value.
  4. ~IF[ %index ~GTE %~list の長さ ] ⇒ %~list に %新~item を付加する ◎ ↓
  5. ~ELSE ⇒ %~list の中で %index 番の~itemの前に %新~item を挿入する ◎ If index is greater than the length of the list, then set index to be the list length. ◎ Insert newItem into the list at index index. ◎ Attach newItem to the list interface object.
  6. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
  7. ~RET %新~item ◎ Return newItem.
`replaceItem(newItem, index)@n
コレが表現する~list内の既存の~itemを新たな~itemで置換するために利用される。 ◎ The replaceItem method is used to replace an existing item in the list with a new item. \

その~method~手続きは: ◎ When replaceItem(newItem, index) is called, the following steps are run:

  1. %~list ~LET コレが表現する~list ◎ ↓
  2. ~IF[ %~list の`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  3. ~IF[ %index ~GTE %~list の長さ ] ⇒ ~THROW `IndexSizeError$E ◎ If index is greater than or equal to the length of the list, then throw an IndexSizeError.
  4. %新~item ~SET `~itemを必要なら複製してから~listに~attachする$( %newItem, コレ ) ◎ If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created object of the same type as newItem and which has the same (number or length) value.
  5. `~itemを~listから~detachする$( %~list[ %index ] ) ◎ Detach the element in the list at index index.
  6. %~list 内の %index 番の~itemを %新~item で置換する ◎ Replace the element in the list at index index with newItem. ◎ Attach newItem to the list interface object.
  7. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
  8. ~RET %新~item ◎ Return newItem.
`removeItem(index)@n
コレが表現する~listから~itemを除去する。 ◎ The removeItem method is used to remove an item from the list. \

その~method~手続きは: ◎ When removeItem(index) is called, the following steps are run:

  1. %~list ~LET コレが表現する~list ◎ ↓
  2. ~IF[ %~list の`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  3. ~IF[ %index ~GTE %~list の長さ ] ⇒ ~THROW `IndexSizeError$E【!with code】 ◎ If index is greater than or equal to the length of the list, then throw an IndexSizeError with code.
  4. `~itemを~listから~detachする$( %~list[ %index ] ) ◎ Let item be the list element at index index. ◎ Detach item.
  5. %~list から %index 番の~itemを除去する ◎ Remove the list element at index index.
  6. ~RET %~item ◎ Return item.
`appendItem(newItem)@n
コレが表現する~listの末尾に~itemを付加するために利用される。 ◎ The appendItem method is used to append an item to the end of the list. \

その~method~手続きは: ◎ When appendItem(newItem) is called, the following steps are run:

  1. %~list ~LET コレが表現する~list ◎ ↓
  2. ~IF[ %~list の`読専~flag$ ~EQ ~T ] ⇒ ~THROW `NoModificationAllowedError$E ◎ If the list is read only, then throw a NoModificationAllowedError.
  3. %新~item ~SET `~itemを必要なら複製してから~listに~attachする$( %newItem, コレ ) ◎ If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created object of the same type as newItem and which has the same (number or length) value.
  4. %index ~LET %~list の長さ ◎ Let index be the length of the list.
  5. %~list の末尾に %新~item を`付加する$ ◎ Append newItem to the end of the list. ◎ Attach newItem to the list interface object.
  6. `必要なら内容~属性を直列化し直す$( コレ ) ◎ If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
  7. ~RET %新~item ◎ Return newItem.
`setter@n
`replaceItem()$n ~methodと同じに挙動する。 ◎ The behavior of the indexed property setter is the same as that for the replaceItem method.

4.5.5. `SVGNumberList^I ~interface

`SVGNumberList$I ~interfaceは、 各~itemが `SVGNumber$I ~objをとる `~list~interface$である。 `SVGNumberList$I ~objは、 数-の~listを表現する。 ◎ The SVGNumberList interface is a list interface whose elements are SVGNumber objects. An SVGNumberList object represents a list of numbers.

[Exposed=Window]
interface `SVGNumberList^I0 {

  readonly attribute unsigned long `length$n;
  readonly attribute unsigned long `numberOfItems$n;

  undefined `clear$n();
  `SVGNumber$I `initialize$n(`SVGNumber$I %newItem);
  getter `SVGNumber$I `getItem$n(unsigned long %index);
  `SVGNumber$I `insertItemBefore$n(`SVGNumber$I %newItem, unsigned long %index);
  `SVGNumber$I `replaceItem$n(`SVGNumber$I %newItem, unsigned long %index);
  `SVGNumber$I `removeItem$n(unsigned long %index);
  `SVGNumber$I `appendItem$n(`SVGNumber$I %newItem);
  `setter$n undefined (unsigned long %index, `SVGNumber$I %newItem);
};

`SVGNumberList$I を成す各~interface~memberの挙動は、 `~list~interface$secにて定義される。 ◎ The behavior of all of the interface members of SVGNumberList are defined in the List interfaces section above.

4.5.6. `SVGLengthList^I ~interface

`SVGLengthList$I ~interfaceは、 各~itemが `SVGLength$I ~objをとる`~list~interface$である。 `SVGLengthList$I ~objは、 長さの~listを表現する。 ◎ The SVGLengthList interface is a list interface whose elements are SVGLength objects. An SVGLengthList object represents a list of lengths.

[Exposed=Window]
interface `SVGLengthList^I0 {

  readonly attribute unsigned long `length$n;
  readonly attribute unsigned long `numberOfItems$n;

  undefined `clear$n();
  `SVGLength$I `initialize$n(`SVGLength$I %newItem);
  getter `SVGLength$I `getItem$n(unsigned long %index);
  `SVGLength$I `insertItemBefore$n(`SVGLength$I %newItem, unsigned long %index);
  `SVGLength$I `replaceItem$n(`SVGLength$I %newItem, unsigned long %index);
  `SVGLength$I `removeItem$n(unsigned long %index);
  `SVGLength$I `appendItem$n(`SVGLength$I %newItem);
  `setter$n undefined (unsigned long %index, `SVGLength$I %newItem);
};

`SVGLengthList$I を成す各~interface~memberの挙動は、 `~list~interface$secにて定義される。 ◎ The behavior of all of the interface members of SVGLengthList are defined in the List interfaces section above.

4.5.7. `SVGStringList^I ~interface

`SVGStringList$I ~interfaceは、 各~itemが `DOMString^I 値をとる`~list~interface$である。 `SVGStringList$I ~objは、 文字列の~listを表現する。 ◎ The SVGStringList interface is a list interface whose elements are DOMString values. An SVGStringList object represents a list of strings.

[Exposed=Window]
interface `SVGStringList^I0 {

  readonly attribute unsigned long `length$n;
  readonly attribute unsigned long `numberOfItems$n;

  undefined `clear$n();
  DOMString `initialize$n(DOMString %newItem);
  getter DOMString `getItem$n(unsigned long %index);
  DOMString `insertItemBefore$n(DOMString %newItem, unsigned long %index);
  DOMString `replaceItem$n(DOMString %newItem, unsigned long %index);
  DOMString `removeItem$n(unsigned long %index);
  DOMString `appendItem$n(DOMString %newItem);
  `setter$n undefined (unsigned long %index, DOMString %newItem);
};

`SVGStringList$I を成す各~interface~memberの挙動は、 `~list~interface$secにて定義される。 ◎ The behavior of all of the interface members of SVGStringList are defined in the List interfaces section above.

4.6. ~animate可能な~SVG属性を反映するための各種~DOM~interface

以下に挙げる~interfaceは、 ~animate可能な反映先の内容~属性の値を表現するために利用される。 これらの各~interfaceは、 同じ~dataを表現している 2 つの成分 — `baseVal^m, `animVal^m — からなる。 `baseVal^m が~objを返す場合、 その~objは,対応する属性の値を更新するように変異-可能である。 ◎ The following interfaces are used to represent the reflected value of animatable content attributes. They each consist of two component objects, representing the same data: baseVal and animVal. The baseVal (base value) object is modifiable, to update the corresponding attribute value.

注記: ~SVG-11では、 各種~SVG~DOM~interfaceの `animVal^m 属性は, それの`反映先の属性$の現在の~animateされている値を表現していた。 この~versionの~SVGでは、 `animVal^m もはや~animateされている値を表現せず, 単に `baseVal^m の別名とされる 【が、~objを返す場合,それは読専( `読専~flag$ ~EQ ~T )になる~~点で `baseVal^m と異なる】。 ◎ In SVG 1.1, the animVal attribute of the SVG DOM interfaces represented the current animated value of the reflected attribute. In this version of SVG, animVal no longer represents the current animated value and is instead an alias of baseVal.

4.6.1. `SVGAnimatedBoolean^I ~interface

`SVGAnimatedBoolean$I ~objは、 真偽-値をとる~animate可能な属性を`反映する$ために利用される。 ◎ An SVGAnimatedBoolean object is used to reflect an animatable attribute that takes a boolean value.

[Exposed=Window]
interface `SVGAnimatedBoolean^I0 {
           attribute boolean `baseVal$m;
  readonly attribute boolean `animVal$m;
};
`baseVal@m
反映先の属性の値を表現する。 ◎ The baseVal and animVal IDL attributes both represent the current non-animated value of the reflected attribute.\
その取得子~手続きは ⇒ ~RET ~IS[ コレの`反映先の属性$は在って,その値 ~EQ `true^l ]~OR[ コレの`反映先の属性$の`初期~値$ ~EQ `true^l ] ◎ On getting baseVal or animVal, the following steps are run: • Let value be the value of the reflected attribute, or the empty string if it is not present. • If value is not "true" or "false", then set value to the reflected attribute's initial value. • Return true if value is "true", and false otherwise.
その設定子~手続きは ⇒ コレの`反映先の属性$の値を,所与の値に応じて[ ~T ならば `true^l / ~ELSE_ `false^l ]に設定する。 ◎ On setting baseVal, the reflected attribute is set to "true" if the value is true, and "false" otherwise.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動する。 ◎ ↑

4.6.2. `SVGAnimatedEnumeration^I ~interface

`SVGAnimatedEnumeration$I ~objは、 ~keyword値をとる属性(例: `textPath$e 上の `method$a 属性)を`反映する$ために利用される。 それはまた、属性がとる値の型を反映するときにも利用される (これを行うのは、 `marker$e 要素の `orient$a 属性~用の `orientType$n ~IDL属性に限られる)。 ◎ An SVGAnimatedEnumeration object is used to reflect an animatable attribute that takes a keyword value (such as the ‘method’ attribute on ‘textPath’) or to reflect the type of value that an animatable attribute has (done only by the orientType IDL attribute for the ‘marker’ element's ‘orient’ attribute).

[Exposed=Window]
interface `SVGAnimatedEnumeration^I0 {
           attribute unsigned short `baseVal$m;
  readonly attribute unsigned short `animVal$m;
};
`baseVal@m
~keyword値のみをとる`反映先の属性$の値を表現する。 ただし, `orientType$n が返すこの~objに限り、[ `反映先の属性$ `orient$a の値 ]の型を表現する。 ◎ For SVGAnimatedEnumeration objects that reflect an animatable attribute that takes only a keyword value, the baseVal and animVal IDL attributes represents the current non-animated value of the reflected attribute. For orientType, they represent the type of the current non-animated value of the reflected ‘orient’ attribute.\

その取得子~手続きは: ◎ On getting baseVal or animVal, the following steps are run:

  1. %値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let value be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
  2. ~RET コレを返した~IDL属性の定義に則って決定される, %値 用の `数量-型~値@ ◎ Return the numeric type value for value, according to the reflecting IDL attribute's definition.

その設定子~手続きは:

  1. %~keyword ~LET ε
  2. ~IF[ コレを返した~IDL属性は `orientType$n である ]~AND[ 所与の値 ~EQ `SVG_MARKER_ORIENT_ANGLE$n ] ⇒ %~keyword ~SET 文字列 `0^l
  3. ~ELIF[ 所与の値 ~NEQ 0 ]~AND[ 所与の値は コレを返した~IDL属性~用に定義された`数量-型~値$であって,コレの`反映先の属性$用の ある特定の~keyword値に対応する ] ⇒ %~keyword ~LET その~keyword
  4. ~IF[ %~keyword ~EQ ε ] ⇒ ~THROW `TypeError$E
  5. コレの`反映先の属性$の値 ~SET %~keyword
◎ On setting baseVal, the following steps are run: • Let value be the value being assigned to baseVal. • If value is 0 or is not the numeric type value for any value of the reflected attribute, then throw a TypeError. • Otherwise, if the reflecting IDL attribute is orientType and value is SVG_MARKER_ORIENT_ANGLE, then set the reflected attribute to the string "0". • Otherwise, value is the numeric type value for a specific, single keyword value for the reflected attribute. Set the reflected attribute to that value.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動する。 ◎ ↑

4.6.3. `SVGAnimatedInteger^I ~interface

`SVGAnimatedInteger$I ~objは、 ~animate可能な属性のうち[ 1 個の整数をとるもの(例: `feTurbulence$e 上の `numOctaves$a )の値 / 1 〜 2 個の整数をとるもの(例: `feConvolveMatrix$e 上の `order$a )の片方の値 ]を`反映する$ために利用される。 ◎ An SVGAnimatedInteger object is used to reflect an animatable attribute that takes an integer value (such as ‘numOctaves’ on ‘feTurbulence’). It is also used to reflect one part of an animatable attribute that takes an integer followed by an optional second integer (such as ‘order’ on ‘feConvolveMatrix’).

注記: `SVGAnimatedInteger^I ~interfaceは、 この仕様では利用されないが, `Filter Effects 仕様の~API@~FILTERS-API$ の何箇所かで利用される。 ◎ This SVGAnimatedInteger interface is not used in this specification, however the Filter Effects specification has a number of uses of it.

[Exposed=Window]
interface `SVGAnimatedInteger^I0 {
           attribute long `baseVal$m;
  readonly attribute long `animVal$m;
};
`baseVal@m
コレの`反映先の属性$は[ 1 個の整数~値をとるとされている場合は その値 / 1 〜 2 個の整数~値をとるとされている場合は そのうち片方の値 ]を表現する。 ◎ For SVGAnimatedInteger objects that reflect an animatable attribute that takes a single integer value, the baseVal and animVal IDL attributes represent the current non-animated value of the reflected attribute. For those that reflect one integer of an attribute that takes an integer followed by an optional second integer, they represent the current non-animated value of one of the two integers.\

その取得子~手続きは: ◎ On getting baseVal or animVal, the following steps are run:

  1. %値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let value be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
  2. ~IF[ コレの`反映先の属性$は 1 〜 2 個の整数をとるものと定義されている ]: ◎ If the reflected attribute is defined to take an integer followed by an optional second integer, then:

    1. ~IF[ コレは 1 個目の整数を反映する ] ⇒ ~RET %値 を成す 1 個目の値 ◎ If this SVGAnimatedInteger object reflects the first integer, then return the first value in value.
    2. ~ELIF[ %値 に 2 個目の整数は明示的に指定されている ] ⇒ ~RET %値 を成す 2 個目の値 ◎ Otherwise, this SVGAnimatedInteger object reflects the second integer. Return the second value in value if it has been explicitly specified,\
    3. ~RET 当の属性の 2 個目の整数に定義される暗黙的な値 ] ◎ and if not, return the implicit value as described in the definition of the attribute.

      注記: 例えば, `order$a の定義では、 暗黙的な 2 個目の整数は,明示的な 1 個目の整数と同じになるとされている。 ◎ For example, the definition of ‘order’ says that the implicit second integer is the same as the explicit first integer.

  3. ~ELSE(コレの`反映先の属性$は 1 個の整数~値をとるものと定義されている) ⇒ ~RET %値 ◎ Otherwise, the reflected attribute is defined to take a single integer value. Return value.

その設定子~手続きは: ◎ On setting baseVal, the following steps are run:

  1. ( %first, %second ) ~LET ( 所与の値, ε ) ◎ Let value be the value being assigned to baseVal. ◎ Let new be a list of integers.
  2. ~IF[ コレの`反映先の属性$は 1 〜 2 個の整数をとるものと定義されている ]: ◎ If the reflected attribute is defined to take an integer followed by an optional second integer, then:

    1. %現在の値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let current be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
    2. %first ~SET %現在の値 を成す 1 個目の整数 ◎ Let first be the first integer in current.
    3. %second ~SET [ %現在の値 に 2 個目の値が明示的に指定されているならば それ / ~ELSE_ 当の属性の定義に述べられる暗黙的な値 ] ◎ Let second be the second integer in current if it has been explicitly specified, and if not, the implicit value as described in the definition of the attribute.
    4. ~IF[ コレは 1 個目の整数を反映する ] ⇒ %first ~SET 所与の値 ◎ If this SVGAnimatedInteger object reflects the first integer, then set first to value.\
    5. ~ELSE ⇒ %second ~SET 所与の値 ◎ Otherwise, set second to value. ◎ Append first to new. ◎ Append second to new.
  3. %結果 ~LET %first を`最も精確に表現する文字列$ ◎ Otherwise, the reflected attribute is defined to take a single integer value. Append value to new.
  4. ~IF[ %second ~NEQ ε ] ⇒ %結果 に次を順に付加する ⇒# `0020^U `SPACE^cn, %second を`最も精確に表現する文字列$ ◎ ↓↑
  5. コレの`反映先の属性$の値 ~SET %結果 ◎ Set the content attribute to a string consisting of each integer in new serialized to an implementation specific string that, if parsed as an <number> using CSS syntax, would return that integer, joined and separated by a single U+0020 SPACE character.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動する。 ◎ ↑

4.6.4. `SVGAnimatedNumber^I ~interface

`SVGAnimatedNumber$I ~objは、 ~animate可能な属性のうち[ 1 個の数-をとるもの(例: `path$e 上の `pathLength$a )の値 / 1 〜 2 個の数-をとるもの(例: `feDiffuseLighting$e 上の `kernelUnitLength$a )の片方の数- ]を`反映する$ために利用される。 ◎ An SVGAnimatedNumber object is used to reflect an animatable attribute that takes a number value (such as ‘pathLength’ on ‘path’). It is also used to reflect one part of an animatable attribute that takes an number followed by an optional second number (such as ‘kernelUnitLength’ on ‘feDiffuseLighting’).

[Exposed=Window]
interface `SVGAnimatedNumber^I0 {
           attribute float `baseVal$m;
  readonly attribute float `animVal$m;
};
`baseVal@m
コレの`反映先の属性$は[ 1 個の数-をとるとされている場合は その値 / 1 〜 2 個の数-をとるとされている場合は そのうち片方の数- ]を表現する。 ◎ For SVGAnimatedNumber objects that reflect an animatable attribute that takes a single number value, the baseVal and animVal IDL attributes represent the current non-animated value of the reflected attribute. For those that reflect one number of an attribute that takes a number followed by an optional second number, they represent the current non-animated value of one of the two numbers.\

その取得子~手続きは: ◎ On getting baseVal or animVal, the following steps are run:

  1. %値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let value be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
  2. ~IF[ コレの`反映先の属性$は 1 〜 2 個の数-をとるものと定義されている ]: ◎ If the reflected attribute is defined to take an number followed by an optional second number, then:

    1. ~IF[ コレは 1 個目の数-を反映する ] ⇒ ~RET %値 を成す 1 個目の数- ◎ If this SVGAnimatedNumber object reflects the first number, then return the first value in value.
    2. ~ELIF[ %値 に 2 個目の数-は明示的に指定されている ] ⇒ ~RET %値 を成す 2 個目の数- ◎ Otherwise, this SVGAnimatedNumber object reflects the second number. Return the second value in value if it has been explicitly specified, \
    3. ~RET 当の属性の 2 個目の数-に定義される暗黙的な値 ◎ and if not, return the implicit value as described in the definition of the attribute.

      注記: 例えば, `kernelUnitLength$a の定義では、 暗黙的な 2 個目の数-は,明示的な 1 個目の数-と同じになるとされている。 ◎ For example, the definition of ‘kernelUnitLength’ says that the implicit second number is the same as the explicit first number.

  3. ~ELSE(コレの`反映先の属性$は 1 個の数-をとるものと定義されている) ⇒ ~RET %値 ◎ Otherwise, the reflected attribute is defined to take a single number value. Return value.

その設定子~手続きは: ◎ On setting baseVal, the following steps are run:

  1. ( %first, %second ) ~LET ( 所与の値, ε ) ◎ Let value be the value being assigned to baseVal. ◎ Let new be a list of numbers.
  2. ~IF[ コレの`反映先の属性$は 1 〜 2 個の数-をとるものと定義されている ]: ◎ If the reflected attribute is defined to take an number followed by an optional second number, then:

    1. %現在の値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let current be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
    2. %first ~LET %現在の値 を成す 1 個目の数- ◎ Let first be the first number in current.
    3. %second ~SET [ %現在の値 内に 2 個目の値が明示的に指定されているならば それ / ~ELSE_ 当の属性の定義に述べられる暗黙的な値 ] ◎ Let second be the second number in current if it has been explicitly specified, and if not, the implicit value as described in the definition of the attribute.
    4. ~IF[ コレは 1 個目の数-を反映する ] ⇒ %first ~SET 所与の値 ◎ If this SVGAnimatedNumber object reflects the first number, then set first to value.\
    5. ~ELSE ⇒ %second ~SET 所与の値 ◎ Otherwise, set second to value. ◎ Append first to new. ◎ Append second to new.
  3. %結果 ~LET %first を`最も精確に表現する文字列$ ◎ Otherwise, the reflected attribute is defined to take a single number value. Append value to new.
  4. ~IF[ %second ~NEQ ε ] ⇒ %結果 に次を順に付加する ⇒# `0020^U `SPACE^cn, %second を`最も精確に表現する文字列$ ◎ Set the content attribute to a string consisting of each number in new serialized to an implementation specific string that, if parsed as an <number> using CSS syntax, would return the value closest to the number (given the implementation's supported Precisionreal number precision), joined and separated by a single U+0020 SPACE character.
  5. コレの`反映先の属性$の値 ~SET %結果 ◎ ↑
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動する。 ◎ ↑

4.6.5. `SVGAnimatedLength^I ~interface

`SVGAnimatedLength$I ~objは、[ ~animate可能な属性, または ~CSS~propと それに対応する呈示~属性 ]のうち[ `length$t / `percentage$t / `number$t ]を値にとるものを`反映する$ために利用される。 ◎ An SVGAnimatedLength object is used to reflect either (a) an animatable attribute that takes a <length>, <percentage> or <number> value, or (b) a CSS property that takes one of these values and its corresponding presentation attribute.

[Exposed=Window]
interface `SVGAnimatedLength^I0 {
  [SameObject] readonly attribute `SVGLength$I `baseVal$m;
  [SameObject] readonly attribute `SVGLength$I `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の値を表現する。 ◎ The baseVal and animVal IDL attributes represent the current value of the reflected content attribute.\
その取得子~手続きは ⇒ ~RET 次のようにされた `SVGLength$I ~obj ⇒# コレの`反映を継承する$, `方向性$ ~SET コレの`反映先の属性$により定義される特定のそれ ◎ On getting baseVal or animVal, an SVGLength object is returned that: • either reflects the base value of the reflected attribute or reflects the given presentation attribute, • is associated with the SVG element that the object with the reflecting IDL attribute of type SVGAnimatedLength was obtained from, and • has a directionality as defined by the specific reflected attribute.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動するが, 結果の`読専~flag$も ~T にする。 ◎ ↑

4.6.6. `SVGAnimatedAngle^I ~interface

`SVGAnimatedAngle$I ~objは、 `marker$e 要素~上の[ 【!~animateされている】 `orient$a 属性の `angle$t 値 ]を, `orientAngle$n ~IDL属性を通して`反映する$ために利用される。 ◎ An SVGAnimatedAngle object is used to reflect the <angle> value of the animated ‘orient’ attribute on ‘marker’, through the orientAngle IDL attribute.

[Exposed=Window]
interface `SVGAnimatedAngle^I0 {
  [SameObject] readonly attribute `SVGAngle$I `baseVal$m;
  [SameObject] readonly attribute `SVGAngle$I `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の `angle$t 値を表現する。 (該当するものは ~SVG `marker$e 要素~上の `orient$a 属性しかない。) ◎ The baseVal and animVal IDL attributes represent the current non-animated <angle> value of the reflected ‘orient’ attribute.\
その取得子~手続きは ⇒ ~RET コレの`反映を継承する$ `SVGAngle$I ~obj ◎ On getting baseVal or animVal, an SVGAngle object is returned that: • reflects the base value of the reflected ‘orient’ attribute, and • is associated with the SVG ‘marker’ element that the object with the reflecting IDL attribute of type SVGAnimatedAngle was obtained from.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動するが, 結果の`読専~flag$も ~T にする。 ◎ ↑

4.6.7. `SVGAnimatedString^I ~interface

`SVGAnimatedString$I ~objは、[ ~animate可能な属性のうち,文字列~値をとるもの ]を`反映する$ために利用される。 それはまた、 任意選択で,もう一つの非推奨にされた属性†も追加的に反映するよう定義し得る。 【†該当するものは、 `href^a 属性に対する `~xlink_href$a しかない】 ◎ An SVGAnimatedString object is used to reflect an animatable attribute that takes a string value. It can optionally be defined to additionally reflect a second, deprecated attribute.

[Exposed=Window]
interface `SVGAnimatedString^I0 {
           attribute DOMString `baseVal$m;
  readonly attribute DOMString `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の値を表現する。 ◎ The baseVal and animVal IDL attributes represent the current non-animated value of the reflected attribute.\

その取得子~手続きは: ◎ On getting baseVal or animVal, the following steps are run:

  1. ~IF[ コレは ある要素 %要素 上の もう一つの非推奨にされた属性 %A を追加的に反映している ]~AND[ %要素 上には、 コレの`反映先の属性$は無いが, %A は在る ] ⇒ ~RET %A の値
  2. %値 ~LET コレの`反映先の属性$の`基底~値$
  3. ~RET %値 に応じて ⇒ ε ならば 空~文字列 / ~ELSE_ %値
◎ If the reflected attribute is not present, then: • If the SVGAnimatedString object is defined to additionally reflect a second, deprecated attribute, and that attribute is present, then return its value. • Otherwise, if the reflected attribute has an initial value, then return it. • Otherwise, return the empty string. ◎ Otherwise, the reflected attribute is present. Return its value.

注記: `SVGURIReference$I ~interfaceの `href$m1 ~memberに対しては、 これによる結果,次が[ 満たされるならば `~xlink_href$a / 満たされないならば `href^a ]属性が返されることになる ⇒ [ `href^a 属性は無い ]~AND[ 非推奨にされた `~xlink_href$a 属性は在る ] ◎ For the href member on the SVGURIReference interface, this will result in the deprecated ‘xlink:href’ attribute being returned if it is present and the ‘href’ attribute is not, and in the ‘href’ attribute being returned in all other cases.

その設定子~手続きは: ◎ On setting baseVal, the following steps are run:

  1. ~IF[ コレは ある要素 %要素 上の もう一つの非推奨にされた属性 %A を追加的に反映している ]~AND[ %要素 上には、 コレの`反映先の属性$は無いが, %A は在る ] ⇒ %A の値 ~SET 所与の値 ◎ If the reflected attribute is not present, the SVGAnimatedString object is defined to additionally reflect a second, deprecated attribute, and that deprecated attribute is present, then set that deprecated attribute to the specified value.
  2. ~ELSE ⇒ コレの`反映先の属性$の値 ~SET 所与の値 ◎ Otherwise, set the reflected attribute to the specified value.

注記: `SVGURIReference$I ~interface上の `href$m1 ~memberに対しては、 これによる結果,次が[ 満たされるならば `~xlink_href^a / 満たされないならば `href^a ]属性が設定されることになる ⇒ [ `href^a 属性は無い ]~AND[ 非推奨にされた `~xlink_href$a 属性は在る ] ◎ For the href member on the SVGURIReference interface, this will result in the deprecated ‘xlink:href’ attribute being set if it is present and the ‘href’ attribute is not, and in the ‘href’ attribute being set in all other cases.

`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動する。 ◎ ↑

4.6.8. `SVGAnimatedRect^I ~interface

`SVGAnimatedRect$I ~objは、[ ~animate可能な属性のうち,矩形~値をとるもの ]を`反映する$ために利用される。 【! as specified by an x, y, width and height】 ◎ An SVGAnimatedRect object is used to reflect an animatable attribute that takes a rectangle value as specified by an x, y, width and height.

注記: この仕様においては、 `SVGAnimatedRect$I として反映される属性は `viewBox$a の他にない。 【 `SVGFitToViewBox$I を見よ。】 ◎ In this specification the only attribute to be reflected as an SVGAnimatedRect is ‘viewBox’.

[Exposed=Window]
interface `SVGAnimatedRect^I0 {
  [SameObject] readonly attribute `DOMRect$I `baseVal$m;
  [SameObject] readonly attribute `DOMRectReadOnly$I `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の矩形~値を表現する。 ◎ The baseVal and animVal IDL attributes represent the current non-animated rectangle value of the reflected attribute.\
その取得子~手続きは ⇒ ~RET コレの`反映を継承する$ `DOMRect$I ~obj ◎ On getting baseVal or animVal, a DOMRect object is returned.

コレの作成時, および コレの`反映先の属性$が[ 追加- / 除去- / 変更- ]されたときは、 その後に次の手続きを走らす: ◎ Upon creation of the baseVal or animVal DOMRect objects, and afterwards whenever the reflected content attribute is added, removed, or changed, the following steps are run:

  1. %値 ~LET コレの`反映先の属性$の`基底~値$ ◎ Let value be the value of the reflected attribute (using the attribute's initial value if it is not present or invalid).
  2. コレの `DOMRect$I ~objの[ `x 座標$, `y 座標$, `横幅~寸法$, `縦幅~寸法$ ] ~SET %値 の対応する成分たち ◎ Let x, y, width and height be those corresponding components of value. ◎ Set the DOMRect object's x coordinate, y coordinate, width and height to x, y, width and height, respectively.

[ 上の~algoの一部としてコレの`反映先の属性$の値を `DOMRect$I の中に反映するとき ]を除き、 コレの `DOMRect$I ~objの[ `x 座標$/`y 座標$/`横幅~寸法$/`縦幅~寸法$ ]が変更されたときは、次を行うモノトスル ⇒ `内容~属性を直列化し直す$( コレの`反映先の属性$ ) ◎ Whenever the x coordinate, y coordinate, width or height property of the baseVal or animVal DOMRect object changes, except as part of the previous algorithm that reflects the value of the content attribute into the DOMRect, the reflected content attribute must be reserialized.

`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動するが, 結果の`読専~flag$も ~T にする。 ◎ ↑

4.6.9. `SVGAnimatedNumberList^I ~interface

`SVGAnimatedNumberList$I ~objは、[ ~animate可能な属性のうち, `number$t 値の~listをとるもの ]を`反映する$ために利用される。 ◎ An SVGAnimatedNumberList object is used to reflect an animatable attribute that takes a list of <number> values.

[Exposed=Window]
interface `SVGAnimatedNumberList^I0 {
  [SameObject] readonly attribute `SVGNumberList$I `baseVal$m;
  [SameObject] readonly attribute `SVGNumberList$I `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の値を表現する。 ◎ The baseVal and animVal IDL attributes represent the current non-animated value of the reflected attribute.\
その取得子~手続きは ⇒ ~RET コレの`反映を継承する$ `SVGNumberList$I ~obj ◎ On getting baseVal or animVal, an SVGNumberList object is returned that reflects the base value of the reflected attribute.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動するが, 結果の`読専~flag$も ~T にする。 ◎ ↑

4.6.10. `SVGAnimatedLengthList^I ~interface

`SVGAnimatedLengthList$I ~objは、[ ~animate可能な属性のうち[ `length$t /`percentage$t / `number$t ]値の~listをとるもの ]を`反映する$ために利用される。 ◎ An SVGAnimatedLengthList object is used to reflect an animatable attribute that takes a list of <length>, <percentage> or <number> values.

[Exposed=Window]
interface `SVGAnimatedLengthList^I0 {
  [SameObject] readonly attribute `SVGLengthList$I `baseVal$m;
  [SameObject] readonly attribute `SVGLengthList$I `animVal$m;
};
`baseVal@m
コレの`反映先の属性$の値を表現する。 ◎ The baseVal or animVal IDL attributes represent the current non-animated value of the reflected attribute.\
その取得子~手続きは ⇒ ~RET コレの`反映を継承する$ `SVGLengthList$I ~obj ◎ On getting baseVal or animVal, an SVGLengthList object is returned that reflects the base value of the reflected attribute.
`animVal@m
取得子は、 `baseVal$m 取得子と同じに挙動するが, 結果の`読専~flag$も ~T にする。 ◎ ↑

4.7. 他の~DOM~interface

4.7.1. `SVGUnitTypes^I ~interface

`SVGUnitTypes$I ~interfaceは、 反映先の[ `gradientUnits$a / `patternContentUnits$a / 他の類似な属性 ]用に共通的に利用される定数の集合を定義する。 ◎ The SVGUnitTypes interface defines a commonly used set of constants used for reflecting ‘gradientUnits’, ‘patternContentUnits’ and other similar attributes.

[Exposed=Window]
interface `SVGUnitTypes^I0 {
  // Unit Types
  const unsigned short `SVG_UNIT_TYPE_UNKNOWN$m = 0;
  const unsigned short `SVG_UNIT_TYPE_USERSPACEONUSE$m = 1;
  const unsigned short `SVG_UNIT_TYPE_OBJECTBOUNDINGBOX$m = 2;
};

`SVGUnitTypes$I 上で定義される各種 単位~型~定数は、 次の表tの 2 列目に与える属性~値に対応する: ◎ The unit type constants defined on SVGUnitTypes have the following meanings:

定数 属性~値
`SVG_UNIT_TYPE_USERSPACEONUSE@m `userSpaceOnUse^v
`SVG_UNIT_TYPE_OBJECTBOUNDINGBOX@m `objectBoundingBox^v
`SVG_UNIT_TYPE_UNKNOWN@m 他の欄に該当しない値~型
◎ Constant Meaning SVG_UNIT_TYPE_USERSPACEONUSE Corresponds to the 'userSpaceOnUse' attribute value. SVG_UNIT_TYPE_OBJECTBOUNDINGBOX Corresponds to the 'objectBoundingBox' attribute value. SVG_UNIT_TYPE_UNKNOWN Some other type of value.

4.7.2. `SVGTests^I ~mixin

`SVGTests$I ~interfaceは、 `条件付き処理~属性$を反映するために利用され、 そのような属性を~supportする要素~用の他の`~interfaceに内包される$。 ◎ The SVGTests interface is used to reflect conditional processing attributes, and is mixed in to other interfaces for elements that support these attributes.

interface mixin `SVGTests^I0 {
  [SameObject] readonly attribute `SVGStringList$I `requiredExtensions$m;
  [SameObject] readonly attribute `SVGStringList$I `systemLanguage$m;
};
`requiredExtensions@m
`requiredExtensions$a 内容~属性を`反映する$。 ◎ The requiredExtensions IDL attribute reflects the ‘requiredExtensions’ content attribute.
`systemLanguage@m
`systemLanguage$a 内容~属性を`反映する$。 ◎ The systemLanguage IDL attribute reflects the ‘systemLanguage’ content attribute.

4.7.3. `SVGFitToViewBox^I ~mixin

`SVGFitToViewBox$I ~interfaceは、[ `viewBox$a / `preserveAspectRatio$a ]属性を反映するために利用され,これらの属性を~supportする要素~用の他の`~interfaceに内包される$。。 ◎ The SVGFitToViewBox interface is used to reflect the ‘viewBox’ and ‘preserveAspectRatio’ attributes, and is mixed in to other interfaces for elements that support these two attributes.

interface mixin `SVGFitToViewBox^I0 {
  [SameObject] readonly attribute `SVGAnimatedRect$I `viewBox$m;
  [SameObject] readonly attribute `SVGAnimatedPreserveAspectRatio$I `preserveAspectRatio$m;
};
`viewBox@m
`viewBox$a 内容~属性を`反映する$。 ◎ The viewBox IDL attribute reflects the ‘viewBox’ content attribute.
`preserveAspectRatio@m
`preserveAspectRatio$a 内容~属性を`反映する$。 ◎ The preserveAspectRatio IDL attribute reflects the ‘preserveAspectRatio’ content attribute.

4.7.4. `SVGURIReference^I ~mixin

`SVGURIReference$I ~interfaceは、[ `href^a 属性/非推奨にされた `~xlink_href$a 属性 ]を反映するために利用される。 ◎ The SVGURIReference interface is used to reflect the ‘href’ attribute and the deprecated ‘xlink:href’ attribute.

interface mixin `SVGURIReference^I0 {
  [SameObject] readonly attribute `SVGAnimatedString$I `href$m;
};
`href@m
`href^a 属性の値を表現する。 また、 非推奨にされた `~xlink_href$a 属性を~supportするよう定義された要素~上では, その値も表現する。 ◎ The href IDL attribute represents the value of the ‘href’ attribute, and, on elements that are defined to support it, the deprecated ‘xlink:href’ attribute.\

その取得子~手続きは、 次に従って挙動する `SVGAnimatedString$I ~objを返す: ◎ On getting href, an SVGAnimatedString object is returned that:

  • `href^a 属性を`反映する$ ◎ reflects the ‘href’ attribute, and
  • 要素は非推奨にされた `~xlink_href$a 属性を~supportするよう定義されている場合、 それも追加的に`反映する$。 ◎ if the element is defined to support the deprecated ‘xlink:href’ attribute, additionally reflects that deprecated attribute.
注記: `SVGAnimatedString$I1 ~interfaceは、 その[ `baseVal$m1 / `animVal$m1 ]~memberを通して,非推奨にされた `~xlink_href$a 属性を — その属性は在る, かつ `href^a 属性は無い場合に限り — 反映するものと定義される。 他のすべての状況下では `href^a 属性を反映する。 `~animation要素$は、 `attributeName^a 属性に指定された値 `~xlink_href^v を, `href^a 属性を~targetにする別名として扱う。 ◎ The SVGAnimatedString interface is defined to reflect, through its baseVal and animVal members, the deprecated ‘xlink:href’ attribute, if that attribute is present and the ‘href’ is not, and to reflect the ‘href’ attribute in all other circumstances. Animation elements treat attributeName='xlink:href' as being an alias for targeting the ‘href’ attribute.