hentry parsing tests

This page was design to test the parsing of hentry and its output to the newer JSON structure of micorformats 2. These tests are part of the micorformats 2 test suite.

Theses are backwards compatibility tests for the older version 1 microformats specification. Please do not use this as a reference for authoring microformats.

Just a name (hentry parsing test)

microformats.org at 7

The expected JSON output:


{
    "items": [{ 
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"],
            "url": ["http://microformats.org/2012/06/25/microformats-org-at-7"] 
        }
    }]
}

Just a hyperlink (hentry parsing test)

microformats.org at 7

The expected JSON output:


{
    "items": [{ 
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"],
            "url": ["http://microformats.org/2012/06/25/microformats-org-at-7"] 
        }
    }]
}

Entry with summary and content (hentry parsing test)

microformats.org at 7

Last week the microformats.org community celebrated its 7th birthday at a gathering hosted by Mozilla in San Francisco and recognized accomplishments, challenges, and opportunities.

The microformats tagline “humans first, machines second” forms the basis of many of our principles, and in that regard, we’d like to recognize a few people and thank them for their years of volunteer service

Updated by Tantek

The expected JSON output:


{
    "items": [{ 
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"],
            "content": [{
                "value": "Last week the microformats.org community celebrated its 7th birthday at a gathering hosted by Mozilla in San Francisco and recognized accomplishments, challenges, and opportunities. The microformats tagline “humans first, machines second” forms the basis of many of our principles, and in that regard, we’d like to recognize a few people and thank them for their years of volunteer service",
                "html": "\n        <p class=\"entry-summary\">Last week the microformats.org community \n            celebrated its 7th birthday at a gathering hosted by Mozilla in \n            San Francisco and recognized accomplishments, challenges, and \n            opportunities.</p>\n\n        <p>The microformats tagline “humans first, machines second” \n            forms the basis of many of our \n            <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n            in that regard, we’d like to recognize a few people and \n            thank them for their years of volunteer service </p>\n    "
            }], 
            "summary": ["Last week the microformats.org community celebrated its 7th birthday at a gathering hosted by Mozilla in San Francisco and recognized accomplishments, challenges, and opportunities."],
            "updated": ["2012-06-25T17:08:26"], 
            "author": [{
                "value": "Tantek",
                "type": ["h-card"],
                "properties": {
                    "name": ["Tantek"],
                    "url": ["http://tantek.com/"]
                }
            }] 
        }
    },{
        "type": ["h-card"],
        "properties": {
            "name": ["Tantek"],
            "url": ["http://tantek.com/"]
        }
    }]
}

Change log:

Contributors:

The orginal test also had contributions from: