[uf-discuss] Value excerpting - thoughts and random observations
Brian Suda
brian.suda at gmail.com
Wed Apr 16 03:48:24 PDT 2008
2008/4/16, Toby A Inkster <mail at tobyinkster.co.uk>:
> Consider <abbr> versus "value":
>
> <span class="fn"><abbr title="Toby A. Inkster"><span
> class="value">Foo</span></abbr></span>
>
> 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.
--- child elements of microformatted data are not "looked into", so
because the FN value is on a span, it looks at the node value. In this
case, there is also a VALUE, but in this case they are the same value
"Foo".
So in that example FN==Foo, the abbr does not play any role in the
parsing because it does not have any explicit microformats classes.
> 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 would be a correct use of both abbr and value (it is not a
versus in this instance). The parse would normally find the class
DTSTART and find that it is on a span, so it should take the
node-value. This node value happens to have a child with a class of
VALUE. That parser then looks to that node to see if there are any
additional semantics. In this case, it is an ABBR so the @title is
extracted.
While this is valid for parsers, TIDY and other tools strip out empty elements.
> Another thought: what to do about this?
>
> <span class="fn">
> Foo
> <span class="value">
> Bar
> <span class="value">
> Toby A Inkster
> </span>
> </span>
> </span>
>
> 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.
--- to my knowledge, this is currently undefined. My interpretation would be
FN: Bar Toby A InksterToby A Inkster
It would find the first VALUE "Bar Toby A Inkster" and concatenate it
with the second "Toby A Inkster" (without spaces inbetween)
Anyone wishing to continue the discussion of parsing rules, this
should be done on the dev-list.
-brian
--
brian suda
http://suda.co.uk
More information about the microformats-discuss
mailing list