Hello All,
I have been trying to implement the value-title pattern over at
GetSemantic [1] (The next version of Transformr) and stumbled across a
problem.
Simply adding a space eg: <span class='value-title'> </span> still
results in HTML-Tidy discarding the value as suggested here:
http://microformats.org/wiki/value-class-pattern#Parsing_machine-data_value-title,
because Tidy (by default) drops all empty elements, with no character data.
here is a live example of what happens,
source: http://microformats.org/2009/10/06/recently-2009-09
markup: <a title="Permanent Link to Recently in microformats: 2009-09"
rel="bookmark"
href="http://microformats.org/2009/10/06/recently-2009-09" class="updated">
<span title="2009-10-06T16:19:10" class="value-title"> </span>
Tuesday, October 6th, 2009 at 4:19 pm</a>
after tidying :
http://cgi.w3.org/cgi-bin/tidy?docAddr=http://microformats.org/2009/10/06/recently-2009-09
<a title="Permanent Link to Recently in microformats: 2009-09"
rel="bookmark"
href="http://microformats.org/2009/10/06/recently-2009-09"
class="updated">Tuesday, October 6th, 2009 at 4:19 pm</a>
The only way I have found to stop this from occurring is either don't
use tidy, which in some cases makes the source document impossible to
parse if the html is invalid, or add a instead of a space eg:
<span class='value-title'> </span>
which seems a little unintuitive to me. ....hmm?
Thanks
--
Martin McEvoy
http://weborganics.co.uk/
"You may find it hard to swallow the notion that anything as large and apparently
inanimate as the Earth is alive."
Dr. James Lovelock, The Ages of Gaia
_______________________________________________
microformats-discuss mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-discuss