hmachine 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.gitignore +2 -2
  2. data/Gemfile +6 -4
  3. data/Gemfile.lock +51 -0
  4. data/README.md +123 -9
  5. data/Rakefile +12 -3
  6. data/bin/hmachine +99 -0
  7. data/hmachine.gemspec +132 -0
  8. data/lib/hmachine.rb +121 -12
  9. data/lib/hmachine/microformat.rb +39 -20
  10. data/lib/hmachine/microformat/adr.rb +22 -0
  11. data/lib/hmachine/microformat/geo.rb +48 -0
  12. data/lib/hmachine/microformat/hcard.rb +169 -11
  13. data/lib/hmachine/microformat/rellicense.rb +20 -0
  14. data/lib/hmachine/microformat/reltag.rb +38 -0
  15. data/lib/hmachine/microformat/votelinks.rb +42 -0
  16. data/lib/hmachine/microformat/xfn.rb +54 -0
  17. data/lib/hmachine/microformat/xmdp.rb +14 -0
  18. data/lib/hmachine/microformat/xoxo.rb +69 -0
  19. data/lib/hmachine/pattern.rb +26 -0
  20. data/lib/hmachine/pattern/abbr.rb +21 -0
  21. data/lib/hmachine/pattern/datetime.rb +75 -0
  22. data/lib/hmachine/pattern/typevalue.rb +32 -0
  23. data/lib/hmachine/pattern/url.rb +32 -0
  24. data/lib/hmachine/pattern/valueclass.rb +51 -0
  25. data/lib/hmachine/posh.rb +3 -0
  26. data/lib/hmachine/posh/anchor.rb +40 -0
  27. data/lib/hmachine/posh/base.rb +204 -0
  28. data/lib/hmachine/posh/definition_list.rb +41 -0
  29. data/test/fixtures/huffduffer.html +466 -0
  30. data/test/fixtures/likeorhate.html +48 -0
  31. data/test/fixtures/rel_license.html +4 -0
  32. data/test/fixtures/test-fixture/hcard/hcard1.html +147 -0
  33. data/test/fixtures/test-fixture/hcard/hcard11.html +123 -0
  34. data/test/fixtures/test-fixture/hcard/hcard12.html +178 -0
  35. data/test/fixtures/test-fixture/hcard/hcard17.html +165 -0
  36. data/test/fixtures/test-fixture/hcard/hcard2.html +264 -0
  37. data/test/fixtures/test-fixture/hcard/hcard3.html +144 -0
  38. data/test/fixtures/test-fixture/hcard/hcard4.html +117 -0
  39. data/test/fixtures/test-fixture/hcard/hcard5.html +119 -0
  40. data/test/fixtures/test-fixture/hcard/hcard6.html +188 -0
  41. data/test/fixtures/test-fixture/hcard/hcard7.html +188 -0
  42. data/test/fixtures/test-fixture/hcard/hcard8.html +130 -0
  43. data/test/fixtures/test-fixture/hcard/hcard9.html +111 -0
  44. data/test/fixtures/test-fixture/hcard/hcard99.html +215 -0
  45. data/test/fixtures/test-fixture/value-class-date-time/value-dt-test-YYYY-MM-DD--HH-MM.html +9 -0
  46. data/test/fixtures/test-fixture/value-class-date-time/value-dt-test-abbr-YYYY-MM-DD--HH-MM.html +4 -0
  47. data/test/fixtures/xfn.html +198 -0
  48. data/test/fixtures/xmdp.html +32 -0
  49. data/test/fixtures/xoxo.html +51 -0
  50. data/test/hmachine_test.rb +122 -6
  51. data/test/microformat/adr_test.rb +47 -0
  52. data/test/microformat/geo_test.rb +66 -0
  53. data/test/microformat/hcard_test.rb +487 -20
  54. data/test/microformat/rellicense_test.rb +36 -0
  55. data/test/microformat/reltag_test.rb +61 -0
  56. data/test/microformat/votelinks_test.rb +44 -0
  57. data/test/microformat/xfn_test.rb +28 -0
  58. data/test/microformat/xmdp_test.rb +16 -0
  59. data/test/microformat/xoxo_test.rb +51 -0
  60. data/test/microformat_test.rb +12 -34
  61. data/test/pattern/date_time_test.rb +55 -0
  62. data/test/pattern/value_class_test.rb +33 -0
  63. data/test/pattern_test.rb +132 -0
  64. data/test/posh/anchor_test.rb +41 -0
  65. data/test/posh/base_test.rb +150 -0
  66. data/test/posh/definition_list_test.rb +38 -0
  67. data/test/test_helper.rb +24 -6
  68. metadata +93 -15
  69. data/lib/hmachine/microformat/base.rb +0 -17
