[uf-discuss] Best Practice for fn and n?

Brian Suda brian.suda at gmail.com
Sun Nov 5 06:55:22 PST 2006


On 11/5/06, Costello, Roger L. <costello at mitre.org> wrote:
> Thanks Brian.  I intuitively figured there was something wrong with
> using an empty abbr element.
>
> In fact, my first attempt was to do just as you suggest.  However, I
> realized that there is a problem with that.  Namely, when all the
> values are concatenated together we get this value for fn:
> Mr.JohnQ.PublicM.D.

--- In this case, they would not be concatenated together.
Concatenation only happens with class="value". The white-space between
the nodes is considered as well. In HTML one or more white-space
values (space, tab, return) is considered one space unless you
explicitily use the &nbsp;. So your FN value would actually be:

              Mr.
              John
              Q.
              Public,
              M.D.

With XSLT there is 'normalize-space' which converts that to the string
you would expect. "Mr. John Q. Public, M.D."

White-space is only preseved when you are using <pre> elements.

> One solution would be to add a space after each part:

--- in this case, it is not needed.

> Any suggestions on how to solve this problem?

--- i don't think it is a problem, unless you WANT to preserve the
white-space, then in that case, i would suggest using the <pre>
element.

-brian

-- 
brian suda
http://suda.co.uk


More information about the microformats-discuss mailing list