Re: [XHTML 2] 17 Embedding Attributes - srcType (PR#7735)

Thanks for the comment.

> 17.1 srcType says
> "This attribute specifies the allowable content types of the resource 
> referenced by the relevant src URI."
> 
>  What does this actually mean:

This is actually defined in the section on the datatype for the attribute
(ContentTypes). We will make this clearer in the text.

It means that the value of the attribute is intersected with the user agent's
list of acceptable types, and sent in the Accept: header.

This is to allow you to specify which of a number of available representations
is actually required at the current location.

> Does it mean that only content-types listed in the srcType will ever be 
> returned in all cases from the server?

Consequently it does mean this.

> Does it mean that only the content-types listed should be rendered 
> regardless of what content-types the server actually returns. e.g. if you 
> say <p src="item" srcType="text/plain"> and an application/xhtml+xml 
> resource is returned, the src should be considered a failure and not 
> rendered.

No. In this case you will never get a xhtml+xml returned; you would get a 406 if
there were no such resource.

> Does it mean that the user agent should send an http request with an accept 
> field only listing those content-types listed.  If that is the case, what 
> should the user agent do if another content type is returned (ie the same 
> situation as the previous example?)

It does mean (almost) that, and a server returning another content type would be
in error (unless it was a part of a 406).

Best wishes,

Steven Pemberton

Received on Wednesday, 25 January 2006 14:07:34 UTC