I've been noodling with value excerpting recently, as Cognition's support for it has been limited until recently -- it was only supported for .vcard .tel, .vcard .email and .vcard .impp, but I realised that I really needed it for .vfreebusy .freebusy and so decided to generalise it to pretty much all properties.

Here are some interesting observations:

        <span class="fn n">
                <span class="given-name">Toby</span>
                <span class="additional-name"><span 
class="value">A</span>.</span>
                <span class="family-name">Inkster</span>
        </span>

Value excerpting here is used so that the dot displayed after the middle initial isn't taken to be part of the additional-name, yet it displayed as part of the formatted name. Unintentional consequence: FN is parsed as simply "A". I've not tested other parsers, but I assume that the results are similar. Of course, a better way of marking it up would have been:

        <span class="fn n">
                <span class="given-name">Toby</span>
                <span class="additional-name">A</span>.
                <span class="family-name">Inkster</span>
        </span>

Not using value excerpting at all.

Consider <abbr> versus "value":

<span class="fn"><abbr title="Toby A. Inkster"><span class="value">Foo</span></abbr></span>

FIGHT!

Under my interpretation, FN is "Toby A. Inkster". The span with class "value" is ignored, as it is the child of an <abbr> with a non-empty title attribute.

Yet <abbr> versus "value" can be used for good as well as evil. Consider this:

        <span class="dtstart">
                1 October 2008
                <abbr class="value hyper" title="20081001"></abbr>
        </span>

With the CSS abbr.hyper{display:none;}.

This uses existing microformats patterns (value excerpting, abbr pattern) to create a more accessible alternative to the abbr/datetime pattern. Because it uses existing patterns, it should work in existing tools. *Should*, not necessarily *does*! Works in my current unreleased version of Cognition. (Which I'll be releasing as soon as the RDFa group get around to updating their syntax document with their recently decided changes.)

Another thought: what to do about this?

        <span class="fn">
                Foo
                <span class="value">
                        Bar
                        <span class="value">
                                Toby A Inkster
                        </span>
                </span>
        </span>

Should the FN be:

        "Bar Toby A Inkster"
                Ignoring the inner class="value".

        "Bar Toby A Inkster Toby A Inkster"
Parsing both values and concatenating them, as if they were not nested. Cognition currently does this.

        "Toby A Inkster"
                The outer "value" itself is subjected to value excerpting.

Or do we simply say that the parsing of such a construct is undefined, so authors must not use it? And then let parsers handle it however they like, reasonably confident that they will never run into such a construct.

--
Toby A Inkster
<mailto:[EMAIL PROTECTED]>
<http://tobyinkster.co.uk>



_______________________________________________
microformats-discuss mailing list
microformats-discuss@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to