Note: A protocol-independent system for feature tag registration
is currently being developed in the IETF. This specification does
not define any feature tags. In experimental situations, the use
of tags which start with "x." is encouraged.
Feature tags are used in feature sets (section 6.2) and in feature
predicates (section 6.3). Feature predicates are in turn used in
features attributes (section 6.4), which are used in variant
descriptions (section 5). Variant descriptions can be transmitted in
Alternates headers (section 8.3).
The US-ASCII charset is used for feature tags. Feature tag
comparison is case-insensitive. A token tag XYZ is equal to a
quoted-string tag "XYZ". Examples are
tables, fonts, blebber, wolx, screenwidth, colordepth
RFC 2295 Transparent Content Negotiation March 1998
An example of the use of feature tags in a variant description is:
{"index.html" 1.0 {type text/html} {features tables frames}}
This specification follows general computing practice in that it
places no restrictions on what may be called a feature. At the
protocol level, this specification does not distinguish between
different uses of feature tags: a tag will be processed in the same
way, no matter whether it identifies a property, capability, or
preference. For some tags, it may be fluid whether the tag
represents a property, preference, or capability. For example, in
content negotiation on web pages, a "textonly" tag would identify a
capability of a text-only user agent, but the user of a graphical
user agent may use this tag to specify that text-only content is
preferred over graphical content.
6.1.1 Feature tag values
The definition of a feature tag may state that a feature tag can have
zero, one, or more values associated with it. These values
specialize the meaning of the tag. For example, a feature tag
`paper' could be associated with the values `A4' and `A5'.
tag-value = token | quoted-string
The US-ASCII charset is used for feature tag values. Equality
comparison for tag values MUST be done with a case-sensitive, octet-
by-octet comparison, where any ""%" HEX HEX" encodings MUST be
processed as in [1]. A token value XYZ is equal to a quoted-string
value "XYZ".
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.
Structurally, a feature set is a possibly empty set, containing
records of the form
( feature tag , set of feature tag values )
RFC 2295 Transparent Content Negotiation March 1998
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" } )
}
=12= |