SVG Tiny 1.2 – 20081222

4 基本データ型

この章では、 SVG のプロパティと属性の定義に共通して利用されるデータ型を定義する。複数のプロパティまたは属性に共用されない一部のデータ型については後の章の中で定義される。 This chapter defines a number of common data types used in the definitions of SVG properties and attributes. Some data types that are not referenced by multiple properties and attributes are defined inline in subsequent chapters.

<boolean>

真偽値を表す。値は 'true' または 'false' のいずれかで指定する。 A boolean value, specified as either 'true' or 'false'.

<Char>

文字を表す。生成規則は XML 1.0 ([XML10], 2.2 節) の Char 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.2 節) の Char により定められる。 A character, as defined by the Char production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.2), or the Char production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.2) if the document is an XML 1.1 document.

<Clock-value>

時間の長さを表す。 timed 要素 の種々の属性で利用される。 <Clock-value> に指定可能な値の構文は アニメーション の章の Clock values の節で述べる。 An amount of time, used by various attributes on timed elements. The grammar describing possible values for a <Clock-value> is given in the Clock values section of the Animation chapter.

<color>

sRGB 色空間 [SRGB] に属する色を表す。 <color> 型は color プロパティの値として、および fill, stroke, stop-color, solid-color, viewport-fill プロパティの値の構成成分に利用される。 The basic type <color> defines a color within the sRGB color space [SRGB]. The <color> type is used as the value of the 'color' property and is a component of the definitions of properties 'fill', 'stroke', 'stop-color', 'solid-color' and 'viewport-fill'.

色値の構文 にて定められる構文規則によるすべての <color> がサポートされなければならない。すべての RGB 色は sRGB 色空間 [SRGB] に属する。 sRGB により、明確かつ客観的に計測可能な定義が色に与えられ、国際標準 [COLORIMETRY] に関連付けられるようになる。 All of the syntax alternatives for <color> defined in Syntax for color values must be supported. All RGB colors are specified in the sRGB color space [SRGB]. Using sRGB provides an unambiguous and objectively measurable definition of the color, which can be related to international standards [COLORIMETRY].

<content-type>

Multipart Internet Mail Extensions: (MIME) Part Two: Media Types [RFC2046] による、いわゆるメディア型を表す。 An Internet media type, as per Multipart Internet Mail Extensions: (MIME) Part Two: Media Types [RFC2046].

<coordinate>

(座標成分) 利用座標系 における( x 座標の場合は x 軸方向, y 座標の場合は y 軸方向に沿う)原点からの(正負も含めた)距離を表す。構文は <length> と同じである。 【この翻訳では単数の "coordinate" を「座標成分」と訳すことにしている。単に「座標」と記すと (x, y) 座標の組と混同するおそれがあるので。】 A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>.

<focus>

この型の値は nav-next, nav-prev 等々、種々の ナビゲーション属性 に用いることができる。これらの属性に与える値の定義は ナビゲーションの指定 を見よ。 The type of value that can be used in the various navigation attributes, such as 'nav-next', 'nav-prev', etc. See Specifying navigation for the definition of the values that can be used in those attributes.

<font-family-value>

フォントファミリ名と総称名のリスト。この型の値は 'inherit' を除き、 font-family プロパティでのみ用いることができる。 A list of font family names and generic names. Specifically, this is the type of value that can be used for the 'font-family' property, excluding the 'inherit' value.

<family-name>

単独のフォントファミリ名を表す。 拡張可能スタイルシート言語 (XSL) 1.1 ([XSL], 7.9.2 節) に定められている <family-name> として与えられる。 A single font family name as given by a <family-name>, as defined in Extensible Stylesheet Language (XSL) Version 1.1 ([XSL], section 7.9.2).

<font-size-value>

'inherit' を除き、 font-size プロパティで利用される値になる。 A value that can be used for the 'font-size' property, excluding the 'inherit' value.

<FuncIRI>

IRI の関数表記: "url(" <IRI> ")". Functional notation for an IRI: "url(" <IRI> ")".

<ID>

ID 型の XML 属性( idxml:id など)に用いることができる値の型。生成規則は XML 1.0 ([XML10], 2.3 節) の Name 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.3 節) の Name に一致する。 The type of value that can be used in an XML attribute of type ID (such as 'id' and 'xml:id'); that is, a string matching the Name production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3), or the Name production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.3) if the document is an XML 1.1 document.

