-
Notifications
You must be signed in to change notification settings - Fork 6
Description
If there is a nested mf2 property + mf2 root inside an mf1 root, should parsers:
- Parse only the child mf2 root, in
children
- Ignore both
- Parse the mf2 property as if it were inside an mf2 root
Example markup derived from @chrisaldrich's post, which temporarily lost the h-entry
leaving hentry
with mf2 u-invitee h-card
properties:
<article class="hentry">
<a href="https://example.com" class="u-invitee h-card">John Doe</a>
<a href="https://gregorlove.com" class="u-invitee">gRegor</a>
</article>
The second link there, sans h-card, is to contrast that mf2 properties on their own inside an mf1 root are ignored.
php-mf2 result:
"items": [
{
"type": [
"h-entry"
],
"properties": {
"invitee": [
{
"type": [
"h-card"
],
"properties": {
"name": [
"John Doe"
],
"url": [
"https://example.com"
]
},
"value": "https://example.com"
}
]
}
}
]
mf2py result:
"items": [
{
"type": [
"h-entry"
],
"properties": {},
"children": [
{
"type": [
"h-card"
],
"properties": {
"url": [
"https://example.com"
],
"name": [
"John Doe"
]
}
}
]
}
]
microformats-node result:
"items": [{
"type": ["h-entry"],
"properties": {
"invitee": [{
"value": "https://example.com",
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"url": ["https://example.com"]
}
}]
}
}]
I'm inclined to answer 1, like mf2py does.
The quote from http://microformats.org/wiki/microformats2-parsing that seems unclear is:
if that child element itself has a microformat ("h-*" or backcompat roots) and is a property element, add it into the array of values for that property as a { } structure, add to that { } structure:
"and is a property element" could be clarified so it's explicit about what to do in backcompat.