rel=* and xfn parsing tests

This page was design to test the parsing of rel=* and xfn. These tests are part of the micorformats 2 test suite.

A rel=license (rel=license parsing test)

cc by 2.5

The expected JSON output:


{
    "items": [],
    "rels": {
        "license": ["http://creativecommons.org/licenses/by/2.5/"]
    }
}

A rel=nofollow (rel=nofollow parsing test)

Copyrights

The expected JSON output:


{
    "items": [],
    "rels": {
        "nofollow": ["http://microformats.org/wiki/microformats:copyrights"]
    }
}

A xfn elsewhere list (xfn parsing test)

The expected JSON output:


{
    "items": [],
    "rels": {
        "me": [
            "http://twitter.com/glennjones",
            "http://delicious.com/glennjonesnet/",
            "https://plus.google.com/u/0/105161464208920272734/about",
            "http://lanyrd.com/people/glennjones/",
            "http://github.com/glennjones",
            "http://www.flickr.com/photos/glennjonesnet/",
            "http://www.linkedin.com/in/glennjones",
            "http://www.slideshare.net/glennjones/presentations"
        ]
    }
}

A xfn all properties (xfn parsing test)

The expected JSON output:


{
    "items": [],
    "rels": {
        "friend": ["http://example.com/profile/jane"],
        "acquaintance": ["http://example.com/profile/jeo"],
        "contact": ["http://example.com/profile/lily"],
        "met": ["http://example.com/profile/oliver"],
        "co-worker": ["http://example.com/profile/emily"],
        "colleague": ["http://example.com/profile/jack"],
        "neighbor": ["http://example.com/profile/isabella"],
        "child": ["http://example.com/profile/harry"],
        "parent": ["http://example.com/profile/sophia"],
        "sibling": ["http://example.com/profile/charlie"],
        "spouse": ["http://example.com/profile/olivia"],
        "kin": ["http://example.com/profile/james"],
        "muse": ["http://example.com/profile/ava"],
        "crush": ["http://example.com/profile/joshua"],
        "date": ["http://example.com/profile/chloe"],
        "sweetheart": ["http://example.com/profile/alfie"],
        "me": ["http://example.com/profile/isla"]
    }
}

A rel=alternate (rel=alternate parsing test)

The expected JSON output:


{
    "items": [],
    "alternates": [{
        "url": "http://tantek.com/updates.atom",
        "type": "application/atom+xml",
        "rel": "updates"
    }]
}

Change log:

Contributors :