[uf-dev] Case-sensitivity
Ryan King
ryan at technorati.com
Wed Jan 18 12:45:44 PST 2006
On Jan 18, 2006, at 12:37 PM, Dan Connolly wrote:
> On Jan 18, 2006, at 2:02 PM, Tantek Çelik wrote:
>> ...
>>
>> I thought I had specified this in hcard-parsing, but perhaps not.
>>
>> The class names are case-sensitive per HTML4.01 (see "A Touch of
>> Class" for
>> more on that).
>>
>> The enumerated *values* are case-INsensitive, and thus yes,
>> applications
>> should accept home, Home, HOME, HoMe, etc as 'home'.
>
> Wow... that seems like 180 degrees from the answer I got earlier...
> * 2005-07-23 raised by DanConnolly
> 1. Are class names case sensitive or not? hcard says "If
> names in the source schema are case-insensitive, then use an all
> lowercase equivalent."
> o A: ACCEPTED FAQ. Class names are case sensitive
> per the HTML4 specification. Hence hCard explicitly specifies the
> case of class name to use for source schema names that are case-
> insensitive.
> 2. ...but I find example data with class="Given-Name"
> o A: ACCEPTED RESOLVED. That is from an older
> preliminary version of the hCard spec which used mixed case class
> names. Such class names are no longer valid hCard. Please note
> which examples (URLs) are using the older class names and hopefully
> we can get them fixed.
> + A: By Brian Suda (http://suda.co.uk) I have
> fixed all the references in the hcard-brainstorming page to reflect
> the lower-case style, this is a hold-over from the original design,
> X2V has been updated.
> 3. ..and code that supports it [data with class="Given-
> Name"].
> o A: ACCEPTED RESOLVED. Any code supporting the
> older class name(s) is for backward compatibility only, and should
> be phased out. Any new hCard code SHOULD NOT support such mixed
> case class names
>
> -- http://www.microformats.org/wiki/hcard-issues
I think the idea is to make a distinction between properties and
enumerated values. So, for example 'given-name' is lower-cased, while
stuff like ADR and TEL types are case insensitive.
FWIW, I don't think we can get away with requiring enumerated values
to be lowercased. I, for one, would feel dirty having to do this:
> <abbr class="type" title="home">Home</abbr>
And I don't think I'd be the only one.
-ryan
--
Ryan King
ryan at technorati.com
More information about the microformats-dev
mailing list