List Info

Thread: Best practice for the "value" subproperty




Best practice for the "value" subproperty
user name
2006-10-31 12:23:13
Hi Folks,

Does anyone have thoughts on the below issue I raised a
couple days
ago?  /Roger

-----Original Message-----
From: Costello, Roger L. 
Sent: Sunday, October 29, 2006 6:16 PM
To: microformats-discussmicroformats.org
Subject: Best practice for the "value" subproperty

Hi Folks,

Suppose that I want to markup this HTML text using the hCard
properties:

         John will be our speaker.  Mr. Public will talk
about ...

Notice that the name (John Public) is not consecutive, it is
scattered.
To extract the name from this text we use the
"value" subproperty:

Design #1

<span class="fn">
        <span class="value">John
</span>
        will be our speaker.  Mr. 
        <span
class="value">Public</span> 
</span> will talk about ...

The value of "fn" is the concatenation of the
"value" subproperties:

    fn = concat('John ', 'Public') = John Public

Notice the space after John.  This enables the fn value to
be
formatted.

An alternate design is to remove the space after John and
use a "spacer
value":

Design #2

<span class="fn">
        <span
class="value">John</span>
        <span class="value"> </span>
        will be our speaker.  Mr. 
        <span
class="value">Public</span> 
</span> will talk about ...

The value of "fn" is the concatenation of the
"value" subproperties:

    fn = concat('John', ' ', 'Public') = John Public

Notice that now there is a concatenation of three values,
the middle
being a "spacer value."

Which is best practice - design #1 or design #2?

/Roger

_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )