uformats 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,157 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+ require 'uformats/hcalendar'
3
+
4
+ class HCalendarTest < Test::Unit::TestCase
5
+
6
+ def test_should_parse_sample_web_2_0
7
+ e = event(:web_2_0)
8
+ assert_equal('http://www.web2con.com/', e.url)
9
+ assert_equal(2005, e.dtstart.year)
10
+ assert_equal(10, e.dtstart.month)
11
+ assert_equal(5, e.dtstart.day)
12
+ assert_equal(2005, e.dtend.year)
13
+ assert_equal(10, e.dtend.month)
14
+ assert_equal(8, e.dtend.day)
15
+ assert_equal('Argent Hotel, San Francisco, CA', e.location)
16
+ end
17
+
18
+ def test_should_parse_sample_web_2_0_readable
19
+ e = event(:web_2_0_readable)
20
+ assert_equal('http://www.web2con.com/', e.url)
21
+ assert_equal(2005, e.dtstart.year)
22
+ assert_equal(10, e.dtstart.month)
23
+ assert_equal(5, e.dtstart.day)
24
+ assert_equal(2005, e.dtend.year)
25
+ assert_equal(10, e.dtend.month)
26
+ assert_equal(8, e.dtend.day)
27
+ assert_equal('Argent Hotel, San Francisco, CA', e.location)
28
+ end
29
+
30
+ def test_should_parse_sample_elecciones
31
+ e = event(:elecciones)
32
+ assert_equal('http://yovoto.pehuen.org', e.url)
33
+ assert_equal(2005, e.dtstart.year)
34
+ assert_equal(12, e.dtstart.month)
35
+ assert_equal(11, e.dtstart.day)
36
+ assert_equal('Holanda', e.location)
37
+ assert_equal('Por el derecho a voto de los Chilenos en el Exterior', e.description)
38
+ end
39
+
40
+ def test_should_parse_sample_cc_italia
41
+ e = event(:cc_italia)
42
+ assert_equal('http://www.creativecommons.it/ccit2005/programma_new.html', e.url)
43
+ assert_equal('2005-11-19T08:00:00Z', e.dtstart.utc.xmlschema)
44
+ assert_equal('2005-11-19T22:59:00Z', e.dtend.utc.xmlschema)
45
+ assert_equal('Creative Commons IT 2005', e.summary)
46
+ assert_equal('Torino', e.location)
47
+ assert_equal('L’evento di Creative Commons Italia', e.description)
48
+ end
49
+
50
+ def test_should_parse_sample_eclipsecon
51
+ e = event(:eclipsecon, 'http://www.midgard-project.org/community/events/')
52
+ assert_equal('http://www.midgard-project.org/community/events/205f1d146720b563dd726368389f3da7.html', e.url)
53
+ # Yes, these people don't understand time zones!
54
+ assert_equal('2006-03-20T08:00:00Z', e.dtstart.utc.xmlschema)
55
+ assert_equal('2006-03-23T19:00:00Z', e.dtend.utc.xmlschema)
56
+ assert_equal('1970-01-01T00:33:26Z', e.dtstamp.utc.xmlschema)
57
+ assert_equal('EclipseCon 2006', e.summary)
58
+ assert_equal('Santa Clara, California', e.location)
59
+ assert_equal('205f1d146720b563dd726368389f3da7', e.uid)
60
+ end
61
+
62
+ def test_should_parse_sample_meaningful_xhtml
63
+ e = event(:meaningful_xhtml)
64
+ assert_equal('Theme: Coding Audience: All Geek-o-meter rating: 3', e.description)
65
+ assert_equal('The Elements of Meaningful XHTML', e.summary)
66
+ end
67
+
68
+ def test_should_parse_sample_pretzel_day
69
+ e = event(:pretzel_day)
70
+ assert_equal(2006, e.dtstart.year)
71
+ assert_equal(4, e.dtstart.month)
72
+ assert_equal(26, e.dtstart.day)
73
+ assert_equal('National Pretzel Day', e.summary)
74
+ assert_equal('Eat your heart out on pretzels, but be sure not to choke.', e.description)
75
+ end
76
+
77
+ def event(name, url=nil)
78
+ Microformats::HCalendar::Event.first(SOURCES[name], url)
79
+ end
80
+
81
+ SOURCES = {
82
+ :web_2_0 => %{
83
+ <span class="vevent">
84
+ <a class="url" href="http://www.web2con.com/">
85
+ <span class="summary">Web 2.0 Conference</span>:
86
+ <abbr class="dtstart" title="2005-10-05">October 5</abbr>-
87
+ <abbr class="dtend" title="2005-10-08">7</abbr>,
88
+ at the <span class="location">Argent Hotel, San Francisco, CA</span>
89
+ </a>
90
+ </span>
91
+ },
92
+ :web_2_0_readable => %{
93
+ <span class="vevent">
94
+ <a class="url" href="http://www.web2con.com/">
95
+ <span class="summary">Web 2.0 Conference</span>:
96
+ <abbr class="dtstart" title="20051005">October 5</abbr>-
97
+ <abbr class="dtend" title="20051008">7</abbr>,
98
+ at the <span class="location">Argent Hotel, San Francisco, CA</span>
99
+ </a>
100
+ </span>
101
+ },
102
+ :elecciones => %{
103
+ <div class="vevent">
104
+ <a class="url" href="http://yovoto.pehuen.org">
105
+ <abbr class="dtstart" title="20051211"> December 11, 2005 </abbr> -
106
+ <span class="summary"> Elecciones 2005 Chile - desde el exterior </span> - at
107
+ <span class="location"> Holanda </span> </a>
108
+ <div class="description"> Por el derecho a voto de los Chilenos en el Exterior </div>
109
+ </div>
110
+ },
111
+ :cc_italia => %{
112
+ <div class="vevent">
113
+ <a class="url" href="http://www.creativecommons.it/ccit2005/programma_new.html">
114
+ <abbr class="dtstart" title="20051119T0900++0100"> 19 Novembre, 2005 - 09:00 </abbr> -
115
+ <abbr class="dtend" title="20051119T2359++0100"> 23:59 </abbr> -
116
+ <span class="summary"> Creative Commons IT 2005 </span> - a
117
+ <span class="location"> Torino </span> </a><br />
118
+ <div class="description"> L&#8217;evento di Creative Commons Italia </div>
119
+ </div>
120
+ },
121
+ :eclipsecon => %{
122
+ <li class="vevent" id="205f1d146720b563dd726368389f3da7">
123
+ <abbr class="dtstart" title="2006-03-20T08:00:00Z">Monday 20. March 09:00</abbr> -
124
+ <abbr class="dtend" title="2006-03-23T19:00:00Z">Thursday 23. 20:00</abbr>
125
+
126
+ <a class="url" href="/community/events/205f1d146720b563dd726368389f3da7.html"><span class="summary">EclipseCon 2006</span></a>
127
+ <span class="location">Santa Clara, California</span>
128
+ <abbr class="dtstamp" style="display: none;" title="1970-01-01T00:33:26Z">1970-01-01T00:33:26Z</abbr>
129
+ <span class="uid" style="display: none;">205f1d146720b563dd726368389f3da7</span>
130
+ </li>
131
+ },
132
+ :meaningful_xhtml => %{
133
+ <td class="vevent" colspan="2" headers="guthrie t945">
134
+ <p>
135
+ <strong><a href="presenters.cfm#&Ccedil;elik">Tantek &Ccedil;elik</a></strong><br />
136
+ <em class="summary"><a href="http://tantek.com/presentations/2005/09/elements-of-xhtml/">The Elements of Meaningful XHTML</a></em><br />
137
+ <span class="description">Theme: Coding<br />
138
+ Audience: All<br />
139
+
140
+ Geek-o-meter rating: 3</span><br />
141
+ <a href="http://mp3.we05.com/podcast/mp3/we05-2-tantek-celik.mp3">PodCast</a> - Duration: 31:56 - File size: 7.31 MB
142
+ </p>
143
+ </td>
144
+ },
145
+ :pretzel_day => %{
146
+ <dl class="vevent">
147
+ <dt>
148
+ <span style="display: none" class="duration">P1D</span>
149
+ <abbr style="display: none" class="dtstart" title="20060426">Wednesday, April 26th 2006</abbr>
150
+ <a class="summary" href="createvcal.php?summary=National%20Pretzel%20Day&amp;description=Eat%20your%20heart%20out%20on%20pretzels%2C%20but%20be%20sure%20not%20to%20choke.&amp;date=20060426&amp;freq=YEARLY&amp;interval=1&amp;bymonth=4" title="National Pretzel Day">National Pretzel Day</a>
151
+ </dt>
152
+ <dd class="description">Eat your heart out on pretzels, but be sure not to choke.</dd>
153
+ </dl>
154
+ }
155
+ }
156
+
157
+ end
@@ -0,0 +1,438 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+ require 'uformats/hcard'
3
+
4
+ class HCardTest < Test::Unit::TestCase
5
+
6
+ def test_should_parse_sample_cafe_borrone
7
+ c = hcard(:cafe_borrone)
8
+ assert_equal('Cafe Borrone', c.fn)
9
+ assert_equal('1010 El Camino Real', c.adr.street_address)
10
+ assert_equal('San Francisco', c.adr.locality)
11
+ assert_equal('CA', c.adr.region)
12
+ assert_equal('94025', c.adr.postal_code)
13
+ assert_equal('+1-650-327-0830', c.tel.value)
14
+ assert_equal('http://cafeborrone.com', c.url)
15
+ end
16
+
17
+ def test_should_parse_sample_chn
18
+ c = hcard(:chn)
19
+ assert_not_nil(c)
20
+ assert_equal('FN', c.fn)
21
+ assert_equal('user@example.com', c.email.value)
22
+ end
23
+
24
+ def test_should_parse_sample_sf
25
+ c = hcard(:sf)
26
+ assert_not_nil(c)
27
+ assert_equal('user@example.com', c.email.value)
28
+ end
29
+
30
+ def test_should_handle_org_properly
31
+ c_unoptimized = hcard(:org_unoptimized)
32
+ c_optimized = hcard(:org_optimized)
33
+ assert_equal('American Snake Oil Company', c_unoptimized.org.organization_name)
34
+ assert_equal('American Snake Oil Company', c_optimized.org.organization_name)
35
+ end
36
+
37
+ def test_should_perform_n_optimization
38
+ c1 = hcard(:n_optimized_1)
39
+ assert_equal('John', c1.n.given_name)
40
+ assert_equal('Doe', c1.n.family_name)
41
+ c2 = hcard(:n_optimized_2)
42
+ assert_equal('John', c2.n.given_name)
43
+ assert_equal('Doe', c2.n.family_name)
44
+ c3 = hcard(:n_optimized_3)
45
+ assert_equal('J', c3.n.given_name)
46
+ assert_equal('Doe', c3.n.family_name)
47
+ c4 = hcard(:n_optimized_4)
48
+ assert_equal('J', c4.n.given_name)
49
+ assert_equal('Doe', c4.n.family_name)
50
+ c5 = hcard(:n_optimized_5)
51
+ assert_equal('J', c5.n.given_name)
52
+ assert_equal('Doe', c5.n.family_name)
53
+ end
54
+
55
+ def test_should_parse_sample_w3_normal
56
+ c = hcard(:w3_normal)
57
+ assert_equal('John', c.n.given_name)
58
+ assert_equal('Doe', c.n.family_name)
59
+ assert_equal('John Doe', c.fn)
60
+ end
61
+
62
+ def test_should_parse_sample_w3_two_emails
63
+ c = hcard(:w3_two_emails)
64
+ assert_equal('John', c.n.given_name)
65
+ assert_equal('Doe', c.n.family_name)
66
+ assert_equal('John Doe', c.fn)
67
+ assert_equal('doe@example', c.emails[0].value)
68
+ assert_equal('john.doe@example', c.emails[1].value)
69
+ end
70
+
71
+ def test_should_parse_sample_w3_implied_n
72
+ c = hcard(:w3_implied_n)
73
+ assert_equal('John', c.n.given_name)
74
+ assert_equal('Doe', c.n.family_name)
75
+ assert_equal('John Doe', c.fn)
76
+ end
77
+
78
+ def test_should_parse_sample_w3_with_id
79
+ c = hcard(:w3_with_id)
80
+ assert_equal('John', c.n.given_name)
81
+ assert_equal('Doe', c.n.family_name)
82
+ assert_equal('John Doe', c.fn)
83
+ end
84
+
85
+ def test_should_parse_sample_w3_relative_link
86
+ c = hcard(:w3_relative_link, 'http://dev.w3.org/cvsweb/2001/palmagent/hcardTest.html')
87
+ assert_equal('John', c.n.given_name)
88
+ assert_equal('Doe', c.n.family_name)
89
+ assert_equal('John Doe', c.fn)
90
+ assert_equal('http://dev.w3.org/cvsweb/2001/palmagent/doe-pg', c.url)
91
+ end
92
+
93
+ def test_should_parse_sample_w3_with_nickname
94
+ c = hcard(:w3_with_nickname)
95
+ assert_equal('John', c.n.given_name)
96
+ assert_equal('Doe', c.n.family_name)
97
+ assert_equal('Johnny', c.nickname)
98
+ assert_equal('John Doe', c.fn)
99
+ end
100
+
101
+ def test_should_parse_sample_w3_tabs_in_class_fields
102
+ c = hcard(:w3_tabs_in_class_fields)
103
+ assert_equal('John', c.n.given_name)
104
+ assert_equal('Doe2', c.n.family_name)
105
+ assert_equal('John Doe2', c.fn)
106
+ end
107
+
108
+ def test_should_parse_sample_w3_lfs_in_class_fields
109
+ c = hcard(:w3_lfs_in_class_fields)
110
+ assert_equal('John', c.n.given_name)
111
+ assert_equal('Doe3', c.n.family_name)
112
+ assert_equal('John Doe3', c.fn)
113
+ end
114
+
115
+ def test_should_parse_sample_w3_crs_in_class_fields
116
+ c = hcard(:w3_crs_in_class_fields)
117
+ assert_equal('John', c.n.given_name)
118
+ assert_equal('Doe3', c.n.family_name)
119
+ assert_equal('John Doe3', c.fn)
120
+ end
121
+
122
+ def test_should_parse_sample_w3_which_name
123
+ c = hcard(:w3_which_name)
124
+ assert_equal('Joe', c.n.given_name)
125
+ assert_equal('Name2', c.n.family_name)
126
+ assert_equal('Joe Name2', c.fn)
127
+ end
128
+
129
+ def test_should_parse_sample_w3_lang_dominating
130
+ c = hcard(:w3_lang_dominating)
131
+ assert_equal('John', c.n.given_name)
132
+ assert_equal('Doe4', c.n.family_name)
133
+ assert_equal('John Doe4', c.fn)
134
+ end
135
+
136
+ def test_should_parse_sample_w3_two_langs_dominating
137
+ c = hcard(:w3_two_langs_dominating)
138
+ assert_equal('John', c.n.given_name)
139
+ assert_equal('Doe4', c.n.family_name)
140
+ assert_equal('John Doe4', c.fn)
141
+ end
142
+
143
+ def test_should_parse_sample_w3_xml_lang_on_name
144
+ c = hcard(:w3_xml_lang_on_name)
145
+ assert_equal('John', c.n.given_name)
146
+ assert_equal('Doe5', c.n.family_name)
147
+ assert_equal('John Doe5', c.fn)
148
+ end
149
+
150
+ def test_should_parse_sample_w3_commas_in_photo_uri
151
+ c = hcard(:w3_commas_in_photo_uri)
152
+ assert_equal('Comma', c.n.given_name)
153
+ assert_equal('Photo', c.n.family_name)
154
+ assert_equal('Comma Photo', c.fn)
155
+ assert_equal('http://example/uri,with,commas', c.photo)
156
+ end
157
+
158
+ def test_parse_sample_dc
159
+ c = hcard(:dc)
160
+ assert_equal('Joe User', c.fn)
161
+ assert_equal('Joe', c.n.given_name)
162
+ assert_equal('User', c.n.family_name)
163
+ assert_equal('http://www.example.com/people/joe.jpg', c.photo)
164
+ assert_equal('123 Something Square', c.adr.street_address)
165
+ assert_equal('Cambridge', c.adr.locality)
166
+ assert_equal('MA', c.adr.region)
167
+ assert_equal('01234', c.adr.postal_code)
168
+ assert_equal('W3C/MIT', c.org.organization_name)
169
+ assert_equal('555-5555', c.tel.value)
170
+ end
171
+
172
+ def test_should_parse_sample_jfr
173
+ c = hcard(:jfr)
174
+ assert_equal('Joe X. User', c.fn)
175
+ assert_equal('Joe X.', c.n.given_name)
176
+ assert_equal('User', c.n.family_name)
177
+ assert_equal('Somethingstrasse 123', c.adr.street_address)
178
+ assert_equal('Muenster', c.adr.locality)
179
+ assert_equal('NW', c.adr.region)
180
+ assert_equal('Germany', c.adr.country_name)
181
+ assert_equal('+49 555 5555555', c.tels[0].value)
182
+ assert_equal('+49 555 6666666', c.tels[1].value)
183
+ assert_equal('joe.user@example.com', c.email.value)
184
+ assert_equal('Example GmbH', c.org.organization_name)
185
+ assert_equal('http://example.com/tech/webdav/', c.url)
186
+ end
187
+
188
+ def hcard(name, url=nil)
189
+ Microformats::HCard.first(SOURCES[name], url)
190
+ end
191
+
192
+ SOURCES = {
193
+ :cafe_borrone => %{
194
+ <div class="item vcard">
195
+ <div class="fn org summary">Cafe Borrone</div>
196
+ <span class="adr">
197
+ <span class="street-address">1010 El Camino Real</span>,
198
+ <span class="locality">San Francisco</span>,
199
+ <span class="region">CA</span>
200
+ <span class="postal-code">94025</span>,
201
+ </span>
202
+ <span class="tel"><span class="voice work">+1-650-327-0830</span></span>;
203
+ <a class="url" href="http://cafeborrone.com">cafeborrone.com</a>
204
+ </div>},
205
+ :chn => %{
206
+ <dl class="data vcard">
207
+ <dt>Name:</dt>
208
+ <dd><span class="fn">FN</span></dd>
209
+ <dt title="Try the first ones first">E-Mail:</dt>
210
+ <dd><a class="email" href="mailto:user@example.com">user@example.com</a></dd>
211
+ </dl>
212
+ },
213
+ :n_optimized_1 => %{
214
+ <div class="vcard">
215
+ <div class="fn">John Doe</div>
216
+ </div>
217
+ },
218
+ :n_optimized_2 => %{
219
+ <div class="vcard">
220
+ <div class="fn">Doe, John</div>
221
+ </div>
222
+ },
223
+ :n_optimized_3 => %{
224
+ <div class="vcard">
225
+ <div class="fn">Doe, J</div>
226
+ </div>
227
+ },
228
+ :n_optimized_4 => %{
229
+ <div class="vcard">
230
+ <div class="fn">Doe J</div>
231
+ </div>
232
+ },
233
+ :n_optimized_5 => %{
234
+ <div class="vcard">
235
+ <div class="fn">Doe J.</div>
236
+ </div>
237
+ },
238
+ :org_optimized => %{
239
+ <tr class="vcard">
240
+ <td>
241
+ <a class="fn url" href="http://www.example.com/">John Doe</a>
242
+ </td>
243
+ <td class="title">Chairman and CEO</td>
244
+ <td class="org">American Snake Oil Company</td>
245
+ </tr>
246
+ },
247
+ :org_unoptimized => %{
248
+ <tr class="vcard">
249
+ <td>
250
+ <a class="fn url" href="http://www.example.com/">John Doe</a>
251
+ </td>
252
+ <td class="title">Chairman and CEO</td>
253
+ <td class="org organization_name">American Snake Oil Company</td>
254
+ </tr>
255
+ },
256
+ :sf => %{
257
+ <div class="vcard">
258
+ <div class="org">Company, LLC</div>
259
+ <div class="adr">
260
+ <div class="street-address">13 Acacia Ave.</div>
261
+ <div class="extended-address">Suite 9999-99</div>
262
+ <span class="locality">Altamonte Springs</span>,
263
+ <span class="region">FL</span>
264
+
265
+ <span class="postal-code">99999</span>
266
+ </div>
267
+ <div class="tel"><span class="type">voice</span>: <span class="value">(555) 555-1428</span></div>
268
+ <div class="tel"><span class="type">fax</span>: <span class="value">(555) 555-2962</span></div>
269
+ <div class="email"><a class="internet" href="mailto:user@example.com">user@example.com</a></div>
270
+ </div>
271
+ },
272
+ :w3_normal => %{
273
+ <div class="vcard">
274
+ <span class="fn">John Doe</span>
275
+ <span class="n">
276
+ <span class="given-name">John</span>
277
+ <span class="family-name">Doe</span>
278
+ </span>
279
+ <span class="note">normal card</span>
280
+ </div>
281
+ },
282
+ :w3_two_emails => %{
283
+ <div class="vcard">
284
+ <span class="fn">John Doe</span>
285
+ <span class="n">
286
+ <span class="given-name">John</span>
287
+ <span class="family-name">Doe</span>
288
+ </span>
289
+ <div class="email">doe@example</div>
290
+
291
+ <div class="email pref">john.doe@example</div>
292
+ <span class="note">card with 2 email addresses</span>
293
+ </div>
294
+ },
295
+ :w3_implied_n => %{
296
+ <div class="vcard">
297
+ <span class="fn">John Doe</span>
298
+ <span class="note">normal card, with implied N</span>
299
+ </div>
300
+ },
301
+ :w3_with_id => %{
302
+ <div class="vcard" id="thisOne">
303
+ <span class="fn">John Doe</span>
304
+ <span class="note">card with an ID</span>
305
+ </div>
306
+ },
307
+ :w3_relative_link => %{
308
+ <div class="vcard">
309
+ <a class="fn url" href="doe-pg">John Doe</a>
310
+
311
+ <span class="n">
312
+ <span class="given-name">John</span>
313
+ <span class="family-name">Doe</span>
314
+ </span>
315
+ <span class="note">card with relative link</span>
316
+ </div>
317
+ },
318
+ :w3_with_nickname => %{
319
+ <div class="vcard">
320
+ <span class="fn">John Doe</span>
321
+ <span class="n">
322
+ <span class="given-name">John</span>
323
+ <span class="family-name">Doe</span>
324
+ </span>
325
+ <span class="nickname">Johnny</span>
326
+ <span class="note">card with nickname.</span>
327
+ </div>
328
+ },
329
+ :w3_tabs_in_class_fields => %{
330
+ <div class="vcard ">
331
+ <span class="\tfn">John Doe2</span>
332
+ <span class="note">tabs in class fields</span>
333
+ </div>
334
+ },
335
+ :w3_lfs_in_class_fields => %{
336
+ <div class="vcard\nstuff">
337
+ <span class="\nfn">John Doe3</span>
338
+ <span class="note">LFs in class fields</span>
339
+ </div>
340
+ },
341
+ :w3_crs_in_class_fields => %{
342
+ <div class="vcard\rstuff">
343
+ <span class="\rfn">John Doe3</span>
344
+ <span class="note">CRs in class fields</span>
345
+ </div>
346
+ },
347
+ :w3_which_name => %{
348
+ <div class="vcard">
349
+ <a href="http://example/pg"
350
+ class="url fn" rel="contact" title="Joe Name1">Joe Name2</a>
351
+ <span class="note">which name counts?</span>
352
+ </div>
353
+ },
354
+ :w3_lang_dominating => %{
355
+ <div lang="es">
356
+ <div class="vcard">
357
+ <span class="fn">John Doe4</span>
358
+
359
+ <span class="note">lang dominating vcard</span>
360
+ </div>
361
+ </div>
362
+ },
363
+ :w3_two_langs_dominating => %{
364
+ <div lang="de">
365
+ <div lang="es">
366
+ <div class="vcard">
367
+ <span class="fn">John Doe4</span>
368
+ <span class="note">2langs dominating vcard</span>
369
+ </div>
370
+ </div>
371
+ </div>
372
+ },
373
+ :w3_xml_lang_on_name => %{
374
+ <div class="vcard">
375
+ <span class="fn" xml:lang="de">John Doe5</span>
376
+ <span class="note">xml:lang on name elt</span>
377
+ </div>
378
+ },
379
+ :w3_commas_in_photo_uri => %{
380
+ <div class="vcard">
381
+ <span class="fn">Comma Photo</span>
382
+ <span class="note">comma in photo URI</span>
383
+ <img src="http://example/uri,with,commas" alt="commas in photo uri"
384
+ class="photo"/>
385
+ </div>
386
+ },
387
+ :dc => %{
388
+ <div class="vcard">
389
+ <img style="float:left; margin-right:4px" src="http://www.example.com/people/joe.jpg" alt="photo" class="photo"/>
390
+ <a class="url fn" href="http://www.w3.org/">Joe User</a>
391
+ <div class="org">W3C/MIT</div>
392
+
393
+ <div class="adr">
394
+ <div class="street-address">123 Something Square</div>
395
+ <span class="locality">Cambridge</span>,
396
+ <span class="region">MA</span>
397
+ <span class="postal-code">01234</span>
398
+ </div>
399
+ <div class="tel">555-5555</div>
400
+
401
+ </div>
402
+ },
403
+ :jfr => %{
404
+ <address class="vcard">
405
+ <span class="vcardline"><span class="fn">Joe X. User</span>
406
+ <span class="n" style="display: none">
407
+ <span class="family-name">User</span>
408
+ <span class="given-name">Joe X.</span>
409
+
410
+ </span>
411
+ </span>
412
+ <span class="org vcardline">Example GmbH</span>
413
+ <span class="adr vcardline">
414
+ <span class="street street-address vcardline">Somethingstrasse 123</span>
415
+ <span class="vcardline">
416
+ <span class="locality">Muenster</span>, <span class="region">NW</span>&#160;<span class="postal-Code">55555</span>
417
+
418
+ </span>
419
+ <span class="country-name vcardline">Germany</span>
420
+ </span>
421
+ <span class="vcardline">Phone: <a href="tel:+495555555555">
422
+ <span class="tel"><span class="voice">+49 555 5555555</span></span>
423
+ </a></span>
424
+ <span class="vcardline">Fax: <a href="fax:+495556666666">
425
+
426
+ <span class="tel"><span class="fax">+49 555 6666666</span></span>
427
+ </a></span>
428
+ <span class="vcardline">EMail: <a href="mailto:joe.user@example.com">
429
+ <span class="email">joe.user@example.com</span></a>
430
+ </span>
431
+ <span class="vcardline">URI: <a href="http://example.com/tech/webdav/"
432
+ class="url">http://example.com/tech/webdav/</a></span>
433
+
434
+ </address>
435
+ }
436
+ }
437
+
438
+ end