hreview parsing tests

This page was design to test the parsing of hreview. 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 (hreview parsing test)

Crepes on Cole

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {
            "name": ["Crepes on Cole"]
        }
    }]
}

Just a hyperlink (hreview parsing test)

Crepes on Cole

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {
            "name": ["Crepes on Cole"],
            "url": ["https://plus.google.com/116941523817079328322/about"]
        }
    }]
}

Just a photo (hreview parsing test)

Crepes on Cole

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {
            "name": ["Crepes on Cole"],
            "photo": ["http://example.com/images/photo.gif"]
        }
    }]
}

With implied item name and url (hreview parsing test)

Crepes on Cole

4.7 out of 5 stars

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {
            "item": [{
                "value": "Crepes on Cole",
                "type": ["h-item"],
                "properties": {
                    "name": ["Crepes on Cole"],
                    "url": ["http://example.com/crepeoncole"] 
                }
            }],
            "rating": ["4.7"],
            "name": ["Crepes on Cole 4.7 out of 5 stars"]
        }
    }]
}

With item (hreview parsing test)

Crepes on Cole

5 out of 5 stars

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {

            "item": [{
                "value": "Crepes on Cole",
                "type": ["h-item"],
                "properties": {
                    "photo": ["http://example.com/images/photo.gif"], 
                    "name": ["Crepes on Cole"],
                    "url": ["http://example.com/crepeoncole"]
                }
            }],
            "rating": ["5"]
        }
    }]
}

With vcard item (hreview parsing test)

5 out of 5 stars

Crepes on Cole is awesome

Reviewer: Tantek -

Crepes on Cole is one of the best little creperies in San Francisco. Excellent food and service. Plenty of tables in a variety of sizes for parties large and small. Window seating makes for excellent people watching to/from the N-Judah which stops right outside. I've had many fun social gatherings here, as well as gotten plenty of work done thanks to neighborhood WiFi.

Visit date: April 2005

Food eaten:

Permanent link for review: http://example.com/crepe

Creative Commons Attribution-ShareAlike License

The expected JSON output:


{
    "items": [{
        "type": ["h-review"],
        "properties": {
            "rating": ["5"],
            "name": ["Crepes on Cole is awesome"], 
            "reviewer": [{
                "value": "Reviewer: Tantek -",
                "type": ["h-card"],
                "properties": {
                    "name": ["Tantek"]
                }
            }],
            "description": [{
                "value": "Crepes on Cole is one of the best little creperies in San Francisco. Excellent food and service. Plenty of tables in a variety of sizes for parties large and small. Window seating makes for excellent people watching to/from the N-Judah which stops right outside. I've had many fun social gatherings here, as well as gotten plenty of work done thanks to neighborhood WiFi.",
                "html": "\n        <p class=\"item vcard\">\n        <span class=\"fn org\">Crepes on Cole</span> is one of the best little \n        creperies in <span class=\"adr\"><span class=\"locality\">San Francisco</span></span>.\n        Excellent food and service. Plenty of tables in a variety of sizes \n        for parties large and small.  Window seating makes for excellent \n        people watching to/from the N-Judah which stops right outside.  \n        I've had many fun social gatherings here, as well as gotten \n        plenty of work done thanks to neighborhood WiFi.\n        </p>\n    "
            }],
            "item": [{
                "value": "Crepes on Cole is one of the best little creperies in San Francisco. Excellent food and service. Plenty of tables in a variety of sizes for parties large and small. Window seating makes for excellent people watching to/from the N-Judah which stops right outside. I've had many fun social gatherings here, as well as gotten plenty of work done thanks to neighborhood WiFi.",
                "type": ["h-item", "h-card"],
                "properties": {
                    "name": ["Crepes on Cole"], 
                    "org": ["Crepes on Cole"], 
                    "adr": [{
                        "value": "San Francisco",
                        "type": ["h-adr"],
                        "properties": {
                            "locality": ["San Francisco"],
                            "name": ["San Francisco"]
                        }
                    }]
                }
            }],
            "category": ["crepe"],
            "url": ["http://example.com/crepe"]
        }
    }]
}

Change log:

Contributors :