<IDREF>

IDREF 型の XML 属性( observer など)に用いることができる値の型。生成規則は XML 1.0 ([XML10], 2.3 節) の Name 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.3 節) の Name に一致する。 The type of value that can be used in an XML attribute of type IDREF (such as 'observer'); that is, a string matching the Name production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3), or the Name production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.3) if the document is an XML 1.1 document.

<integer>

整数を表す。省略可能な正負を表す符号("+" か "-")に続く1桁以上の '0' から '9' までの数字で指定される。符号が無いものは非負数になる。 An <integer> is specified as an optional sign character ("+" or "-") followed by one or more digits "0" to "9". If the sign character is not present, the number is non-negative.

適合 SVG Tiny 1.2 内容においては、 <integer> 値は -32,768 から 32,767 までの範囲に入らなければならない(上限値と下限値は範囲に含まれる)。 <integer> values in conforming SVG Tiny 1.2 content must be within the range of -32,768 to 32,767, inclusive.

<IRI>

国際化リソース識別子( IRI 参照)。SVG における IRI 参照の仕様については IRI 参照 を見よ。 An Internationalized Resource Identifier (see IRI). For the specification of IRI references in SVG, see IRI references.

<language-id>

XML 1.0 ([XML10], 2.12 節) および XML 1.1 ([XML11], 2.12 節) で定められている xml:lang 属性の値の型。指定する値は BCP 47 ([BCP 47], 2 節) に定められる言語タグか空文字列になる。 The type of value accepted by the 'xml:lang' attribute as defined in Extensible Markup Language (XML) 1.0 ([XML10], section 2.12) and Extensible Markup Language (XML) 1.1 ([XML11], section 2.12). Specifically, this is either a language tag as defined by BCP 47 ([BCP 47], section 2) or the empty string.

<length>

長さとは距離を測ったもののことである。 <length> は <number> と後続の省略可能な単位識別子で指定される。 <length> の単位識別子が省略された場合(例えば '48')、値は現在の 利用座標系 における距離を表す。 A length is a distance measurement. The format of a <length> is a <number> optionally followed by a unit identifier. If the <length> is expressed as a value without a unit identifier (e.g., '48'), then the <length> represents a distance in the current user coordinate system.

SVG Tiny 1.2 においては svg 要素の width および height 属性にのみ単位がサポートされている。これらの値には次の単位: in, cm, mm, pt, pc, px, % が指定できる。これらの単位識別子が与えられた場合( '12mm' など)、 <length> は 単位 の節の記述に従って処理される。 SVG Tiny 1.2 only supports optional units on the 'width' and 'height' attributes on the 'svg' element. These can specify values in any of the following units: in, cm, mm, pt, pc, px and %. If one of the unit identifiers is provided (e.g., '12mm'), then the <length> is processed according to the description in Units.

svg 要素の width および height 属性における百分率値は(例えば '10%')、 ビューポート の大きさに対する百分率を表す( 単位 を見よ)。 Percentage values (e.g., '10%') on the 'width' and 'height' attributes of the 'svg' element represent a percentage of the viewport size (refer to the section that discusses Units in general).

<list-of-content-types>

メディア型の空白区切りのリスト。 requiredFormats 属性で利用される。 A space-separated list of Internet media types, as used by the 'requiredFormats' attribute.

下に EBNF による <list-of-content-types> の構文を示す [EBNF]: The following is an EBNF grammar describing the <list-of-content-types> syntax [EBNF]:

list-of-content-types ::= content-type
                          | content-type wsp list-of-content-types
