2.2.4 Content Description List Format

Metadata about the content that is sent by the server to the client in the $M (Metadata) (section 2.2.3.6) packet is formatted by using a syntax called the Content Description List (CDL). Any number of information items can be stored in the CDL such as copyright information, playlist information, duration of the content, size of the content, or content description.

A CDL consists of at least one content description. Each content description specifies metadata in a particular language. The content description consists of a series of name-value pairs.

Although it is not a general requirement of content descriptions, when a content description is used in a CDL, the first name-value pair of each content description MUST have the name "language". The value MUST be either a language tag, as specified in [RFC2616] section 3.10, or a zero-length string. If the length of the language tag is nonzero, it identifies the language of the metadata in the content description. Otherwise, the language of the content description is unspecified.

The remaining name-value pairs in the content description can have arbitrary names. There can be any number of name-value pairs, and each name and value can be of an arbitrary length.

The following table defines the individual fields used to represent a single name-value pair in the content description.

 Term

 Description

<name length>

The length, in bytes, of the name specified in the name-value pair.

<name>

The name specified for the name-value pair, expressed using UTF-8 characters, as specified in [RFC3629].

<value type>

Numeric value indicating the value's type, as specified in 2.2.4.1.

<value length>

Length in bytes of the value.

<value>

A string representation of the actual data of the name-value pair, using UTF-8 characters.

The format for a name-value pair is as follows.

 <name length>,<name>,<value type>,<value length>,<value>

The following is an example of a name-value pair.

            
 9,copyright,31,30,)) 1999 Microsoft Corporation

This example represents a 9-character name-value pair (copyright) which is of type 31 (a wide character string).

The format is more formally defined using ABNF as follows.

            
 cd-length                    = 1*10DIGIT
 cd-string                    =  *VCHAR
            
 cd-namevalue                 = cd-length "," cd-string "," 
                                 1*3DIGIT "," 
                                 cd-length "," cd-string
            
 content-description          = cd-namevalue
                                 *( "," cd-namevalue ) CRLF
            
 language-content-description = "7,language,31," cd-length ","
                                 language-tag   ; [RFC2616] section 3.10
                                 *( "," content-description ) CRLF
            
 content-description-list     = 1*( language-content-description )