#microformats 2018-01-07

2018-01-07 UTC
#
gRegorLove
Hmm, realizing some of the limitations of following the spec precisely when using xpath queries in php-mf2.
#
gRegorLove
Poorly worded: the limitations are with the xpath approach
#
Loqi
[sknebel] We just encountered this difference in handling between `mf2py` and `php-mf2` while trying to help debug Bridgy on a WordPress site with the following structure: ```html <body class="h-entry"> <div id="page" class="hfeed site wrap"> <h1 cla...
#
gRegorLove
The spec says "parse child elements (document order) by..." but php-mf2 is using xpath to pull out only the relevant elements, by mf2 prefix
#
gRegorLove
So currently mf2 finds the mf2 root, runs an xpath for mf2 properties...
#
gRegorLove
But to follow the spec precisely, and get the expected result, it should process the first child node, the <div class="hfeed"> and recurse
#
gRegorLove
I'll try bumping up 'check for child mf' in the process before property parsing and see how it goes.
[kevinmarks] joined the channel
#
gRegorLove
Just for parsing convenience, it does make me wonder if mf1 roots inside mf2 should be ignored, haha
#
Loqi
hahaha
tantek, sebsel, mblaney, KartikPrabhu, barpthewire and nitot joined the channel
#
Zegnat
Hmm, the spec pretty much assumes you are traversing the DOM rather than taking shortcuts, gRegorLove ;)
chegalabonga joined the channel
#
Loqi
[tommorris] Thanks for reporting this @Zegnat. I currently don't have a lot of time to work on mf2py, so I can't promise to implement it soon, but I'll try and find time to implement this change at some point.
[kevinmarks], KartikPrabhu and davidmead joined the channel
[miklb], devsl, tantek, KartikPrabhu, [kevinmarks] and gRegorLove joined the channel
[kevinmarks] joined the channel
tantek joined the channel