features

異体説明 features 属性 (HTTP)

仕様書

意味

[4] features 異体属性は、 利用者エージェント特徴集合における特徴タグの存在・不存在が異体の全体の品質にどう影響するかを指定するものです >>1

構文

[2] 属性値は、 feature-list です >>6

[3] feature-list は、1つ以上の要素の空白区切りのリスト (%) です >>1

  1. 要素
  2. *
    1. OWS
    2. 要素

[5] 要素は、特徴述語1つか、特徴述語1つ以上空白区切りのリスト (%) を四角括弧で括ったもののいずれかです。 更にその後に ; と、省略可能な符号付きの小数+- の順に続けることもできます。 >>1

  1. |
    1. 特徴述語
    2. |
      1. =
        1. [
        2. 特徴述語
        3. *
          1. OWS
          2. 特徴述語
        4. ]
  2. ?
    1. ;
    2. ?
      1. +
      2. 小数
    3. ?
      1. -
      2. 小数

[7] 小数の構文は明記されていませんが、生成規則>>1 から単精度浮動小数点数と思われます。仕様書上の例示は通常の表記のものばかりで、指数表記を使ったものは見られません。

[8] 符号 + と小数が指定された場合、 true-improvement が指定された小数値となります。 指定されなかった場合は true-improvement が 1 となります。 >>1

[9] 符号 - と小数が指定された場合、 false-degradation が指定された小数値となります。 指定されなかった場合は、 true-improvement が指定されたら 1、 指定されなかったら 0 が false-degradation となります。 >>1

[12] OWS を挿入できるのかは不明です。仕様書上の例では構文上明示された箇所以外で空白を使っていません。

処理

[10] features 異体属性q値を計算する際には、 指定された各要素の値を乗じたものと利用者エージェントはするべきですし、 遠隔異体選択アルゴリズムはしなければなりません >>1

[11] この計算結果は 1 を超えることもあります >>1

[13] 各要素の値は、特徴述語の場合 (複数指定されている場合には最低1つがの場合) には true-improvement、それ以外の場合には false-degradation となります >>1

歴史

[14] RFC 2295 (HTTP 透過内容折衝) 5.5 Features

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.

RFC 2295 (HTTP 透過内容折衝) 6.4 Features attribute

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.

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 因子を与えます。

メモ