[1] [[HTTP]] や[[電子メイル]]などの[[内容折衝]]の機能では、複数の選択肢があるが、優先度が異なるという時に、この qvalue を使ってそれを表すことが出来ます。 qvalue と言っても何も特殊なものではなく、単なる [CODE(conneg)[0]] から [CODE(conneg)[1]] の間の小数値のことです。 [[#comment]] * 仕様書から ** RFC 2068・2616 (HTTP/1.1) 3.9 Quality Values > HTTP content negotiation (section 12) uses short "floating point" numbers to indicate the relative importance ("weight") of various negotiable parameters. A weight is normalized to a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value. [INS[If a parameter has a quality value of 0, then content with this parameter is `not acceptable' for the client.]] HTTP/1.1 applications MUST NOT generate more than three digits after the decimal point. User configuration of these values SHOULD also be limited in this fashion. [2] [[HTTP]] 内容折衝は、 各折衝可能引数の相対重要度 (「重み」) を示すために短い「[[浮動小数点]]」 数値を使います。重みは [CODE(conneg)[0]] から [CODE(conneg)[1]] の範囲の[[実数]]に[[正規化]]します。 [CODE(conneg)[0]] が最小値で、 [CODE(conneg)[1]] が最大値です。 [INS[引数の質値が [CODE(conneg)[0]] の場合、その引数が添えられた内容を[[クライアント]]は「受入れ不能」です。]] HTTP/1.1 応用は、小数点以下に3桁より多くの数字を生成しては'''なりません'''。 この値の利用者設定もこの様式に制限する'''べきです'''。 > - [3] [CODE(ABNF)[qvalue = ( "0" [ "." 0*3DIGIT ] ) | ( "1" [ "." 0*3("0") ] )]] > "Quality values" is a misnomer, since these values merely represent relative degradation in desired quality. [4] 「質値」という名前は誤りです。この値は単に望まれる質の相対的な格を表現するに過ぎないからです。 ** RFC の部分の License [[RFCのライセンス]] * メモ - [1] [[Java]] では [CODE(HTTP)[*/*; q=.2]] みたいな値を使うらしいですが、これは誤りです。 [5] >>1 のような値を紹介している解説もしばしば見かけます。。。 ([[名無しさん]] [WEAK[2006-12-25 10:44:40 +00:00]]) [6] tvhip brjigv ahjrgny swbnhmif bhewgco uodbetjfa ufkecohn ([[ucywvjae egskuv]] [szqkhnwj@gmail.com])