W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > May 2010

Re: for telecon: ISSUE-23 @profile order

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Wed, 26 May 2010 23:23:13 -0400
Message-ID: <4BFDE5A1.2040609@digitalbazaar.com>
To: public-rdfa-wg@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:06 GMT