#microformats 2014-05-20

2014-05-20 UTC
brianloveswords, caseorganic and dwayhs joined the channel
#
kylewm
so that's an interesting question <div class="h-entry">This is a post that links to <a href="yahoo.com">Yahoo!</a></div>, will imply that the u-url is yahoo.com ... cc: KartikPrabhu
#
kylewm
(asking this because snarfed in #indiewebcamp asked about distinguishing between implied and explicit u-urls)
#
kylewm
is there any way to tell the difference between an implied and explicit url?
#
kylewm
or perhaps improve the implication algorithm so it doesn't get false positives like that
#
KartikPrabhu
kylewm: it will do that if that is the only url in the h-entry. Yes, but that is how microformats work
#
kylewm
ok yeah, maybe we can get a concrete example later
#
KartikPrabhu
ok. here is an example by snarfed of a simple repost <article class="h-entry"><a class="u-repost-of" href="http://foo.com/"></a></article> . The trouble is that mf2 implicit parsing rules will also give the u-url of the h-entry as "http://foo.com/" which would be wrong. any suggestions?
#
aaronpk
my first instinct is that if an "a" tag has an mf2 class, that it shouldn't be subject to the implied parsing rules as well
#
aaronpk
but also the example kylewm brought up before of <div class="h-entry">This is a post that links to <a href="yahoo.com">Yahoo!</a></div> seems that the implied URL is wrong as well
#
KartikPrabhu
aaronpk: at the moment that is only done for .h-* but including any other mf2 property might be reasonable
#
KartikPrabhu
aaronpk: yes. that one is a lot trickier
#
KartikPrabhu
also this: <article class="h-entry"><a class="u-uid" href="http://foo.com/"></a></article> will mess it up!
#
aaronpk
I'm no authority in the matter, I havent written a parser. so barnaby and tantek should weigh in.
#
KartikPrabhu
aaa... lot of little caveats. will wait for barnabywalters and tantek
#
aaronpk
some bot is logging this channel, good
kylewm, tantek, eschnou, encolpe, KevinMarks2, pfefferle, Garbee, krendil, eschenal, nkenealy, ChiefRA, iSRAWORK, barnabywalters, adactio and KartikPrabhu joined the channel
#
@CeoPress
Микроформат hReview: добавление на сайт микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468709506172461056)
#
@chaika8
RT @CeoPress: Микроформат hReview: добавление на сайт микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468710041651277824)
pfefferle joined the channel
#
@Great_Worldru
Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468722241493274624)
#
@tayamohitova
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468724345934987264)
#
@kiqyreguxy
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468725612971307008)
#
@AndreiMertens
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468725714603495424)
#
@Pupsi4eg
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468727475200327680)
#
@kamaev62
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468728161350729728)
#
@ChaikaSamara
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468729454773428224)
#
@umnitsa__julia
RT @Great_Worldru: Использование микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468730704864747520)
dwayhs, brianloveswords, KevinMarks2, dwayhs_, elux, netweb, tantek, KartikPrabhu and KevinMarks joined the channel
#
@amentsoc
@insectweek We already publish the data in vcal, ical, xcal, hCalendar and CSV format. Can you pull in any of those directly?
(twitter.com/_/status/468788156410892288)
dwayhs_, eschenal and caseorganic joined the channel
#
aaronpk
tantek: did you see the questions here from yesterday?
#
aaronpk
also barnabywalters
#
barnabywalters
nope, I did not
#
aaronpk
i like loqi's logs better, maybe I should make a page for the microformats channel too
dwayhs_ joined the channel
#
barnabywalters
aaronpk: please do! loqi’s logs are excellently marked up
#
barnabywalters
kylewm: KartikPrabhu: in reply to your earlier question about differentiating implied from explicit properties, I agree that it might be beneficial to make the implied rules stricter to avoid this situation, but it is a little contrived
#
barnabywalters
h-entries, broadly speaking, should have explicit url properties
#
aaronpk
this arose from snarfed trying to parse something, so it's not entirely contrived. may need to dig up the actual example tho.
#
KartikPrabhu
yes I have asked snarfed for actual example
#
barnabywalters
but yeah, if they don’t, then ensuring that <a> which *are* explicitly marked up as properties *other* than url are *not* used as implied URLs is probably a good thing
#
barnabywalters
indeed, demonstrate a real-world case where this is an issue so we can assess what needs to be done better
#
kylewm
barnabywalters: I like that idea, and I suspect it covers snarfed's use case, but real-world-use-case++ :)
#
KartikPrabhu
barnabywalters: what is the url is marked with u-uid? then the correct thing would be to pick it up as u-url too
dwayhs_ joined the channel
#
Loqi
KartikPrabhu meant to say: barnabywalters: what if the url if marked with u-uid? then the correct thing would be to pick it up as u-url too
#
barnabywalters
KartikPrabhu: no, in that case it’s the authors responsibility to mark it up as u-url.
#
barnabywalters
if they’re going to be explicit, they need to be explicit about everything
#
barnabywalters
otherwise the parser can’t be generalised and has to know things about properties and how they relate
#
KartikPrabhu
yup, in that case we should just have it as author's responsibility to markup u-url too if they are marking up h-entry
#
barnabywalters
i.e. that u-url is often equivalent to u-uid
#
KartikPrabhu
maybe the guidline should be that h-entries must always have a u-url or something?
#
barnabywalters
unless there is some compelling case for implied h-entries
#
barnabywalters
which, seeing as there’s no implied rule for dt-published, probably isn’t going to exist
#
tantek
aaronpk, yes, Loqi's logs are MUCH better
#
Loqi
woot!
#
tantek
gives Loqi a treat.
#
Loqi
loves the treat.
#
tantek
agrees with barnabywalters analysis above.
#
KartikPrabhu
tantek: so leave the parsing rules alone? or add the rule that <a> not having other mf-class in the implied u-parsing?
KevinMarks2 joined the channel
#
tantek
KartikPrabhu: I'd rather leave the parsing rules alone until there's a real world example in the wild that demonstrates an actual problem.
#
KartikPrabhu
tantek: agreed!
#
tantek
You can *always* construct theoretical examples that look / act badly. Thus theoretical examples are (nearly) meaningless.
#
tantek
So if there is a real world example that demonstrates an issue, add it in a new section on /microformats2-parsing-issues
barnabywalters, KevinMarks, KevinMarks2, caseorganic, eschenal and brianloveswords joined the channel
#
@SEOWebmaestro
RT @CeoPress: Микроформат hReview: добавление на сайт микроразметки для отзывов и обзоров http://great-world.ru/mikrorazmetka-dlya-otzyvov-mikroformat-hreview/
(twitter.com/_/status/468827553114099712)
KevinMarks, tantek, pfefferle, caseorganic, brianloveswords, eschenal, KevinMarks_, dwayhs__ and krendil joined the channel
#
tantek
edited /h-adr (+8) "/* Properties */ country-name is full name"
(view diff)
#
tantek
edited /h-adr (+435) "how to markup country codes"
(view diff)
#
tantek
per question from jonnybarnes, I've edited h-adr country-name to make it clear it's a full name, and added an FAQ about country-codes
#
KartikPrabhu
tantek: Why restrict this to full name? Why let the people parsing it handle it?
#
tantek
adopted from the vcard spec definition for the field of the same name
#
tantek
in short: interop
#
tantek
one of rare forms of anti-bikeshedding ;)
#
KartikPrabhu
i was thinking along the line of dt-* props, where they don't enforce a datetime precision
#
tantek
but in that case it's actually *different* information, rather than different format for the same information
#
KartikPrabhu
are dt-* restricted to ISO-blah blah format?
#
KartikPrabhu
or actually dt-* can be in YYYY-MM-DD or in YYYY-DDD formats both denoting the same data
#
tantek
well let's see what the parsing spec says
#
KartikPrabhu
http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing this at least allows all those diff. representations of the same data
#
tantek
true!
#
tantek
because they have unambiguous parsing rules themselves
#
tantek
but do country codes? when you don't know that they're country codes but just a string?
#
KartikPrabhu
in some sense yes. if the string is 2-letters capitalized then it is a country code I think. Also ref: http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
#
tantek
neat!
#
tantek
looks like there are no full country names <4 chars
#
KartikPrabhu
but again, mf2 parsing should not be concerned with the "correctness" of the data. If someone says their country is named XY so be it!
#
tantek
Ok I'm going to loosen it to a should, and note that consuming applications may expand 2-3 letter country-names per http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
#
tantek
KartikPrabhu: that seems to be what you're asking for
#
KartikPrabhu
that sounds more reasonable! :)
#
tantek
do you have a page where you have "UK" as a visible country name?
#
tantek
like a real world example? (on your site or someone else's?)
#
KartikPrabhu
hmm good question! you and your use-cases! <hunting>
#
tantek
well how did you come up with the question about "UK" in the first place? oh sorry it was jonnybarnes
#
tantek
(before I make this change I want at least *one* real world example to cite)
KevinMarks joined the channel
#
tantek
edited /h-adr (+305) "change implied must to a should for full country name, make country codes ok, describe how consuming applications may interepret country codes"
(view diff)
#
tantek
KartikPrabhu: done
Rastus_Vernon and jonnybarnes joined the channel
#
KartikPrabhu
tantek: like the abbr suggestion. pretty nifty!
#
jonnybarnes
ok, slight problem, as a Brit, I know no-one that would say they are from My City, GB
#
jonnybarnes
but thats what the ISO spec says the United Kingdom is
#
jonnybarnes
everyone says My City, UK
#
jonnybarnes
saying that, the ISO 3166 code UK is "exceptionally reserved"
#
KartikPrabhu
jonnybarnes: the full list is here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 UK seems to be reserved for the UK anyway
#
jonnybarnes
KartikPrabhu: yup, even the EU uses UK for us brits
#
tantek
jonnybarnes hence you want the abbr example here: microformats.org/wiki/h-adr#What_about_country_codes
#
KartikPrabhu
I think all this should be left to the microformats consumer to interpret correctly
caseorga_ joined the channel
#
jonnybarnes
KartikPrabhu: I assume any sane software that did a reverse lookup of country codes would map UK to United Kingdom
#
KartikPrabhu
I don't know anyone who does this. I personally would just display it as "UK" or "United Kingdom" whichever way the original author intended it
#
KartikPrabhu
for instance as a comment on my posts I don't mind "Jonny Barnes from UK said..." or "Jonny Barnes from the United Kingdom said..." either is fine with me. It is the commenters choice from where they want to be.
#
jonnybarnes
good point
dwayhs__, KevinMarks_ and dwayhs___ joined the channel