[uf-discuss] Value subproperty - only applies to non-structured properties, right?

Costello, Roger L. costello at mitre.org
Sun Oct 29 06:18:43 PST 2006


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.
Thus, this would not be the correct way to markup the HTML text:

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

Doing so would cause the "fn" property to contain irrelevant stuff.

Instead, we identify the relevant stuff using the (microformat-defined)
"value" subproperty:

<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

Now, suppose that I am using the "n" property.  It is a structured
property, and the above HTML text can be marked up without using the
"value" subproperty:

<span class="n">
        <span class="given-name">John</span>
        will be our speaker.  Mr. 
        <span class="family-name">Public</span>
</span>
will talk about ...

Question: am I correct in saying that the "value" subproperty is not
needed when "n" is used to markup a name that is scattered?

Let me refer to properties like "fn" as 'non-structured properties'
(their value is just a string), and properties like "n" as 'structured
properties' (their value is subelements).

Question: is it a general rule that the "value" subproperty only
applies to non-structured properties, such as fn, label, etc.?  The
"value" subproperty does not apply to structured properties, such as n,
adr, etc?

/Roger



More information about the microformats-discuss mailing list