Re: for telecon: ISSUE-23 @profile order

On 05/26/2010 04:45 AM, Toby Inkster wrote:
> So my proposal is for RDFa Core 1.1 to state that profiles are handled
> from right to left.

I was curious to see what other attributes in HTML work like this:

ID
--

<p id="one">...</p>
...
<p id="one">...</p>

The first ID declared wins, the rest are ignored. (Firefox and Chrome)

STYLE
-----

<p style="font-size: 18px; font-size: 8px; ">XYZ...</p>

The last one declared wins (8px) (Firefox and Chrome)

CLASS
-----

<p class="blue red">XYZ...</p>

This one surprised me. red always wins, regardless of whether it comes
first or last. (Firefox and Chrome)

<p class="blue" class="red" >

The first one declared wins (blue) (Firefox and Chrome)

Javascript
----------

<p onclick="javascript:var a = 4; var a=5; alert(a);">...</p>

Last one declared wins (5) (Firefox and Chrome)

So, it seems like for attributes, the first one declared wins. For
attribute values, the last one declared wins.

Since we're talking about an attribute value, we'd be going against the
"last one declared wins" pattern that both CSS and Javascript uses. That
may be confusing to Web authors.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Bitmunk 3.2.2 - Good Relations and Ditching Apache+PHP
http://blog.digitalbazaar.com/2010/05/06/bitmunk-3-2-2/2/

Received on Thursday, 27 May 2010 03:23:43 UTC