[4] features
異体属性は、
利用者エージェントの特徴集合における特徴タグの存在・不存在が異体の全体の品質にどう影響するかを指定するものです >>1。
[2] 属性値は、 feature-list
です >>6。
[3] feature-list
は、1つ以上の要素の空白区切りのリスト
(%
) です >>1。
[5] 要素は、特徴述語1つか、特徴述語1つ以上の空白区切りのリスト
(%
) を四角括弧で括ったもののいずれかです。
更にその後に ;
と、省略可能な符号付きの小数を
+
と -
の順に続けることもできます。 >>1
[7] 小数の構文は明記されていませんが、生成規則名 >>1 から単精度浮動小数点数と思われます。仕様書上の例示は通常の表記のものばかりで、指数表記を使ったものは見られません。
[8] 符号 +
と小数が指定された場合、
true-improvement
が指定された小数値となります。
指定されなかった場合は true-improvement
が 1 となります。 >>1
[9] 符号 -
と小数が指定された場合、
false-degradation
が指定された小数値となります。
指定されなかった場合は、 true-improvement
が指定されたら 1、
指定されなかったら 0 が false-degradation
となります。 >>1
[10] features
異体属性のq値を計算する際には、
指定された各要素の値を乗じたものと利用者エージェントはするべきですし、
遠隔異体選択アルゴリズムはしなければなりません >>1。
[13] 各要素の値は、特徴述語が真の場合 (複数指定されている場合には最低1つが真の場合)
には true-improvement
、それ以外の場合には false-degradation
となります >>1。
The features attribute specifies how the presence or absence of particular feature tags in the user agent affects the overall quality of the variant. This attribute is covered in section 6.4.
The features attribute, for which section 5.1 defines the syntax
is used in a variant description to specify how the presence or absence of particular feature tags in the user agent affects the overall quality of the variant.
feature-list = 1%feature-list-element
feature-list-element = ( fpred | fpred-bag ) [ ";" [ "+" true-improvement ] [ "-" false-degradation ] ]fpred-bag = "[" 1%fpred "]"
true-improvement = short-float
false-degradation = short-float
Features attributes are used in variant descriptions (section 5). Variant descriptions can be transmitted in Alternates headers (section 8.3).
Examples are:
- {features !textonly [blebber !wolx] colordepth=3;+0.7}
- {features !blink;-0.5 background;+1.5 [blebber !wolx];+1.4-0.8}
The default value for the true-improvement is 1. The default value for the false-degradation is 0, or 1 if a true-improvement value is given.
A user agent SHOULD, and a remote variant selection algorithm MUST compute the quality degradation factor associated with the features attribute by multiplying all quality degradation factors of the elements of the feature-list. Note that the result can be a factor greater than 1.
feature-list
の要素の品質減衰因子すべてを掛け合わせることによる
features
属性に関連付けられた品質減衰因子の計算を利用者エージェントは行うべきですし、
遠隔変種選択算法は計算しなければなりません。
A feature list element yields its true-improvement factor if the corresponding feature predicate is true, or if at least one element of the corresponding fpred-bag is true. The element yields its false-degradation factor otherwise.
特徴目録要素は、対応する特徴述語が真であるか、
対応する fpred-bag
の少なくても1つが真である場合には
true-improvement
因子を与えます。
それ以外の時には要素は false-degradation
因子を与えます。