@@ -0,0 +1,48 @@
1
+ <div about="http://likeorhate.com/thing/1191956/" class="item smallthing lohthing1191956">
2
+ <div class="title">
3
+ <a href="http://likeorhate.com/thing/1191956/Linux" property="dc:title" title="Click for more!">Linux</a>
4
+ </div>
5
+ <div class="thumb">
6
+ <a thingid="1191956" mediaid="3858086" class="thingthumb" href="http://upload.wikimedia.org/wikipedia/commons/e/ea/Server_Linux.jpg" title="Click for more images"><img class="thingthumb" property="foaf:depiction" src="http://static.likeorhate.com/thumbnail/3858086.jpg" alt="http://commons.wikipedia.org/wiki/File:Server_Linux.jpg" /></a>
7
+ </div>
8
+ <div class="description ratingparent">
9
+ <div style="text-align: left; width:120px;">
10
+ <div class="clickvote vote-like">
11
+ <a class="aclickvote vote-like" rev="vote-for" rel="nofollow" href="http://likeorhate.com/rate/?id=1191956&amp;rate=like"
12
+ title="Do you like it? Click now and vote!" thingid="1191956">
13
+ <img class="iconvote" src="http://static.likeorhate.com/images/icon_like.png" width="12" height="12" title= "I like" alt="I like"/>
14
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/greenbarleft.png" border="0" height="15" alt=""/>
15
+ <img class="votebar centerimg" src="http://static.likeorhate.com/images/votebar/greenbarcenter.png" border="0" width="70" height="15"/>
16
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/greenbarright.png" border="0" height="15" alt=""/>
17
+ <span class="votebarvotes">100.0%</span>
18
+ <span class="iconuservote"><img class="iconuservote" src="http://static.likeorhate.com/images/uservote.png" width="16" height="16" title="My vote" alt="My vote"/></span>
19
+ </a>
20
+ <br/>
21
+ </div>
22
+ <div class="clickvote vote-whatever">
23
+ <a class="aclickvote vote-whatever" rev="vote-abstain" rel="nofollow" href="http://likeorhate.com/rate/?id=1191956&amp;rate=whatever"
24
+ title="Don't care for it? Click now and vote!" thingid="1191956">
25
+ <img class="iconvote" src="http://static.likeorhate.com/images/icon_wtvr.png" width="12" height="12" title= "Whatever" alt="Whatever"/>
26
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/yellowbarleft.png" border="0" height="15" alt=""/>
27
+ <img class="votebar centerimg" src="http://static.likeorhate.com/images/votebar/yellowbarcenter.png" border="0" width="0" height="15" alt=""/>
28
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/yellowbarright.png" border="0" height="15" alt=""/>
29
+ <span class="votebarvotes">0.0%</span>
30
+ <span class="iconuservote"><img class="iconuservote" src="http://static.likeorhate.com/images/uservote.png" width="16" height="16" title="My vote" alt="My vote"/></span>
31
+ </a>
32
+ <br/>
33
+ </div>
34
+ <div class="clickvote vote-hate">
35
+ <a class="aclickvote vote-hate" rev="vote-against" rel="nofollow" href="http://likeorhate.com/rate/?id=1191956&amp;rate=hate"
36
+ title="Do you hate it? Click now and vote!" thingid="1191956">
37
+ <img class="iconvote" src="http://static.likeorhate.com/images/icon_hate.png" width="12" height="12" title= "I hate" alt="I hate"/>
38
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/redbarleft.png" border="0" height="15" alt=""/>
39
+ <img class="votebar centerimg" src="http://static.likeorhate.com/images/votebar/redbarcenter.png" border="0" width="0" height="15" alt=""/>
40
+ <img class="votebar" src="http://static.likeorhate.com/images/votebar/redbarright.png" border="0" height="15" alt=""/>
41
+ <span class="votebarvotes">0.0%</span>
42
+ <span class="iconuservote"><img class="iconuservote" src="http://static.likeorhate.com/images/uservote.png" width="16" height="16" title="My vote" alt="My vote"/></span>
43
+ </a>
44
+ <br/>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
@@ -0,0 +1,4 @@
1
+ <div>
2
+ <a href="http://creativecommons.org/licenses/by/2.0/" rel="license">cc by 2.0</a>
3
+ <a href="http://www.apache.org/licenses/LICENSE-2.0" rel="license">Apache 2.0</a>
4
+ </div>
@@ -0,0 +1,147 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <title>hCard 1</title>
7
+
8
+ <!-- This will be replace with one CSS file and one JavaScipt file -->
9
+ <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
10
+ <link rel="stylesheet" href="../../testrunner/css/testrunner.css" type="text/css" />
11
+
12
+ <script type="text/javascript" src="../../testrunner/javascript/prototype-1.6.0.2.js"></script>
13
+ <script type="text/javascript" src="../../testrunner/javascript/beautify.js"></script>
14
+ <script type="text/javascript" src="../../testrunner/javascript/sumo/microformat.js"></script>
15
+ <script type="application/javascript;version=1.7" src="http://svn.mozilla.org/labs/operator/chrome/operator/content/Microformats/Microformats.js"></script>
16
+ <script type="text/javascript" src="../../testrunner/javascript/testrunner.js"></script>
17
+
18
+ </head>
19
+ <body>
20
+
21
+
22
+ <div class="test-fixture">
23
+
24
+ <p>
25
+ <a href="../"><img border="0" id="testsuite-image" alt="Microformats testsuite" src="../images/testsuite.gif" /></a><br />
26
+ </p>
27
+
28
+ <h1 class="summary">hCard 1 - single occurrence test</h1>
29
+ <p class="description">This page was design to test that values of a hcard which are meant to have only a single occurrence are parsed correctly.
30
+ The IsEqualToISODate method uses date <a href="../documentation/iso-date.htm">normalisation and compare</a> methods.</p>
31
+ <p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
32
+ <p class="author vcard">
33
+ Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
34
+ </p>
35
+ <!--
36
+ <p>Output examples:
37
+ <ul>
38
+ <li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
39
+ <li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
40
+ </ul>
41
+ </p>
42
+ -->
43
+
44
+ <p>Tests:</p>
45
+ <table id="assetTable" cellpadding="0" cellspacing="0">
46
+ <thead>
47
+ <tr>
48
+ <th>Test</th>
49
+ <th>Result</th>
50
+ <th>Comment</th>
51
+ </tr>
52
+ </thead>
53
+ <tbody>
54
+ <tr class="assert">
55
+ <td class="test">vcard[0].fn</td>
56
+ <td class="result">IsEqualTo("John Doe")</td>
57
+ <td class="comment">The fn (formatted name) is a singular value</td>
58
+ </tr>
59
+ <tr class="assert">
60
+ <td class="test">vcard[0].n</td>
61
+ <td class="result">HasProperty(true)</td>
62
+ <td class="comment">The n (name) is a singular value</td>
63
+ </tr>
64
+ <tr class="assert">
65
+ <td class="test">vcard[0].bday</td>
66
+ <td class="result">IsEqualToISODate("2000-01-01T00:00:00-08:00")</td>
67
+ <td class="comment">The bday (birthday) is a singular value</td>
68
+ </tr>
69
+ <tr class="assert">
70
+ <td class="test">vcard[0].class</td>
71
+ <td class="result">IsEqualTo("Public")</td>
72
+ <td class="comment">The class is a singular value</td>
73
+ </tr>
74
+ <tr class="assert">
75
+ <td class="test">vcard[0].geo</td>
76
+ <td class="result">HasProperty(true)</td>
77
+ <td class="comment">The geo is a singular value</td>
78
+ </tr>
79
+ <tr class="assert">
80
+ <td class="test">vcard[0].rev</td>
81
+ <td class="result">IsEqualToISODate("2008-01-01T13:45:00")</td>
82
+ <td class="comment">The rev is a singular value</td>
83
+ </tr>
84
+ <tr class="assert">
85
+ <td class="test">vcard[0].role</td>
86
+ <td class="result">IsEqualTo("Designer")</td>
87
+ <td class="comment">The role is a singular value</td>
88
+ </tr>
89
+ <tr class="assert">
90
+ <td class="test">vcard[0].sort-string</td>
91
+ <td class="result">IsEqualTo("John")</td>
92
+ <td class="comment">The sort-string is a singular value</td>
93
+ </tr>
94
+ <tr class="assert">
95
+ <td class="test">vcard[0].tz</td>
96
+ <td class="result">IsEqualTo("-05:00")</td>
97
+ <td class="comment">The tz is a singular value</td>
98
+ </tr>
99
+ <tr class="assert">
100
+ <td class="test">vcard[0].uid</td>
101
+ <td class="result">IsEqualTo("com.johndoe/profiles/johndoe")</td>
102
+ <td class="comment">The uid is a singular value</td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+
107
+
108
+ <p>History:</p>
109
+ <ul>
110
+ <li class="history vevent">
111
+ <span class="summary">Created</span>: <abbr class="dtstart" title="2008-04-08">8 April 2008</abbr>
112
+ <span class="description">by Glenn Jones</span>
113
+ </li>
114
+ <li class="history vevent">
115
+ <span class="summary">Updated</span>: <abbr class="dtstart" title="2008-05-08">7 May 2008</abbr>
116
+ <span class="description">by Glenn Jones - Changes the tests for n and geo to HasProperty and extended the rev to full ISO date</span>
117
+ </li>
118
+ </ul>
119
+
120
+
121
+
122
+ </div>
123
+
124
+ <div id="uf">
125
+ <div class="vcard">
126
+ <!-- This may not be the best semantic use of HTML element -->
127
+ <div class="fn n"><span class="given-name sort-string">John</span> Doe</div>
128
+ <div>Birthday: <abbr class="bday" title="2000-01-01T00:00:00-08:00">January 1st, 2000</abbr></div>
129
+ <div>Role: <span class="role">Designer</span></div>
130
+ <div>Location: <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr></div>
131
+ <div>Time zone: <abbr class="tz" title="-05:00">Eastern Standard Time</abbr></div>
132
+
133
+ <div>Profile details:
134
+ <div>Profile id: <span class="uid">com.johndoe/profiles/johndoe</span></div>
135
+ <div>Details are: <span class="class">Public</span></div>
136
+ <div>Last updated: <abbr class="rev" title="2008-01-01T13:45:00">January 1st, 2008 - 13:45</abbr></div>
137
+ </div>
138
+ </div>
139
+ </div>
140
+
141
+ <p>
142
+ <a rel="license" href="../license.txt">Some rights reserved</a>
143
+ </p>
144
+
145
+ </body>
146
+
147
+ </html>
@@ -0,0 +1,123 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <title>hCard 11 - img (image) element test</title>
7
+
8
+ <!-- This will be replace with one CSS file and one JavaScipt file -->
9
+ <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
10
+ <link rel="stylesheet" href="../../../testrunner/css/testrunner.css" type="text/css" />
11
+
12
+ <script type="text/javascript" src="../../testrunner/javascript/prototype-1.6.0.2.js"></script>
13
+ <script type="text/javascript" src="../../testrunner/javascript/beautify.js"></script>
14
+ <script type="text/javascript" src="../../testrunner/javascript/sumo/microformat.js"></script>
15
+ <script type="application/javascript;version=1.7" src="http://svn.mozilla.org/labs/operator/chrome/operator/content/Microformats/Microformats.js"></script>
16
+ <script type="text/javascript" src="../../testrunner/javascript/testrunner.js"></script>
17
+
18
+ </head>
19
+ <body>
20
+
21
+ <div class="test-fixture">
22
+
23
+ <p>
24
+ <a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
25
+ </p>
26
+
27
+ <h1 class="summary">hCard 11 - img (image) element test</h1>
28
+ <p class="description">This page was design to test the use of the image element.</p>
29
+ <p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
30
+ <p class="author vcard">
31
+ Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
32
+ </p>
33
+ <!--
34
+ <p>Output examples:
35
+ <ul>
36
+ <li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
37
+ <li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
38
+ </ul>
39
+ </p>
40
+ -->
41
+
42
+ <p>Tests:</p>
43
+ <table id="assetTable" cellpadding="0" cellspacing="0">
44
+ <thead>
45
+ <tr>
46
+ <th>Test</th>
47
+ <th>Result</th>
48
+ <th>Comment</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+
53
+ <tr class="assert">
54
+ <td class="test">vcard[0].fn</td>
55
+ <td class="result">IsEqualTo("John Doe")</td>
56
+ <td class="comment">The fn value should be taken from the alt attribute on a img element</td>
57
+ </tr>
58
+
59
+ <tr class="assert">
60
+ <td class="test">vcard[1].n.given-name[0]</td>
61
+ <td class="result">IsEqualTo("John")</td>
62
+ <td class="comment">The given-name value should implied from the alt attribute</td>
63
+ </tr>
64
+
65
+ <tr class="assert">
66
+ <td class="test">vcard[2].n.family-name[0]</td>
67
+ <td class="result">IsEqualTo("Doe")</td>
68
+ <td class="comment">The family-name value should implied from the alt attribute</td>
69
+ </tr>
70
+
71
+
72
+
73
+
74
+
75
+ </tbody>
76
+ </table>
77
+
78
+
79
+ <p>History:</p>
80
+ <ul>
81
+ <li class="history vevent">
82
+ <span class="summary">Created</span>: <abbr class="dtstart" title="2008-05-10">15 May 2008</abbr>
83
+ <span class="description">by Glenn Jones</span>
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ </div>
90
+
91
+ <div id="uf">
92
+ <!-- This may not be the best semantic use of HTML element -->
93
+
94
+ <!-- 0 -->
95
+ <p class="vcard">
96
+ <img class="fn photo logo" src="../images/photo.gif" alt="John Doe" />
97
+ </p>
98
+
99
+ <!-- 1 -->
100
+ <p class="vcard">
101
+ <span class="fn n">
102
+ <img class="given-name photo logo" src="../images/photo.gif" alt="John" />
103
+ </span>
104
+ </p>
105
+
106
+ <!-- 2 -->
107
+ <p class="vcard">
108
+ <span class="fn n">
109
+ <img class="family-name photo logo" src="../images/photo.gif" alt="Doe" />
110
+ </span>
111
+ </p>
112
+
113
+ </div>
114
+
115
+
116
+ <p>
117
+ <a rel="license" href="../license.txt">Some rights reserved</a>
118
+ </p>
119
+
120
+
121
+ </body>
122
+
123
+ </html>
@@ -0,0 +1,178 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <title>hCard 12 - abbr (abbreviation) element test</title>
7
+
8
+ <!-- This will be replace with one CSS file and one JavaScipt file -->
9
+ <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
10
+ <link rel="stylesheet" href="../../../testrunner/css/testrunner.css" type="text/css" />
11
+
12
+ <script type="text/javascript" src="../../testrunner/javascript/prototype-1.6.0.2.js"></script>
13
+ <script type="text/javascript" src="../../testrunner/javascript/beautify.js"></script>
14
+ <script type="text/javascript" src="../../testrunner/javascript/sumo/microformat.js"></script>
15
+ <script type="application/javascript;version=1.7" src="http://svn.mozilla.org/labs/operator/chrome/operator/content/Microformats/Microformats.js"></script>
16
+ <script type="text/javascript" src="../../testrunner/javascript/testrunner.js"></script>
17
+
18
+ </head>
19
+ <body>
20
+
21
+ <div class="test-fixture">
22
+
23
+ <p>
24
+ <a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
25
+ </p>
26
+
27
+ <h1 class="summary">hCard 12 - abbr (abbreviation) element test</h1>
28
+ <p class="description">This page was design to comprehensively test the use of the abbreviation element.</p>
29
+ <p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
30
+ <p class="author vcard">
31
+ Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
32
+ </p>
33
+ <!--
34
+ <p>Output examples:
35
+ <ul>
36
+ <li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
37
+ <li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
38
+ </ul>
39
+ </p>
40
+ -->
41
+
42
+ <p>Tests:</p>
43
+ <table id="assetTable" cellpadding="0" cellspacing="0">
44
+ <thead>
45
+ <tr>
46
+ <th>Test</th>
47
+ <th>Result</th>
48
+ <th>Comment</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+
53
+ <tr class="assert">
54
+ <td class="test">vcard[0].fn</td>
55
+ <td class="result">IsEqualTo("John Doe")</td>
56
+ <td class="comment">Should take the value from the abbr title attribute</td>
57
+ </tr>
58
+
59
+ <tr class="assert">
60
+ <td class="test">vcard[0].n.honorific-prefix[0]</td>
61
+ <td class="result">IsEqualTo("Mister")</td>
62
+ <td class="comment">Should take the value from the abbr title attribute</td>
63
+ </tr>
64
+
65
+ <tr class="assert">
66
+ <td class="test">vcard[0].n.given-name[0]</td>
67
+ <td class="result">IsEqualTo("Jonathan")</td>
68
+ <td class="comment">Should take the value from the abbr title attribute</td>
69
+ </tr>
70
+
71
+ <tr class="assert">
72
+ <td class="test">vcard[0].n.additional-name[0]</td>
73
+ <td class="result">IsEqualTo("John")</td>
74
+ <td class="comment">Should take the value from the abbr title attribute</td>
75
+ </tr>
76
+
77
+ <tr class="assert">
78
+ <td class="test">vcard[0].nickname</td>
79
+ <td class="result">IsEqualTo("JJ")</td>
80
+ <td class="comment">Should take the value from the abbr title attribute</td>
81
+ </tr>
82
+
83
+ <tr class="assert">
84
+ <td class="test">vcard[0].adr[0].street-address[0]</td>
85
+ <td class="result">IsEqualTo("123 Fake Street")</td>
86
+ <td class="comment">Should take the value from the abbr title attribute</td>
87
+ </tr>
88
+
89
+ <tr class="assert">
90
+ <td class="test">vcard[0].adr[0].type[0]</td>
91
+ <td class="result">IsEqualToCaseInsensitive("WORK")</td>
92
+ <td class="comment">Should take the value from the abbr title attribute</td>
93
+ </tr>
94
+
95
+ <tr class="assert">
96
+ <td class="test">vcard[0].tel[0].value</td>
97
+ <td class="result">IsEqualToPhoneNumber("4155551234")</td>
98
+ <td class="comment">Should take the value from the abbr title attribute</td>
99
+ </tr>
100
+
101
+
102
+ </tbody>
103
+ </table>
104
+
105
+
106
+ <p>History:</p>
107
+ <ul>
108
+ <li class="history vevent">
109
+ <span class="summary">Created</span>: <abbr class="dtstart" title="2008-05-15">15 May 2008</abbr>
110
+ <span class="description">by Glenn Jones</span>
111
+ </li>
112
+ </ul>
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="uf">
119
+ <!-- This may not be the best semantic use of HTML element -->
120
+
121
+ <!-- 0 -->
122
+ <p class="vcard">
123
+
124
+ <abbr class="fn" title="John Doe">foo</abbr>
125
+ <span class="n">
126
+ <abbr class="honorific-prefix" title="Mister">Mr.</abbr>
127
+ <abbr class="given-name" title="Jonathan">John</abbr>
128
+ <abbr class="additional-name" title="John">J</abbr>
129
+ <abbr class="family-name" title="Doe-Smith">Doe</abbr>
130
+ <abbr class="honorific-suffix" title="Medical Doctor">M.D</abbr>
131
+ </span>
132
+
133
+ <abbr class="nickname" title="JJ">jj</abbr>
134
+ <abbr class="bday" title="2006-04-04">April 4, 2006</abbr>
135
+
136
+ <span class="adr">
137
+ <abbr class="post-office-box" title="Box 1234">B. 1234</abbr>
138
+ <abbr class="extended-address" title="Suite 100">Ste. 100</abbr>
139
+ <abbr class="street-address" title="123 Fake Street">123 Fake St.</abbr>
140
+ <abbr class="locality" title="San Francisco">San Fran</abbr>
141
+ <abbr class="region" title="California">CA</abbr>
142
+ <abbr class="postal-code" title="12345-6789">12345</abbr>
143
+ <abbr class="country-name" title="United States of America">USA</abbr>
144
+ <abbr class="type" title="work">workplace</abbr>
145
+ </span>
146
+
147
+ <abbr class="tel" title="415.555.1234">1234</abbr>
148
+ <abbr class="tel-type-value" title="work">workplace</abbr>
149
+
150
+ <abbr class="tz" title="-0700">Pacific Time</abbr>
151
+ <span class="geo">
152
+ <abbr class="latitude" title="37.77">Northern</abbr>
153
+ <abbr class="longitude" title="-122.41">California</abbr>
154
+ </span>
155
+ <abbr class="title" title="President">pres.</abbr> and
156
+ <abbr class="role" title="Chief">cat wrangler</abbr>
157
+
158
+ <span class="org">
159
+ <abbr class="organization-name" title="Intellicorp">foo</abbr>
160
+ <abbr class="organization-unit" title="Intelligence">bar</abbr>
161
+ </span>
162
+
163
+ <abbr class="note" title="this is a note">this is not a note</abbr>
164
+ <abbr class="uid" title="abcdefghijklmnopqrstuvwxyz">alpha</abbr>
165
+ <abbr class="class" title="public">pub</abbr>
166
+ </p>
167
+
168
+ </div>
169
+
170
+
171
+ <p>
172
+ <a rel="license" href="../license.txt">Some rights reserved</a>
173
+ </p>
174
+
175
+
176
+ </body>
177
+
178
+ </html>