機能集合

特徴集合 (HTTP)

[16] 特徴集合 (feature set) は、利用者利用者エージェント能力や好みを表す特徴タグと値の集合です。

仕様書

意味

[3] 利用者エージェント特徴集合とは、 利用者エージェントの能力と利用者好み (preference) を記録したデータ構造です >>1

[6] 特徴集合は、特徴タグ、および特徴タグの値0個以上の集合の組によって構成される記録 (record) 集合です。空集合かもしれません。 >>1

[8] 値を持てない特徴タグの場合は、値の集合空集合です >>1

[9] 値を持てる特徴タグの場合は、現在当該特徴タグに関連付けられている値の集合を表します。この集合にある値が含まれることを、特徴タグにある値が現れる (present) といいます。 >>1

[7] 特徴集合にある記録が含まれる場合、利用者エージェントがその能力を実装している、 または利用者がその好みを表明していることを意味します >>1

構文

[10] 特徴集合データ構造であり、情報交換用の構文は用意されていません。

[11] ただし仕様書は次のような表記を採用しています >>1

      { ( "frames" , { } ) ,
        ( "paper"  , { "A4" , "A5" } )
      }

文脈

[4] 機能集合局所異体選択アルゴリズムで使用します >>1

[5] 利用者エージェントは、機能集合の一部を遠隔異体選択アルゴリズムに知らせるべく、 Accept-Features: ヘッダーを指定できます >>1

処理モデル

[12] 特徴集合に未知の特徴タグが含まれる場合は、それが含まれないものとして扱うべきです >>1

[13] 利用者エージェント要求の種類に応じて特徴集合の内容を変化させても構いませんし、状況によって更新しても構いません >>1

[14] 例えばの大きさ >>1利用者の操作により変化します。

[15] この性質を強調するために現在の要求の特徴集合 (the feature set of the current request) と言います。

歴史

[2] RFC 2295 (HTTP 透過内容折衝) 6.2 Feature sets

The feature set of a user agent is a data structure which records the capabilities of the user agent and the preferences of the user.

利用者エージェント特徴集合は、 利用者エージェントの能力と利用者の好みを記録するデータ構造です。

Feature sets are used by local variant selection algorithms (see appendix 19 for an example). A user agent can use the Accept-Features header (section 8.2) to make some of the contents of its feature set known to remote variant selection algorithms.

特徴集合は局所変種選択算法で使います。 利用者エージェントは特徴集合の内容の幾つかを遠隔変種選択算法に知らせるために Accept-Features 頭を使っても構いません。

Structurally, a feature set is a possibly empty set, containing records of the form

      ( feature tag , set of feature tag values )

If a record with a feature tag is present in the set, this means that the user agent implements the corresponding capability, or that the user has expressed the corresponding preference.

Each record in a feature set has a, possibly empty, set of tag values. For feature tags which cannot have values associated with it, this set is always empty. For feature tags which can have zero, one, or more values associated with it, this set contains those values currently associated with the tag. If the set of a feature tag T has the value V in it, it is said that `the tag T is present with the value V'.

This specification does not define a standard notation for feature sets. An example of a very small feature set, in a mathematical notation, is

      { ( "frames" , { } ) ,
        ( "paper"  , { "A4" , "A5" } )
      }

As feature registration is expected to be an ongoing process, it is generally not possible for a user agent to know the meaning of all feature tags it can possibly encounter in a variant description. A user agent SHOULD treat all features tags unknown to it as absent from its feature set.

A user agent may change the contents of its feature set depending on the type of request, and may also update it to reflect changing conditions, for example a change in the window size. Therefore, when considering feature negotiation, one usually talks about `the feature set of the current request'.