wsp                   ::= (#x9 | #xD | #xA | #x20)*
<list-of-family-names>

フォントファミリ名のリスト。構文は <generic-family> と 'inherit' を用いないことを除き、 font-family プロパティと同じになる。 A <list-of-family-names> is a list of font family names using the same syntax as the 'font-family' property, excluding the <generic-family> and 'inherit' values.

<list-of-language-ids>

空でない <language-id> 値のコンマ区切りのリスト。コンマの前後に空白があってもよい。 A <list-of-language-ids> is a comma separated list of non-empty <language-id> values. White space may be used before or after the commas.

<list-of-strings>

空白区切りの <string> のリスト。ここで空白とは、1個以上の文字 "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D) の任意の連なりと定義する。 A <list-of-strings> consists of a separated sequence of <string>s. String lists are white space-separated, where white space is defined as one or more of the following consecutive characters: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A) and "carriage return" (U+000D).

下に EBNF による <list-of-strings> の構文を示す [EBNF]: The following is an EBNF grammar describing the <list-of-strings> syntax [EBNF]:

list-of-strings ::= string
                    | string wsp list-of-strings
wsp             ::= (#x9 | #xD | #xA | #x20)*
<list-of-Ts>

T<content-type>, <string>, <language-id>, <family-name> のいずれの型でもない任意の型)。値のリストを表す。特に断らない限り、リストの項目はコンマ(前後に空白があってもよい)または空白のみで区切るものとする。 (Where T is a type other than <content-type>, <string>, <language-id> and <family-name>.) A list consists of a separated sequence of values. Unless explicitly described differently, each pair of list items can be separated either by a comma (with optional whitespace before and after the comma) or by white space alone.

空白とは、1個以上の文字 "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D) の任意の連なりと定義する。 White space in lists is defined as one or more of the following consecutive characters: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A) and "carriage return" (U+000D).

下に EBNF による <list-of-Ts> の構文を示す [EBNF]: The following is a template for an EBNF grammar describing the <list-of-Ts> syntax [EBNF]:

list-of-Ts ::= T
               | T comma-wsp list-of-Ts
comma-wsp ::= (wsp+ comma? wsp*) | (comma wsp*)
comma     ::= ","
wsp       ::= (#x9 | #xD | #xA | #x20)

T<content-type>, <string>, <language-id> and <family-name> for いずれかの型以外に置き換えたものからは、その型のためのリスト型の構文が得られる。 Substituting a type other than <content-type>, <string>, <language-id> and <family-name> for T will yield a grammar for a list of that type.

<long>

整数を表す。省略可能な符号文字 ("+" または "-") と後続する1個以上の数字( "0" から "9" )の連なりで指定する。符号文字が省略された場合、値は非負値を表す。 A <long> is specified as an optional sign character ("+" or "-") followed by one or more digits "0" to "9". If the sign character is not present, the number is non-negative.

適合 SVG Tiny 1.2 内容における <long> 値は -2,147,483,648 から 2,147,483,647 までの範囲に入らなければならない(上限値と下限値は範囲に含まれる)。 <long> values in conforming SVG Tiny 1.2 content must be within the range of -2,147,483,648 to 2,147,483,647, inclusive.

<NCName>

コロンが含まれない XML の名前を表す。生成規則は XML 名前空間 1.0 ([XML-NS10], 3 節), の NCName 、あるいは文書が XML 1.1 文書の場合は XML 名前空間 1.1 ([XML-NS], 3 節) の NCName により定められる、 An XML name without colons, as defined by the NCName production in Namespaces in XML 1.0 ([XML-NS10], section 3), or the NCName production in Namespaces in XML 1.1 ([XML-NS], section 3) if the document is an XML 1.1 document.

<number>

実数を表す。値は十進表記または科学的記数法で指定する。十進表記による <number> の書式は <integer> か、あるいは、省略可能な正負を表す符号, 0桁以上の数字, ドット('.'), 1桁以上の数字, が、この順で続く文字列かのいずれかとなる。科学的記数法は十進表記に続けて文字 "E" または "e" と <integer> を付加する。 A <number> value is specified in either decimal or scientific notation. A <number> using decimal notation consists of either an <integer>, or an optional sign character followed by zero or more digits followed by a dot (.) followed by one or more digits. Using scientific notation, it consists of a number in decimal notation followed by the letter "E" or "e", followed by an <integer>.

下に EBNF による <number> の構文を示す [EBNF]: The following is an EBNF grammar describing the <number> syntax [EBNF]:

number            ::= decimal-number | scientific-number
decimal-number    ::= integer
                      | ("+" | "-")? [0-9]* "."  [0-9]+
scientific-number ::= decimal-number [Ee] integer

適合 SVG Tiny 1.2 内容における <number> 値は少数部が4桁以下、範囲は -32,767.9999 から +32,767.9999 まで(上限と下限は範囲に含まれる)でなければならない。 丸め誤差を抑えてできるだけ高精度な結果を得るため、座標系変換などの処理においては、より高精度の浮動小数点による値の保持と演算が推奨される。 <number> values in conforming SVG Tiny 1.2 content must have no more than 4 decimal digits in the fractional part of their decimal expansion and must be in the range -32,767.9999 to +32,767.9999, inclusive. 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.

<paint>

fillstroke プロパティの値は グラフィックス要素 の内部や外形線に塗りを指定する <paint> 型になる。 <paint> に指定可能なオプションとその構文は 塗りの指定 で述べられる。 The values for properties 'fill' and 'stroke' are specifications of the type of paint to use when filling or stroking a given graphics element. The available options and syntax for <paint> are described in Specifying paint.

<path-data>

パスデータを表す。 path 要素の d 属性 に指定できる。 パスデータの構文 を含む、より詳細な記述は パスデータの詳細 を見よ。 The <path-data> type is used to represent path data, as can be specified in the 'd' attribute on a 'path' element. See the detailed description of path data, including the grammar for path data.

<points-data>

座標のリストの表す。 polylinepolygon 要素の points 属性に指定できる。 座標データの構文 を見よ。 The <points-data> type is used to represent a list of points, as can be specified in the 'points' attribute on a 'polyline' or 'polygon' element. See the grammar for points data.

<QName>

XML 修飾名を表す。生成規則は XML 名前空間 1.0 ([XML-NS10], 3 節) の QName 、あるいは文書が XML 1.1 文書の場合は XML 名前空間 1.1 ([XML-NS], 3 節) の QName により定められる。 <QName> が接頭辞を持つ場合、接頭辞は名前が出現した場所に効力を持つ名前空間宣言を用いて、一組の IRI 参照 と局所名に展開される。接頭辞無しの属性においては、接頭辞無しの名前に既定の名前空間が利用されないことに注意。 The <QName> type is a qualified name, as defined by the QName production in Namespaces in XML 1.0 ([XML-NS10], section 3), or the QName production in Namespaces in XML 1.1 ([XML-NS], section 3) if the document is an XML 1.1 document. If the <QName> has a prefix, then the prefix is expanded into a tuple of an IRI reference and a local name, using the namespace declarations in effect where the name occurs. Note that, as with unprefixed attributes, the default namespace is not used for unprefixed names.

<string>

0個以上の <Char> の列。 A sequence of zero or more <Char>s.

<transform>

変換を表す。 transform 属性に指定できる。 'transform' 属性 で述べられるように値は、変換リスト, 変換への参照, 'none' の3通りいずれかになる。 A <transform> is a transformation specification, as can be specified in the 'transform' attribute. As described in The 'transform' attribute, three types of values are allowed: a transform list, a transform reference and the 'none' value.

下に EBNF による <transform> の構文を示す [EBNF]: The following is an EBNF grammar describing the <transform> syntax [EBNF]:

transform ::= transform-list | transform-ref | "none"
<XML-Name>

XML の名前を表す。生成規則は XML 1.0 ([XML10], 2.3 節) の Name 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.3 節) の Name により定められる。 An XML name, as defined by the Name production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3), or the Name production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.3) if the document is an XML 1.1 document.

<XML-NMTOKEN>

XML の名前トークンを表す。生成規則は XML 1.0 ([XML10], 2.3 節) の Nmtoken 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.3 節) の Nmtoken により定められる。 An XML name token, as defined by the Nmtoken production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3), or the Nmtoken production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.3) if the document is an XML 1.1 document.

<XML-NMTOKENS>

空白で区切られた XML の名前トークン列を表す。生成規則は XML 1.0 ([XML10], 2.3 節) の Nmtokens 、あるいは文書が XML 1.1 文書の場合は XML 1.1 ([XML11], 2.3 節) の Nmtokens により定められる。 An space separated sequence of XML name tokens, as defined by the Nmtokens production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3), or the Nmtokens production in Extensible Markup Language (XML) 1.1 ([XML11], section 2.3) if the document is an XML 1.1 document.