Content Identification

Introduction

This seciton is informative

Background

Use cases and Examples

Scenario 1

UA Supports: XHTML+SVG+XForms

Content is: XHTML+SVG

  1. UA Request content "index.xhtml" with *Accept: application/xhtml+xml;profile='http://www.w3.org/2007/cdf/cdi-forms', image/svg+xml"
  2. Content provider identifies the resource on its system and applies server configuration rules which are:
    *any file that is *.xhtml is considered 'application/xhtml+xml;profile='http://www.w3.org/2007/cdf/cdi-forms'"
  3. Content provider returns file content and "Content-Type: application/xhtml+xml;profile='http://www.w3.org/2007/cdf/cdi-forms'"
  4. UA renders content

Scenario 2

UA Supports: XHTML+SVG

Content is: XHTML+SVG+XForms

  1. UA Request content "index.xhtml" with *Accept: application/xhtml+xml;profile='http://www.w3.org/2007/cdf/cdi-svg', image/svg+xml"
  2. Content provider identifies the resource on its system and applies server configuration rules which are:
    *any file that is *.xhtml is considered 'application/xhtml+xml;profile='http://www.w3.org/2007/cdf/cdi-forms"
  3. Content provider recognizes that UA doesn't support this mime-type and follows this decision tree:
    1. Can I adapt this content to a form suitable for the target device? no
    2. Should server respond with HTTP-415 (Unsupported Media Type)? no
    3. Should I serve the content with the mime-type that I know or use target devices' supported mime-types? use target device supported mime-types
      * Note: the content provider is assuming that perhaps that the target device follows appropriate "unknown content" processing rules that are suitable for it since it does see that it supports a CDF profile
    4. UA receives content, renders XHTML and SVG...applies "unknown content" processing rules

Authoring Tools

CDI Profiles SHOULD define a filename suffix for identification by authoring tools and content providers.

CDI compliant content MUST provide metadata for framework or profile identification.

To indentify which profile is supported, they MUST be defined in the CDF XML processing instruction [XML] such as:

<?CDF profile="profile-uri"?>
By providing the profile information within a XML processing instruction this enables authoring tools to apply appropriate authoring semantics such as content assisting and validating authoring tools. This gives content providers a way to quickly inspect content for capabilities without having to rely on namespace and attribute parsing to determine the content's profile.

In the case of existing mechanisms such as DOCTYPE on HTML, the CDF XML processing instruction MUST take precendence.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?CDF profile="http://www.w3.org/2006/CDF/WICD"?>

In the case of usage of xsi:schemaLocation with CDF PI, xsi:schemaLocation take precendence for schema resolution for validation

User Agents

CDI Profiles MUST define a MIME Type [MIME] which should be used to identify it using HTTP 1.1 Content-Type header.

CDI compliant user agents MUST supply in the HTTP Accept header the list of supported internet media types

User agents that are conformant to the CDI Framework MUST provide the application/cdf+xml internet media type in the HTTP Accept header.

This internet media type will have a prof parameter to allow for the definition of CDF profiles. The value of the prof parameter will be the URI that a CDF profile defines. For W3C defined profiles, the value should be of the form http://www.w3.org/<year<[/<month>][/<group>]/<profile name>. This will provide enable detail for identification and versioning of profiles. This URI value should not be changed for minor version updates that are compatible. Only when major revision changes occur that introduce incompatibilities should the profile URI be changed.

As CDF Profiles are deployed, the size of the HTTP Accept headers for user agents will potentially cause problems with HTTP header limits and low-bandwidth networks. An alternative solution is needed to provide identification using an indexing system. This system will depend on the existance of the application/cdf+xml internet media type along with alternate parameter values for prof. Samples of complimentary Accept headers are:

Accept: application/cdf+xml;prof="http://www.w3.org/2006/CDF/WICD http://www.w3.org/2007/CDF/WICD2"
Accept: application/cdf+xml;prof="1 2"

This will require a public registry for profiles. Is this worth it?

Content

Profiles

Content Providers and Transformers

Extensions

See also infamous Appendix G Media Type Options