h-entry parsing tests

This page was design to test the parsing of h-entry. These tests are part of the micorformats 2 test suite.

Just a name (h-entry parsing test)

microformats.org at 7

The expected JSON output:


{
    "items": [{ 
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"] 
        }
    }]
}

Just a hyperlink (h-entry 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 (h-entry 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": {
            "url": ["http://microformats.org/2012/06/25/microformats-org-at-7"],
            "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=\"p-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    "
            }],
            "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/"]
        }
    }]
}

u-property (h-entry parsing test)

microformats.org at 7

Article permalink

http://microformats.org/ - 2012/06/25/microformats-org-at-7

Article permalink

company logos microformats.org company logos value-class-pattern

http://microformats.org/discuss

The expected JSON output:


{
    "items": [{ 
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"],
            "url": [
                "http://microformats.org/",
                "http://microformats.org/2012/06/25/microformats-org-at-7",
                "http://microformats.org/2012/06/25/microformats-org-at-7",
                "http://microformats.org/",
                "http://microformats.org/wiki/microformats2-parsing",
                "http://microformats.org/wiki/value-class-pattern",
                "http://microformats.org/wiki/",
                "http://microformats.org/discuss"
            ],
            "photo": ["http://example.com/images/logo.gif"]
        }
    }]
}

Note: This test the parse order of elements and attributes as laid out in http://microformats.org/wiki/microformats2-parsing wiki page.

Change log:

Contributors :