#microformats 2017-07-30

2017-07-30 UTC
rodolfojcj, deep-book-gk_, tantek, KartikPrabhu and [miklb] joined the channel
#
sknebel
Zegnat: todays question number 1: are microformat1 objects allowed as children of mf2 objects? are they allowed as properties of mf2 objects?
#
Zegnat
Hang on. I remember reading something about that in the spec.
#
Zegnat
To the spec mobile!
#
sknebel
there is "if that child element itself has a microformat ("h-*" or backcompat roots)" in the main algorithm
#
sknebel
which sounds like a "yes"
#
Zegnat
Yes, I was about to quote that exact sentence
#
Zegnat
I would thus say yes
#
Zegnat
The real question is, do backcompat roots define a “value”?
#
sknebel
so it seems the page that confused Kaja is actually broken and mf2py working correctly, with everyone else being wrong
#
Zegnat
Oh, never mind, for backcompat it should just default to “else use the parsed property value per p-*,u-*,dt-* parsing respectively” for the `value`-value
#
Zegnat
HTML snippet?
#
sknebel
note the <span class="adr">, which is here ignored, but if mf1 childs are allowed should open a new child object
#
sknebel
(the python site doesn't allow saving, that's why link to php version)
#
Zegnat
I’ll do my own comparison with the python one, hang on
#
Zegnat
Yes. I agree with the Python parser.
#
sknebel
(the go parser doesn't do backcompat, the node one converts the adr to "p-adr h-adr", ruby seems to do the same as the python one)
#
Loqi
h-adr
#
Zegnat
I have no idea where the node one would get the p-adr from though
#
sknebel
oh, the python one also makes a mistake
#
sknebel
"country" is not a property for adr
#
Zegnat
good catch
#
sknebel
the ruby one gets that right
#
Zegnat
yeah, it should only be parsing the classes listed on the Parser_Compatibility link
#
sknebel
which link?
#
Loqi
h-adr
#
Zegnat
But I guess you had that one to
#
Zegnat
s/to/too
#
sknebel
I had been looking at the normal properties list
#
sknebel
hm, here gRegorLove is claiming it should be ignored: https://github.com/tommorris/mf2py/issues/75
#
Loqi
[aaronpk] #75 Backcompat conflict
[kevinmarks] joined the channel
#
Zegnat
I am not a 100% clear on what they are discussing there…
#
Zegnat
I think gRegorLove is saying the parser should ignore the `reviewer` property because it is parsing an `h-review` and thus backcompat *properties* must be ignored
#
sknebel
but the child that aaronpk complains about is correct if our reading of the spec is correct
#
sknebel
except if the " else add found elements that are microformats to the "children" array " language does not imply to switch between mf1 and mf2
#
sknebel
and it's only supposed to apply for properties? but that's weird as well
[acegiak_net] joined the channel
#
sknebel
... and the test suite has an example with the same weirdness that the JS parser does: https://github.com/microformats/tests/tree/master/tests/microformats-mixed/h-card -> mixedpropertries (sic!)
#
Zegnat
I am not sure that testcase is at all correct
#
sknebel
yes, that seems like a very weird construct that I don't get where it is from
#
Zegnat
I think the Python output is correct for aaronpk’s h-review because: 1) `reviewer` does not exist as property for h-review and is correctly skipped, and 2) a backcompat vcard is found and correctly added as a child object to the h-review object.
#
sknebel
would be my interpretation as well
sketchess joined the channel
#
Zegnat
That mixedpropertries is plain wrong as there is no mf2 property defined on the p.adr block at all, I don’t see why that should ever be added to the h-card.
#
sknebel
it might explain where the JS parser got that idea from
#
Zegnat
Or, well, “plain wrong” might be strongly worded since the spec can be a little tricky. “Wrong in my opinion”.
#
Zegnat
is always happy when sknebel and him end up with the same interpretations
#
sketchess
If you can spare a second, you might can point me into the right direction. Does something like a microformats list or a overview exist? I would be happy to get a decent link. Till yet I just found split lists with a little amount of them on each.
#
sknebel
sketchess: http://microformats.org/wiki/microformats2#v2_vocabularies has a list of common ones and their attributes (assuming I understand correctly what you are asking for)
#
Loqi
microformats2
#
sketchess
looks
#
sketchess
ah..... the big brother.... I was at that wiki before, but decided not to look into microformats 2.
#
sketchess
Pity that they are not explained further. :)
#
sketchess
lunch time
#
Zegnat
I am not sure what more you want to be explained sketchess. It is a data format that specifies objects (h-*) and object properties (p-*, u-*, dt-*, e-*), and specifies how these are parsed from HTML files.
#
sknebel
Zegnat: http://microformats.org/wiki/h-card#Parser_Compatibility has " adr - parse as p-adr h-adr including compat root class adr " -> another puzzle piece, although it still doesn'T make sense on an h-card ;)
#
Loqi
h-card
#
sketchess
re
#
sketchess
Ok, I will phrase like this. An explanation that even a child can understand what each word really means and what it does when used. The results. :)
#
sketchess
I bookmarked some pages they do an attempt.
#
Zegnat
sknebel, wow, I didn’t recheck the specific h-card page. My mistake... I guess. That should really be mentioned on the main parsing page IMHO!
#
Zegnat
also “parse as p-adr h-adr” feels very hacky. Shouldn’t that be “parse as p-adr adr”? Or do they specifically want to include both mf2 and mf1 properties in this very specific case?!
#
sknebel
well, you have to check the pages for the list of backcompat properties anyways, so I'm not sure it needs extra calling out
#
sknebel
and the examples applying it on an h-card (not hCard) still are wrong
#
sknebel
and I think the wording "including compat root class adr" kind of makes sense - you produce an h-card, but it's created by backcompat parsing
#
sknebel
not sure what'd be a clearer way of phrasing it
#
Zegnat
I would’ve preferred something simpler. “If a backcompat root class adr is a direct child of the h-card set it as a p-adr value.”
#
Zegnat
Normally because explicit property is missing it would go under children, but for adr you have the special case to not put it in children but put it as p-adr.
#
Zegnat
That’s how I understand that, at least?
[miklb] joined the channel
#
sknebel
mf1 doesn't have the concept of nested mfs having specific types, right?
#
sknebel
so it is part of the "rules" that an "adr" attribute also has a type of adr
#
sknebel
mf1 class="adr" is the same as mf2 class="p-adr" in this case, except that mf2 requires the specific type to be named, so it is "p-adr h-adr" instead.
#
sknebel
or am I getting my mf1 wrong?
Calli joined the channel
#
Zegnat
Haven’t done mf1 in a long time so I am unsure. But also isn’t important, because mf1 objects still need to be parsed according to the mf2 parsing spec. That’s why mf2 parsing spec has the backcompat build in.
#
Zegnat
sketchess see the conversation here between sknebel and me as example of microformats-spec-stuff ;) This is why for general usage patterns it is easier to check indieweb.org
#
sketchess
Oh I checked Zegnat. Thihihi.
#
sknebel
if it is a property, the parsers are more of one opinion
#
sknebel
so the interesting thing really is the child case
#
Loqi
[sknebel] #11 backcompat child of mf2 root
[jemostrom] joined the channel
#
Zegnat
sknebel, on 1C, did you not find a line on the wiki that defined that `p-adr h-adr` parsing?
#
sknebel
Zegnat: updated
#
Zegnat
Thank you
#
Zegnat
yes, that seems to cover everything. And honestly I don’t have much to add other than which output I prefer
#
Zegnat
goes to add that to the issue
#
Zegnat
Added my view, as well as a note on how the whole 1C thing might be cleared up.
#
sknebel
mh. what'S happening in 1C really only should be done on backcompat roots (and it is specified like that)
#
sknebel
also, adr isn't the only case of that
#
Zegnat
Still, I understand how if might make some things easier, and I don’t mind that, as long as we have a very clear definition for it.
#
Zegnat
s/it/it/
#
Zegnat
s/if/it/
#
Zegnat
lifts fingers froms keys for a second
davidmead, [jemostrom], barpthewire, KartikPrabhu, tantek, rodolfojcj, [miklb], deep-book-gk_ and TheGillies joined the channel
#
TheGillies
Is there any microformat for pgp key?
#
TheGillies
I saw http://microformats.org/wiki/key-examples but it looks like microformats1
#
Loqi
key examples
#
sknebel
TheGillies: h-card has a property to link to a key
#
sknebel
(just called key)
[kevinmarks], pniedzielski[m], AlanPearce[m], schmarty and TheGillies joined the channel