J. King
1 year ago
10 changed files with 219 additions and 1 deletions
@ -0,0 +1,47 @@ |
|||||
|
<!-- |
||||
|
A (mostly) thorough test of "new" textContent parsing, taken from the |
||||
|
JavaScript test suite here: |
||||
|
https://github.com/microformats/microformats-parser/blob/master/test/suites/experimental/text-content.html |
||||
|
--> |
||||
|
<div class="h-entry"> |
||||
|
<span class="p-location h-adr"> |
||||
|
<span class="p-locality">Berlin</span>, |
||||
|
<span class="p-region">Berlin</span>, |
||||
|
<span class="p-country-name">DE</span> |
||||
|
<data class="p-latitude" value="52.518606"></data> |
||||
|
<data class="p-longitude" value="13.376127"></data> |
||||
|
</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="h-card"> |
||||
|
<p class="p-name"> |
||||
|
<script> |
||||
|
alert("hi!"); |
||||
|
</script> |
||||
|
<style> |
||||
|
body { |
||||
|
background: green; |
||||
|
} |
||||
|
</style> |
||||
|
Bob Smith |
||||
|
</p> |
||||
|
<div class="p-title"> |
||||
|
Senior |
||||
|
<p> |
||||
|
General |
||||
|
<br /> |
||||
|
Waste |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="h-card"> |
||||
|
<p class="p-name"> |
||||
|
<img src="/profile-picture.jpg" alt="Bob Smith" /> |
||||
|
</p> |
||||
|
</div> |
||||
|
|
||||
|
<a rel="me" href="/"> |
||||
|
<img /> |
||||
|
Joe Bloggs |
||||
|
</a> |
@ -0,0 +1,50 @@ |
|||||
|
{ |
||||
|
"items": [ |
||||
|
{ |
||||
|
"type": ["h-entry"], |
||||
|
"properties": { |
||||
|
"location": [ |
||||
|
{ |
||||
|
"type": ["h-adr"], |
||||
|
"properties": { |
||||
|
"locality": ["Berlin"], |
||||
|
"region": ["Berlin"], |
||||
|
"country-name": ["DE"], |
||||
|
"latitude": ["52.518606"], |
||||
|
"longitude": ["13.376127"] |
||||
|
}, |
||||
|
"value": "Berlin, Berlin, DE" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"type": ["h-card"], |
||||
|
"properties": { |
||||
|
"name": ["Bob Smith"], |
||||
|
"title": ["Senior\nGeneral\nWaste"] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"type": ["h-card"], |
||||
|
"properties": { |
||||
|
"name": ["Bob Smith"], |
||||
|
"photo": [ |
||||
|
{ |
||||
|
"alt": "Bob Smith", |
||||
|
"value": "http://example.com/profile-picture.jpg" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"rels": { |
||||
|
"me": ["http://example.com/"] |
||||
|
}, |
||||
|
"rel-urls": { |
||||
|
"http://example.com/": { |
||||
|
"rels": ["me"], |
||||
|
"text": "Joe Bloggs" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
<div class="hentry"> |
||||
|
<a rel="tag" href="/tags/testing/">Testing</a>, |
||||
|
<a rel="tag" href="/tags/microformats">Microformats</a> |
||||
|
</div> |
||||
|
|
||||
|
<div class="hreview"> |
||||
|
<a rel="tag" href="/tags/phpmf2/">php-mf2</a>, |
||||
|
<a rel="tag" href="/tags/mf2py">mf2py</a> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,60 @@ |
|||||
|
{ |
||||
|
"items": [ |
||||
|
{ |
||||
|
"type": [ |
||||
|
"h-entry" |
||||
|
], |
||||
|
"properties": { |
||||
|
"category": [ |
||||
|
"testing", |
||||
|
"microformats" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"type": [ |
||||
|
"h-review" |
||||
|
], |
||||
|
"properties": { |
||||
|
"category": [ |
||||
|
"phpmf2", |
||||
|
"mf2py" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"rels": { |
||||
|
"tag": [ |
||||
|
"http://example.com/tags/testing/", |
||||
|
"http://example.com/tags/microformats", |
||||
|
"http://example.com/tags/phpmf2/", |
||||
|
"http://example.com/tags/mf2py" |
||||
|
] |
||||
|
}, |
||||
|
"rel-urls": { |
||||
|
"http://example.com/tags/testing/": { |
||||
|
"text": "Testing", |
||||
|
"rels": [ |
||||
|
"tag" |
||||
|
] |
||||
|
}, |
||||
|
"http://example.com/tags/microformats": { |
||||
|
"text": "Microformats", |
||||
|
"rels": [ |
||||
|
"tag" |
||||
|
] |
||||
|
}, |
||||
|
"http://example.com/tags/phpmf2/": { |
||||
|
"text": "php-mf2", |
||||
|
"rels": [ |
||||
|
"tag" |
||||
|
] |
||||
|
}, |
||||
|
"http://example.com/tags/mf2py": { |
||||
|
"text": "mf2py", |
||||
|
"rels": [ |
||||
|
"tag" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<article class="vevent hentry"> |
||||
|
<span class="entry-title">h-entry name</span> |
||||
|
<span class="summary">h-event name</span> |
||||
|
</article> |
@ -0,0 +1,18 @@ |
|||||
|
{ |
||||
|
"items": [ |
||||
|
{ |
||||
|
"type": [ |
||||
|
"h-entry", |
||||
|
"h-event" |
||||
|
], |
||||
|
"properties": { |
||||
|
"name": [ |
||||
|
"h-entry name", |
||||
|
"h-event name" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"rels": {}, |
||||
|
"rel-urls": {} |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<div class="vcard"> |
||||
|
<div class="fn">John Doe</div> |
||||
|
<div>Location: <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr></div> |
||||
|
</div> |
@ -0,0 +1,25 @@ |
|||||
|
{ |
||||
|
"items": [ |
||||
|
{ |
||||
|
"type": [ |
||||
|
"h-card" |
||||
|
], |
||||
|
"properties": { |
||||
|
"name": [ |
||||
|
"John Doe" |
||||
|
], |
||||
|
"geo": [ |
||||
|
{ |
||||
|
"type": [ |
||||
|
"h-geo" |
||||
|
], |
||||
|
"properties": {}, |
||||
|
"value": "30.267991;-97.739568" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"rels": {}, |
||||
|
"rel-urls": {} |
||||
|
} |
Loading…
Reference in new issue