hmachine 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -2
- data/Gemfile +6 -4
- data/Gemfile.lock +51 -0
- data/README.md +123 -9
- data/Rakefile +12 -3
- data/bin/hmachine +99 -0
- data/hmachine.gemspec +132 -0
- data/lib/hmachine.rb +121 -12
- data/lib/hmachine/microformat.rb +39 -20
- data/lib/hmachine/microformat/adr.rb +22 -0
- data/lib/hmachine/microformat/geo.rb +48 -0
- data/lib/hmachine/microformat/hcard.rb +169 -11
- data/lib/hmachine/microformat/rellicense.rb +20 -0
- data/lib/hmachine/microformat/reltag.rb +38 -0
- data/lib/hmachine/microformat/votelinks.rb +42 -0
- data/lib/hmachine/microformat/xfn.rb +54 -0
- data/lib/hmachine/microformat/xmdp.rb +14 -0
- data/lib/hmachine/microformat/xoxo.rb +69 -0
- data/lib/hmachine/pattern.rb +26 -0
- data/lib/hmachine/pattern/abbr.rb +21 -0
- data/lib/hmachine/pattern/datetime.rb +75 -0
- data/lib/hmachine/pattern/typevalue.rb +32 -0
- data/lib/hmachine/pattern/url.rb +32 -0
- data/lib/hmachine/pattern/valueclass.rb +51 -0
- data/lib/hmachine/posh.rb +3 -0
- data/lib/hmachine/posh/anchor.rb +40 -0
- data/lib/hmachine/posh/base.rb +204 -0
- data/lib/hmachine/posh/definition_list.rb +41 -0
- data/test/fixtures/huffduffer.html +466 -0
- data/test/fixtures/likeorhate.html +48 -0
- data/test/fixtures/rel_license.html +4 -0
- data/test/fixtures/test-fixture/hcard/hcard1.html +147 -0
- data/test/fixtures/test-fixture/hcard/hcard11.html +123 -0
- data/test/fixtures/test-fixture/hcard/hcard12.html +178 -0
- data/test/fixtures/test-fixture/hcard/hcard17.html +165 -0
- data/test/fixtures/test-fixture/hcard/hcard2.html +264 -0
- data/test/fixtures/test-fixture/hcard/hcard3.html +144 -0
- data/test/fixtures/test-fixture/hcard/hcard4.html +117 -0
- data/test/fixtures/test-fixture/hcard/hcard5.html +119 -0
- data/test/fixtures/test-fixture/hcard/hcard6.html +188 -0
- data/test/fixtures/test-fixture/hcard/hcard7.html +188 -0
- data/test/fixtures/test-fixture/hcard/hcard8.html +130 -0
- data/test/fixtures/test-fixture/hcard/hcard9.html +111 -0
- data/test/fixtures/test-fixture/hcard/hcard99.html +215 -0
- data/test/fixtures/test-fixture/value-class-date-time/value-dt-test-YYYY-MM-DD--HH-MM.html +9 -0
- data/test/fixtures/test-fixture/value-class-date-time/value-dt-test-abbr-YYYY-MM-DD--HH-MM.html +4 -0
- data/test/fixtures/xfn.html +198 -0
- data/test/fixtures/xmdp.html +32 -0
- data/test/fixtures/xoxo.html +51 -0
- data/test/hmachine_test.rb +122 -6
- data/test/microformat/adr_test.rb +47 -0
- data/test/microformat/geo_test.rb +66 -0
- data/test/microformat/hcard_test.rb +487 -20
- data/test/microformat/rellicense_test.rb +36 -0
- data/test/microformat/reltag_test.rb +61 -0
- data/test/microformat/votelinks_test.rb +44 -0
- data/test/microformat/xfn_test.rb +28 -0
- data/test/microformat/xmdp_test.rb +16 -0
- data/test/microformat/xoxo_test.rb +51 -0
- data/test/microformat_test.rb +12 -34
- data/test/pattern/date_time_test.rb +55 -0
- data/test/pattern/value_class_test.rb +33 -0
- data/test/pattern_test.rb +132 -0
- data/test/posh/anchor_test.rb +41 -0
- data/test/posh/base_test.rb +150 -0
- data/test/posh/definition_list_test.rb +38 -0
- data/test/test_helper.rb +24 -6
- metadata +93 -15
- data/lib/hmachine/microformat/base.rb +0 -17
@@ -0,0 +1,165 @@
|
|
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 17 - implied organization-name optimization 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 17 - implied organization-name optimization test</h1>
|
28
|
+
<p class="description">This page was design to test the implied "org" optimization which is explained
|
29
|
+
on the wiki <a href="http://microformats.org/wiki/hcard#Implied_.22organization-name.22_Optimization">http://microformats.org/wiki/hcard#Implied_.22organization-name.22_Optimization</a>.
|
30
|
+
Examples copied from the original test suite.
|
31
|
+
</p>
|
32
|
+
<p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
|
33
|
+
<p class="author vcard">
|
34
|
+
Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
|
35
|
+
</p>
|
36
|
+
<!--
|
37
|
+
<p>Output examples:
|
38
|
+
<ul>
|
39
|
+
<li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
|
40
|
+
<li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
|
41
|
+
</ul>
|
42
|
+
</p>
|
43
|
+
-->
|
44
|
+
|
45
|
+
<p>Tests:</p>
|
46
|
+
<table id="assetTable" cellpadding="0" cellspacing="0">
|
47
|
+
<thead>
|
48
|
+
<tr>
|
49
|
+
<th>Test</th>
|
50
|
+
<th>Result</th>
|
51
|
+
<th>Comment</th>
|
52
|
+
</tr>
|
53
|
+
</thead>
|
54
|
+
<tbody>
|
55
|
+
<tr class="assert">
|
56
|
+
<td class="test">vcard[0].org[0].organization-name</td>
|
57
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
58
|
+
<td class="comment">The organization-name value is implied from the org value</td>
|
59
|
+
</tr>
|
60
|
+
<tr class="assert">
|
61
|
+
<td class="test">vcard[1].org[0].organization-name</td>
|
62
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
63
|
+
<td class="comment">The organization-name value is implied from the org value</td>
|
64
|
+
</tr>
|
65
|
+
<tr class="assert">
|
66
|
+
<td class="test">vcard[2].org[0].organization-name</td>
|
67
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
68
|
+
<td class="comment">The organization-name value is implied from the org value</td>
|
69
|
+
</tr>
|
70
|
+
<tr class="assert">
|
71
|
+
<td class="test">vcard[3].org[0].organization-name</td>
|
72
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
73
|
+
<td class="comment">The organization-name value is implied from the org value</td>
|
74
|
+
</tr>
|
75
|
+
<tr class="assert">
|
76
|
+
<td class="test">vcard[4].org[0].organization-name</td>
|
77
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
78
|
+
<td class="comment">The organization-name value is implied from the org value</td>
|
79
|
+
</tr>
|
80
|
+
<tr class="assert">
|
81
|
+
<td class="test">vcard[5].org[0].organization-name</td>
|
82
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
83
|
+
<td class="comment">The organization-name value</td>
|
84
|
+
</tr>
|
85
|
+
<tr class="assert">
|
86
|
+
<td class="test">vcard[6].org[0].organization-name</td>
|
87
|
+
<td class="result">IsEqualTo("World Wide Web Consortium")</td>
|
88
|
+
<td class="comment">The organization-name value</td>
|
89
|
+
</tr>
|
90
|
+
|
91
|
+
</tbody>
|
92
|
+
</table>
|
93
|
+
|
94
|
+
|
95
|
+
<p>History:</p>
|
96
|
+
<ul>
|
97
|
+
<li class="history vevent">
|
98
|
+
<span class="summary">Created</span>: <abbr class="dtstart" title="2008-06-01">1 June 2008</abbr>
|
99
|
+
<span class="description">by Glenn Jones</span>
|
100
|
+
</li>
|
101
|
+
</ul>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="uf">
|
108
|
+
<!-- This may not be the best semantic use of HTML element -->
|
109
|
+
|
110
|
+
<!-- 0 -->
|
111
|
+
<div class="vcard">
|
112
|
+
<div class="fn org">World Wide Web Consortium</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<!-- 1 -->
|
116
|
+
<div class="vcard">
|
117
|
+
<div class="fn">John Doe</div>
|
118
|
+
<div class="org">World Wide Web Consortium</div>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<!-- 2 -->
|
122
|
+
<div class="vcard">
|
123
|
+
<img class="fn" src="http://www.ufxtract.com/testsuite/images/logo.gif" alt="W3C" />
|
124
|
+
<div class="org">World Wide Web Consortium</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<!-- 3 -->
|
128
|
+
<div class="vcard">
|
129
|
+
<img class="fn org" src="http://www.ufxtract.com/testsuite/images/logo.gif"
|
130
|
+
alt="World Wide Web Consortium" />
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<!-- 4 -->
|
134
|
+
<div class="vcard">
|
135
|
+
<abbr class="fn org" title="World Wide Web Consortium">W3C</abbr>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<!-- 5 -->
|
139
|
+
<div class="vcard">
|
140
|
+
<div class="fn">John Doe</div>
|
141
|
+
<div class="org">
|
142
|
+
<div class="organization-name">World Wide Web Consortium</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<!-- 6 -->
|
147
|
+
<div class="vcard">
|
148
|
+
<div class="fn">John Doe</div>
|
149
|
+
<div class="org">
|
150
|
+
<div class="organization-unit">HTML Working Group</div>,
|
151
|
+
<div class="organization-name">World Wide Web Consortium</div>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<p>
|
159
|
+
<a rel="license" href="../license.txt">Some rights reserved</a>
|
160
|
+
</p>
|
161
|
+
|
162
|
+
|
163
|
+
</body>
|
164
|
+
|
165
|
+
</html>
|
@@ -0,0 +1,264 @@
|
|
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 2 - Top level optional multiple occurrence 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
|
+
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
|
22
|
+
<div class="test-fixture">
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<h1 class="summary">hCard 2 - multiple occurrence test</h1>
|
29
|
+
<p class="description">This page was design to test that values of a hcard which are can have multiple occurrences are parsed correctly.</p>
|
30
|
+
<p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
|
31
|
+
<p class="author vcard">
|
32
|
+
Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
|
33
|
+
</p>
|
34
|
+
<!--
|
35
|
+
<p>Output examples:
|
36
|
+
<ul>
|
37
|
+
<li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
|
38
|
+
<li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
|
39
|
+
</ul>
|
40
|
+
</p>
|
41
|
+
-->
|
42
|
+
|
43
|
+
<p>Tests:</p>
|
44
|
+
<table id="assetTable" cellpadding="0" cellspacing="0">
|
45
|
+
<thead>
|
46
|
+
<tr>
|
47
|
+
<th>Test</th>
|
48
|
+
<th>Result</th>
|
49
|
+
<th>Comment</th>
|
50
|
+
</tr>
|
51
|
+
</thead>
|
52
|
+
<tbody>
|
53
|
+
<!-- Used HasProperty instead
|
54
|
+
<tr class="assert">
|
55
|
+
<td class="test">vcard[0].adr[1].street-address[0]</td>
|
56
|
+
<td class="result">IsEqualTo("West Street")</td>
|
57
|
+
<td class="comment">The adr (address) is a optional multiple value</td>
|
58
|
+
</tr>
|
59
|
+
<tr class="assert">
|
60
|
+
<td class="test">vcard[0].email[1]</td>
|
61
|
+
<td class="result">IsEqualTo("john.doe@webfeetmedia.com")</td>
|
62
|
+
<td class="comment">The class is a optional multiple value</td>
|
63
|
+
</tr>
|
64
|
+
<tr class="assert">
|
65
|
+
<td class="test">vcard[0].org[1].organization-name</td>
|
66
|
+
<td class="result">IsEqualTo("Web Feet Media Ltd")</td>
|
67
|
+
<td class="comment">The org is a optional multiple value</td>
|
68
|
+
</tr>
|
69
|
+
<tr class="assert">
|
70
|
+
<td class="test">vcard[0].tel[1].value</td>
|
71
|
+
<td class="result">IsEqualTo("+1 415 555 200")</td>
|
72
|
+
<td class="comment">The tel is a optional multiple value</td>
|
73
|
+
</tr>
|
74
|
+
-->
|
75
|
+
|
76
|
+
|
77
|
+
<tr class="assert">
|
78
|
+
<td class="test">vcard[0].adr[1]</td>
|
79
|
+
<td class="result">HasProperty(true)</td>
|
80
|
+
<td class="comment">The adr (address) is a optional multiple value</td>
|
81
|
+
</tr>
|
82
|
+
<tr class="assert">
|
83
|
+
<td class="test">vcard[0].email[1]</td>
|
84
|
+
<td class="result">HasProperty(true)</td>
|
85
|
+
<td class="comment">The class is a optional multiple value</td>
|
86
|
+
</tr>
|
87
|
+
<tr class="assert">
|
88
|
+
<td class="test">vcard[0].org[1]</td>
|
89
|
+
<td class="result">HasProperty(true)</td>
|
90
|
+
<td class="comment">The org is a optional multiple value</td>
|
91
|
+
</tr>
|
92
|
+
<tr class="assert">
|
93
|
+
<td class="test">vcard[0].tel[1]</td>
|
94
|
+
<td class="result">HasProperty(true)</td>
|
95
|
+
<td class="comment">The tel is a optional multiple value</td>
|
96
|
+
</tr>
|
97
|
+
|
98
|
+
<tr class="assert">
|
99
|
+
<td class="test">vcard[0].agent[1]</td>
|
100
|
+
<td class="result">IsEqualTo("Dave Doe")</td>
|
101
|
+
<td class="comment">The agent is a optional multiple value</td>
|
102
|
+
</tr>
|
103
|
+
<tr class="assert">
|
104
|
+
<td class="test">vcard[0].category[1]</td>
|
105
|
+
<td class="result">IsEqualTo("development")</td>
|
106
|
+
<td class="comment">The category is a optional multiple value</td>
|
107
|
+
</tr>
|
108
|
+
|
109
|
+
<tr class="assert">
|
110
|
+
<td class="test">vcard[0].key[0]</td>
|
111
|
+
<td class="result">IsEqualTo("hd02$Gfu*d%dh87KTa2=23934532479")</td>
|
112
|
+
<td class="comment">The key is a optional multiple value</td>
|
113
|
+
</tr>
|
114
|
+
<tr class="assert">
|
115
|
+
<td class="test">vcard[0].label[1]</td>
|
116
|
+
<td class="result">IsEqualTo("West Street, Brighton, United Kingdom")</td>
|
117
|
+
<td class="comment">The label is a optional multiple value</td>
|
118
|
+
</tr>
|
119
|
+
<tr class="assert">
|
120
|
+
<td class="test">vcard[0].logo[1]</td>
|
121
|
+
<td class="result">IsEqualTo("http://www.ufxtract.com/testsuite/images/logo.gif")</td>
|
122
|
+
<td class="comment">The logo is a optional multiple value</td>
|
123
|
+
</tr>
|
124
|
+
<tr class="assert">
|
125
|
+
<td class="test">vcard[0].mailer[1]</td>
|
126
|
+
<td class="result">IsEqualTo("Outlook 2007")</td>
|
127
|
+
<td class="comment">The mailer is a optional multiple value</td>
|
128
|
+
</tr>
|
129
|
+
<tr class="assert">
|
130
|
+
<td class="test">vcard[0].nickname[1]</td>
|
131
|
+
<td class="result">IsEqualTo("Lost boy")</td>
|
132
|
+
<td class="comment">The nickname is a optional multiple value</td>
|
133
|
+
</tr>
|
134
|
+
<tr class="assert">
|
135
|
+
<td class="test">vcard[0].note[1]</td>
|
136
|
+
<td class="result">IsEqualTo("It can be a real problem booking a hotel room with the name John Doe.")</td>
|
137
|
+
<td class="comment">The note is a optional multiple value</td>
|
138
|
+
</tr>
|
139
|
+
<tr class="assert">
|
140
|
+
<td class="test">vcard[0].photo[0]</td>
|
141
|
+
<td class="result">IsEqualTo("http://www.ufxtract.com/testsuite/images/photo.gif")</td>
|
142
|
+
<td class="comment">The photo is a optional multiple value</td>
|
143
|
+
</tr>
|
144
|
+
<tr class="assert">
|
145
|
+
<td class="test">vcard[0].sound[0]</td>
|
146
|
+
<td class="result">IsEqualTo("Pronunciation of my name")</td>
|
147
|
+
<td class="comment">The sound is a optional multiple value</td>
|
148
|
+
</tr>
|
149
|
+
<tr class="assert">
|
150
|
+
<td class="test">vcard[0].title[1]</td>
|
151
|
+
<td class="result">IsEqualTo("Owner")</td>
|
152
|
+
<td class="comment">The title is a optional multiple value</td>
|
153
|
+
</tr>
|
154
|
+
<tr class="assert">
|
155
|
+
<td class="test">vcard[0].url[1]</td>
|
156
|
+
<td class="result">IsEqualTo("http://www.webfeetmedia.com/")</td>
|
157
|
+
<td class="comment">The url is a optional multiple value</td>
|
158
|
+
</tr>
|
159
|
+
</tbody>
|
160
|
+
</table>
|
161
|
+
|
162
|
+
|
163
|
+
<p>History:</p>
|
164
|
+
<ul>
|
165
|
+
<li class="history vevent">
|
166
|
+
<span class="summary">Created</span>: <abbr class="dtstart" title="2008-04-08">8 April 2008</abbr>
|
167
|
+
<span class="description">by Glenn Jones</span>
|
168
|
+
</li>
|
169
|
+
|
170
|
+
<li class="history vevent">
|
171
|
+
<span class="summary">Updated</span>: <abbr class="dtstart" title="2008-05-07">7 May 2008</abbr>
|
172
|
+
<span class="description">by Glenn Jones - Changed incorrect test values for logo, photo and key properties</span>
|
173
|
+
</li>
|
174
|
+
</ul>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div id="uf">
|
181
|
+
<div class="vcard">
|
182
|
+
<!-- This may not be the best semantic use of HTML element -->
|
183
|
+
<div class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></div>
|
184
|
+
<a class="sound" href="http://www.madgex.com/johndoe.mpeg">Pronunciation of my name</a>
|
185
|
+
<div><img class="photo" width="80" height="100" src="../images/photo.gif" alt="Photo of John Doe" /></div>
|
186
|
+
<p>Nicknames:</p>
|
187
|
+
<ul>
|
188
|
+
<li class="nickname">Man with no name</li>
|
189
|
+
<li class="nickname">Lost boy</li>
|
190
|
+
</ul>
|
191
|
+
<p>About:</p>
|
192
|
+
<p class="note">John Doe is one of those names you always have issues with.</p>
|
193
|
+
<p class="note">It can be a real problem booking a hotel room with the name John Doe.</p>
|
194
|
+
<p>Companies:</p>
|
195
|
+
|
196
|
+
<div>
|
197
|
+
<img class="logo" width="80" height="100" src="../images/logo.gif" alt="Madgex company logo" />
|
198
|
+
<img class="logo" width="80" height="100" src="../images/logo.gif" alt="Web Feet Media company logo" />
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<ul>
|
202
|
+
<li><a class="url org" href="http://www.madgex.com/">Madgex</a> <span class="title">Creative Director</span></li>
|
203
|
+
<li><a class="url org" href="http://www.webfeetmedia.com/">Web Feet Media Ltd</a> <span class="title">Owner</span></li>
|
204
|
+
</ul>
|
205
|
+
|
206
|
+
|
207
|
+
<p>Tags:
|
208
|
+
<a rel="tag" class="category" href="http://en.wikipedia.org/wiki/design">design</a>,
|
209
|
+
<a rel="tag" class="category" href="http://en.wikipedia.org/wiki/development">development</a> and
|
210
|
+
<a rel="tag" class="category" href="http://en.wikipedia.org/wiki/web">web</a>
|
211
|
+
</p>
|
212
|
+
|
213
|
+
<p>Phone numbers:</p>
|
214
|
+
<ul>
|
215
|
+
<li class="tel">
|
216
|
+
<span class="type">Work</span> (<span class="type">pref</span>erred):
|
217
|
+
<span class="value">+1 415 555 100</span>
|
218
|
+
</li>
|
219
|
+
<li class="tel"><span class="type">Home</span>: <span class="value">+1 415 555 200</span></li>
|
220
|
+
<li class="tel"><span class="type">Postal</span>: <span class="value">+1 415 555 300</span></li>
|
221
|
+
</ul>
|
222
|
+
|
223
|
+
<p>Emails:</p>
|
224
|
+
<ul>
|
225
|
+
<li><a class="email" href="mailto:john.doe@madgex.com">John Doe at Madgex</a></li>
|
226
|
+
<li><a class="email" href="mailto:john.doe@webfeetmedia.com">John Doe at Web Feet Media</a></li>
|
227
|
+
</ul>
|
228
|
+
<p>John Doe uses <span class="mailer">PigeonMail 2.1</span> or <span class="mailer">Outlook 2007</span> for email.</p>
|
229
|
+
|
230
|
+
<p>Addresses:</p>
|
231
|
+
<ul>
|
232
|
+
<li class="adr">
|
233
|
+
<span class="type">Work</span>:
|
234
|
+
<div class="label">
|
235
|
+
<span class="street-address">North Street</span>,
|
236
|
+
<span class="locality">Brighton</span>,
|
237
|
+
<span class="country-name">United Kingdom</span>
|
238
|
+
</div>
|
239
|
+
</li>
|
240
|
+
<li class="adr">
|
241
|
+
<span class="type">Home</span>:
|
242
|
+
<div class="label">
|
243
|
+
<span class="street-address">West Street</span>,
|
244
|
+
<span class="locality">Brighton</span>,
|
245
|
+
<span class="country-name">United Kingdom</span>
|
246
|
+
</div>
|
247
|
+
</li>
|
248
|
+
</ul>
|
249
|
+
|
250
|
+
|
251
|
+
<p>In emergency contact: <span class="agent">Jane Doe</span> or <span class="agent">Dave Doe</span>.</p>
|
252
|
+
|
253
|
+
<p>Key: <span class="key">hd02$Gfu*d%dh87KTa2=23934532479</span></p>
|
254
|
+
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
<p>
|
259
|
+
<a rel="license" href="../license.txt">Some rights reserved</a>
|
260
|
+
</p>
|
261
|
+
|
262
|
+
</body>
|
263
|
+
|
264
|
+
</html>
|
@@ -0,0 +1,144 @@
|
|
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 3 - adr (address) singular and multiple occurrence 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
|
+
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
|
22
|
+
<div class="test-fixture">
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<h1 class="summary">hCard 3 - adr (address) singular and multiple occurrence test</h1>
|
29
|
+
<p class="description">This page was design to test singular and multiple occurrence values in the adr element of a hcard.</p>
|
30
|
+
<p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
|
31
|
+
<p class="author vcard">
|
32
|
+
Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a>
|
33
|
+
</p>
|
34
|
+
<!--
|
35
|
+
<p>Output examples:
|
36
|
+
<ul>
|
37
|
+
<li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
|
38
|
+
<li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
|
39
|
+
</ul>
|
40
|
+
</p>
|
41
|
+
-->
|
42
|
+
|
43
|
+
<p>Tests:</p>
|
44
|
+
<table id="assetTable" cellpadding="0" cellspacing="0">
|
45
|
+
<thead>
|
46
|
+
<tr>
|
47
|
+
<th>Test</th>
|
48
|
+
<th>Result</th>
|
49
|
+
<th>Comment</th>
|
50
|
+
</tr>
|
51
|
+
</thead>
|
52
|
+
<tbody>
|
53
|
+
<tr class="assert">
|
54
|
+
<td class="test">vcard[0].adr[0].type[0]</td>
|
55
|
+
<td class="result">IsEqualToCaseInsensitive("work")</td>
|
56
|
+
<td class="comment">The type is a optional multiple value. Types are case insensitive</td>
|
57
|
+
</tr>
|
58
|
+
<tr class="assert">
|
59
|
+
<td class="test">vcard[0].adr[0].post-office-box</td>
|
60
|
+
<td class="result">IsEqualTo("PO Box 46")</td>
|
61
|
+
<td class="comment">The post-office-box is a optional singular value</td>
|
62
|
+
</tr>
|
63
|
+
<tr class="assert">
|
64
|
+
<td class="test">vcard[0].adr[0].street-address[1]</td>
|
65
|
+
<td class="result">IsEqualTo("West Street")</td>
|
66
|
+
<td class="comment">The street-address is a optional multiple value</td>
|
67
|
+
</tr>
|
68
|
+
<tr class="assert">
|
69
|
+
<td class="test">vcard[0].adr[0].extended-address</td>
|
70
|
+
<td class="result">IsEqualTo("Suite 2")</td>
|
71
|
+
<td class="comment">The extended-address is a optional singular value</td>
|
72
|
+
</tr>
|
73
|
+
<tr class="assert">
|
74
|
+
<td class="test">vcard[0].adr[0].region</td>
|
75
|
+
<td class="result">IsEqualTo("East Sussex")</td>
|
76
|
+
<td class="comment">The region is a optional singular value</td>
|
77
|
+
</tr>
|
78
|
+
<tr class="assert">
|
79
|
+
<td class="test">vcard[0].adr[0].locality</td>
|
80
|
+
<td class="result">IsEqualTo("Brighton")</td>
|
81
|
+
<td class="comment">The locality is a optional singular value</td>
|
82
|
+
</tr>
|
83
|
+
<tr class="assert">
|
84
|
+
<td class="test">vcard[0].adr[0].postal-code</td>
|
85
|
+
<td class="result">IsEqualTo("BN1 3DF")</td>
|
86
|
+
<td class="comment">The postal-code is a optional singular value</td>
|
87
|
+
</tr>
|
88
|
+
<tr class="assert">
|
89
|
+
<td class="test">vcard[0].adr[0].country-name</td>
|
90
|
+
<td class="result">IsEqualTo("United Kingdom")</td>
|
91
|
+
<td class="comment">The country-name is a optional singular value</td>
|
92
|
+
</tr>
|
93
|
+
</tbody>
|
94
|
+
</table>
|
95
|
+
|
96
|
+
|
97
|
+
<p>History:</p>
|
98
|
+
<ul>
|
99
|
+
<li class="history vevent">
|
100
|
+
<span class="summary">Created</span>: <abbr class="dtstart" title="2008-04-08">8 April 2008</abbr>
|
101
|
+
<span class="description">by Glenn Jones</span>
|
102
|
+
</li>
|
103
|
+
|
104
|
+
<li class="history vevent">
|
105
|
+
<span class="summary">Updated</span>: <abbr class="dtstart" title="2008-05-07">7 May 2008</abbr>
|
106
|
+
<span class="description">by Glenn Jones - Changed the extended-address property from multiple to singular. This is still an area of debate.</span>
|
107
|
+
</li>
|
108
|
+
</ul>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div id="uf">
|
115
|
+
<div class="vcard">
|
116
|
+
<!-- This may not be the best semantic use of HTML element -->
|
117
|
+
<div class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></div>
|
118
|
+
|
119
|
+
<div class="adr">
|
120
|
+
<span class="type">Work</span>:
|
121
|
+
<div class="label">
|
122
|
+
<span class="post-office-box">PO Box 46</span>,
|
123
|
+
<span class="extended-address">Suite 2</span>,
|
124
|
+
<span class="street-address">Sunny House</span>,
|
125
|
+
<span class="street-address">West Street</span>,
|
126
|
+
<span class="locality">Brighton</span>,
|
127
|
+
<span class="region">East Sussex</span>,
|
128
|
+
<span class="country-name">United Kingdom</span>,
|
129
|
+
<span class="postal-code">BN1 3DF</span>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<p>
|
138
|
+
<a rel="license" href="../license.txt">Some rights reserved</a>
|
139
|
+
</p>
|
140
|
+
|
141
|
+
|
142
|
+
</body>
|
143
|
+
|
144
|
+
</html>
|