@caption vs <caption type="figure">

On Sat, 21 Nov 2009 09:18:10 -0600, Tab Atkins Jr. wrote:
> On Sat, Nov 21, 2009 at 8:11 AM, Shelley Powers  wrote:
>> On Fri, Nov 20, 2009 at 10:19 PM, Tab Atkins Jr. wrote:
>>> On Fri, Nov 20, 2009 at 8:51 PM, Ennals, Robert wrote:

> There's nothing stopping us from making attributes affect the
> semantics of an element.  In fact, we do so right now, with <time
> pubdate>.  That is also my preferred solution to the <figure> issue -
> I'd like to see a @caption attribute that can be added to any child of
> <figure>. 

If there is nothing stopping us, then why didn't you instead propose an 
attribute for the <caption> element that could permit it to be used 
also outside <table>? 

One could e.g. use @type to define what kind of <caption> it is. A 
<caption > without such an attribute would default to be a <table> 
caption. Whereas e.g. 

	<caption type=figure> 

would become the caption of the nearest <figure> parent.  Or, one could 
simply say that the presence of a @parent attribute makes the <caption> 
a caption of the parent element:

	 <figure><caption parent>txt</caption>content</figure>.

Just like Maciej's attribute based default namespaces suggestion, it 
would take some time to get it implemented in user agents. But it would 
be logical and solid as soon as it started to work.
-- 
leif halvard silli

Received on Saturday, 21 November 2009 21:18:57 UTC