index.html
69.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Widget Updates
</title>
<style type="text/css">
/*Editor CSS */
@import url("http://www.w3.org/StyleSheets/TR/base");
</style>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<style type="text/css">
code { font-family: monospace; }
span.hilite { color: red; /* font-weight: bold */ }
ul.rule,ol.rule { margin-top:0.6em }
ul.rule li, ol.rule li { margin-bottom:0.6em }
</style>
<style type="text/css">
/*****************************************************************
* ReSpec CSS
* Robin Berjon (robin at berjon dot com)
* v0.05 - 2009-07-31
*****************************************************************/
/* --- INLINES --- */
em.rfc2119 {
text-transform: lowercase;
font-variant: small-caps;
font-style: normal;
color: #900;
}
h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: medium solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: medium dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
code {
color: #ff4500;
}
/* --- WEB IDL --- */
pre.idl {
border-top: 1px solid #90b8de;
border-bottom: 1px solid #90b8de;
padding: 1em;
line-height: 120%;
}
pre.idl::before {
content: "WebIDL";
display: block;
width: 150px;
background: #90b8de;
color: #fff;
font-family: initial;
padding: 3px;
font-weight: bold;
margin: -1em 0 1em -1em;
}
.idlType {
color: #ff4500;
font-weight: bold;
text-decoration: none;
}
/*.idlModule*/
/*.idlModuleID*/
/*.idlInterface*/
.idlInterfaceID {
font-weight: bold;
color: #005a9c;
}
.idlSuperclass {
font-style: italic;
color: #005a9c;
}
/*.idlAttribute*/
.idlAttrType, .idlFieldType {
color: #005a9c;
}
.idlAttrName, .idlFieldName {
color: #ff4500;
}
.idlAttrName a, .idlFieldName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlMethod*/
.idlMethType {
color: #005a9c;
}
.idlMethName {
color: #ff4500;
}
.idlMethName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlParam*/
.idlParamType {
color: #005a9c;
}
.idlParamName {
font-style: italic;
}
.extAttr {
color: #666;
}
/*.idlConst*/
.idlConstType {
color: #005a9c;
}
.idlConstName {
color: #ff4500;
}
.idlConstName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlException*/
.idlExceptionID {
font-weight: bold;
color: #c00;
}
.idlTypedefID, .idlTypedefType {
color: #005a9c;
}
.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
color: #c00;
font-weight: normal;
}
.excName a {
font-family: monospace;
}
.idlRaises a.idlType, .excName a.idlType {
border-bottom: 1px dotted #c00;
}
.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
width: 45px;
text-align: center;
}
.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
.idlImplements a {
font-weight: bold;
}
dl.attributes, dl.methods, dl.constants, dl.fields {
margin-left: 2em;
}
.attributes dt, .methods dt, .constants dt, .fields dt {
font-weight: normal;
}
.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
font-weight: bold;
color: #000;
font-family: monospace;
}
.attributes dt code, .fields dt code {
background: #ffffd2;
}
.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
color: #005a9c;
background: transparent;
font-family: inherit;
font-weight: normal;
font-style: italic;
}
.methods dt code {
background: #d9e6f8;
}
.constants dt code {
background: #ddffd2;
}
.attributes dd, .methods dd, .constants dd, .fields dd {
margin-bottom: 1em;
}
table.parameters, table.exceptions {
border-spacing: 0;
border-collapse: collapse;
margin: 0.5em 0;
width: 100%;
}
table.parameters { border-bottom: 1px solid #90b8de; }
table.exceptions { border-bottom: 1px solid #deb890; }
.parameters th, .exceptions th {
color: #fff;
padding: 3px 5px;
text-align: left;
font-family: initial;
font-weight: normal;
text-shadow: #666 1px 1px 0;
}
.parameters th { background: #90b8de; }
.exceptions th { background: #deb890; }
.parameters td, .exceptions td {
padding: 3px 10px;
border-top: 1px solid #ddd;
vertical-align: top;
}
.parameters tr:first-child td, .exceptions tr:first-child td {
border-top: none;
}
.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
width: 100px;
}
.parameters td.prmType {
width: 120px;
}
table.exceptions table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}
/* --- TOC --- */
.toc a {
text-decoration: none;
}
a .secno {
color: #000;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd, .section dl.eldef dd {
margin-bottom: 0;
}
/* --- EXAMPLES --- */
pre.example {
border-top: 1px solid #ff4500;
border-bottom: 1px solid #ff4500;
padding: 1em;
margin-top: 1em;
}
pre.example::before {
content: "Example";
display: block;
width: 150px;
background: #ff4500;
color: #fff;
font-family: initial;
padding: 3px;
font-weight: bold;
margin: -1em 0 1em -1em;
}
/* --- EDITORIAL NOTES --- */
.issue {
padding: 1em;
margin: 1em 0em 0em;
border: 1px solid #f00;
background: #ffc;
}
.issue::before {
content: "Issue";
display: block;
width: 150px;
margin: -1.5em 0 0.5em 0;
font-weight: bold;
border: 1px solid #f00;
background: #fff;
padding: 3px 1em;
}
.note {
margin: 1em 0em 0em;
padding: 1em;
border: 2px solid #cff6d9;
background: #e2fff0;
}
.note::before {
content: "Note";
display: block;
width: 150px;
margin: -1.5em 0 0.5em 0;
font-weight: bold;
border: 1px solid #cff6d9;
background: #fff;
padding: 3px 1em;
}
/* --- Best Practices --- */
div.practice {
border: solid #bebebe 1px;
margin: 2em 1em 1em 2em;
}
span.practicelab {
margin: 1.5em 0.5em 1em 1em;
font-weight: bold;
font-style: italic;
}
span.practicelab { background: #dfffff; }
span.practicelab {
position: relative;
padding: 0 0.5em;
top: -1.5em;
}
p.practicedesc {
margin: 1.5em 0.5em 1em 1em;
}
@media screen {
p.practicedesc {
position: relative;
top: -2em;
padding: 0;
margin: 1.5em 0.5em -1em 1em;
}
/* --- SYNTAX HIGHLIGHTING --- */
pre.sh_sourceCode {
background-color: white;
color: black;
font-style: normal;
font-weight: normal;
}
pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g., *, + */
pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
/* Predefined variables and functions (for instance glsl) */
pre.sh_sourceCode .sh_predef_var { color: #00008B; }
pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
/* for OOP */
pre.sh_sourceCode .sh_classname { color: teal; }
/* line numbers (not yet implemented) */
pre.sh_sourceCode .sh_linenum { display: none; }
/* Internet related */
pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
/* for ChangeLog and Log files */
pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
/* for Prolog, Perl... */
pre.sh_sourceCode .sh_variable { color: #006400; }
/* for LaTeX */
pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
pre.sh_sourceCode .sh_argument { color: #006400; }
pre.sh_sourceCode .sh_optionalargument { color: purple; }
pre.sh_sourceCode .sh_math { color: orange; }
pre.sh_sourceCode .sh_bibtex { color: blue; }
/* for diffs */
pre.sh_sourceCode .sh_oldfile { color: orange; }
pre.sh_sourceCode .sh_newfile { color: #006400; }
pre.sh_sourceCode .sh_difflines { color: blue; }
/* for css */
pre.sh_sourceCode .sh_selector { color: purple; }
pre.sh_sourceCode .sh_property { color: blue; }
pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
/* other */
pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
pre.sh_sourceCode .sh_paren { color: red; }
pre.sh_sourceCode .sh_attribute { color: #006400; }
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text/css" charset="utf-8" /></head>
<body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a></p><h1 class="title" id="title">Widget Updates</h1><h2 id="w3c-working-draft-28-september-2010">W3C Working Draft 28 September 2010</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2010/WD-widgets-updates-20100928/">http://www.w3.org/TR/2010/WD-widgets-updates-20100928/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/widgets-updates/">http://www.w3.org/TR/widgets-updates/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2006/waf/widgets-updates/">http://dev.w3.org/2006/waf/widgets-updates/</a></dd><dt>Previous version:</dt><dd><a href="http://www.w3.org/TR/2010/WD-widgets-updates-20100413/">http://www.w3.org/TR/2010/WD-widgets-updates-20100413/</a></dd><dt>Editors:</dt><dd><a href="http://datadriven.com.au/">Marcos Cáceres</a>, <a href="http://opera.com/">Opera Software</a></dd>
<dd><a href="http://richt.me/">Richard Tibbett</a>, <a href="http://opera.com/">Opera Software</a></dd>
<dd><a href="http://berjon.com/">Robin Berjon</a>, <a href="http://vodafone.com/">Vodafone</a></dd>
</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr /></div>
<div id="abstract" class="introductory section"><h2>Abstract</h2>
<p>
This specification defines a process and a document format to allow a <a href="#dfn-user-agent" class="internalDFN">user agent</a> to update an installed widget package with
a different version of a widget package. A widget cannot update itself; instead, a widget relies on the user agent to manage the
update process. A user agent can perform an update over HTTP and from non-HTTP sources (e.g., directly from a device's memory
card or hard disk).
</p>
</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
<p class="note">
<strong>Implementers should be aware that this document is not stable and should not be implemented.</strong> Implementers who are
not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways. Vendors
interested in implementing this document before it eventually reaches the Candidate Recommendation stage should join the
group's public mailing list and take part in the discussions.
</p>
<p>
User agents that wish to extend this specification in any way are encouraged to discuss their extensions on a public forum, such as
<a href="mailto:public-webapps@w3.org">public-webapps</a> so their extensions can be considered for standardization.
</p>
<p>
This specification is part of the <a href="http://www.w3.org/2008/webapps/wiki/WidgetSpecs">Widgets Family of Specifications</a>.
</p>
<p>
This Specification takes into account the <a href="http://www.w3.org/2009/03/widgets-pag/pagreport.html">recommendations</a> from the <a href="http://www.w3.org/2009/03/widgets-pag/">Widget Updates Patent Advisory Group</a> and considering <a href="http://www.w3.org/2009/03/widgets-pag/prior-art.html">the large set of prior art</a> the PAG found.
</p>
<p>This document was published by the <a href="http://www.w3.org/2008/webapps/">Web Applications WG</a> as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to <a href="mailto:public-webapps@w3.org">public-webapps@w3.org</a> (<a href="mailto:public-webapps-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>). All feedback is welcome.</p><p>Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>
Introduction
</a></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">2. </span>Conformance</a></li><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">3. </span>
Definitions
</a><ul class="toc"><li class="tocline"><a href="#value-types" class="tocxref"><span class="secno">3.1 </span>
Value types
</a></li></ul></li><li class="tocline"><a href="#extensions-to-configuration-document" class="tocxref"><span class="secno">4. </span>
Extensions to Configuration Document
</a><ul class="toc"><li class="tocline"><a href="#the-update-description-element" class="tocxref"><span class="secno">4.1 </span>
The <code>update-description</code> Element
</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">4.1.1 </span>
Attributes
</a></li><li class="tocline"><a href="#usage-example" class="tocxref"><span class="secno">4.1.2 </span>
Usage example
</a></li></ul></li><li class="tocline"><a href="#processing" class="tocxref"><span class="secno">4.2 </span>
Processing <code>update-description</code> elements in the Configuration Document
</a></li></ul></li><li class="tocline"><a href="#update-description-document" class="tocxref"><span class="secno">5. </span>
Update Description Document
</a><ul class="toc"><li class="tocline"><a href="#example-update-description-document" class="tocxref"><span class="secno">5.1 </span>
Example Update Description Document
</a></li><li class="tocline"><a href="#namespace" class="tocxref"><span class="secno">5.2 </span>
Namespace
</a></li><li class="tocline"><a href="#the-update-info-element" class="tocxref"><span class="secno">5.3 </span>
The <code>update-info</code> Element
</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">5.3.1 </span>
Attributes
</a></li><li class="tocline"><a href="#usage-example-1" class="tocxref"><span class="secno">5.3.2 </span>
Usage example
</a></li></ul></li><li class="tocline"><a href="#the-details-element" class="tocxref"><span class="secno">5.4 </span>
The <code>details</code> Element
</a><ul class="toc"><li class="tocline"><a href="#usage-example-2" class="tocxref"><span class="secno">5.4.1 </span>
Usage example
</a></li></ul></li></ul></li><li class="tocline"><a href="#acquiring-an-update-description-document" class="tocxref"><span class="secno">6. </span>
Acquiring an Update Description Document
</a></li><li class="tocline"><a href="#processing-an-update-description-document" class="tocxref"><span class="secno">7. </span>
Processing an Update Description Document
</a></li><li class="tocline"><a href="#verifying-and-installing-an-update" class="tocxref"><span class="secno">8. </span>
Verifying and Installing an Update
</a></li><li class="tocline"><a href="#security-considerations" class="tocxref"><span class="secno">9. </span>
Security Considerations
</a></li><li class="tocline"><a href="#design-goals-and-requirements" class="tocxref"><span class="secno">A. </span>
Design Goals and Requirements
</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>
Acknowledgements
</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div>
<div class="informative section" id="introduction">
<!-- OddPage -->
<h2><span class="secno">1. </span>
Introduction
</h2><p><em>This section is non-normative.</em></p>
<p>
There are a multitude of reasons why authors might want to update a widget including addressing security vulnerabilities, making
performance enhancements, and adding new features. Sometimes authors may even want to revert back to a previous version of a
widget, if it is found that a newly deployed version of a widget contains issues or vulnerabilities.
</p>
<p>
To facilitate the process of updating widgets, this specification introduces an XML element, called
<code>update-description</code>, that is included into a <a href="#dfn-configuration-document" class="internalDFN">configuration document</a> of a widget. This specificaiton also introduces a new XML vocabulary, called an <a href="#dfn-update-description-document" class="internalDFN">update
description document</a>. The <code>update-description</code> element provides an author with a means to point to an <a href="#dfn-update-description-document" class="internalDFN">update description
document</a>. An <a href="#dfn-update-description-document" class="internalDFN">update description document</a> is metadata about an widget update including:
</p>
<ul>
<li>
<p>
a means to describe the purpose of the update.
</p>
</li>
<li>
<p>
a means to indicate the version number of the <a href="#dfn-potential-update" class="internalDFN">potential update</a>.
</p>
</li>
<li>
<p>
a link to where the updated widget package can be retrieved from.
</p>
</li>
</ul>
<p>
If a <a href="#dfn-user-agent" class="internalDFN">user agent</a> determines, via the <a>strategies defined in this specification</a>, that two widget packages are not the
same version, and if the user consents, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> will attempt to replace the currently installed widget package with a
<a href="#dfn-potential-update" class="internalDFN">potential update</a>. Updates are designed to retain any locally stored data, so to protect end-users from losing data that a
widget may have stored at runtime.
</p>
<p>This specification also defines the rules that govern the interactions between the user agent, the <a href="#dfn-update-description-document" class="internalDFN">update description document</a>, and the updated widget. </p>
</div>
<div id="conformance" class="section">
<!-- OddPage -->
<h2><span class="secno">2. </span>Conformance</h2><p>As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p>
<p>The key words <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>, <em class="rfc2119" title="may">may</em>, and <em class="rfc2119" title="optional">optional</em> in this specification are to be interpreted as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2119">RFC2119</a></cite>].</p>
<p>
This specification defines conformance requirements for a single class of product: <a title="user agent" href="#dfn-user-agent" class="internalDFN">user agents</a>.
</p>
</div>
<div id="definitions" class="section">
<!-- OddPage -->
<h2><span class="secno">3. </span>
Definitions
</h2>
<p>
The concepts of a <dfn class="external" id="dfn-widget-package">widget package</dfn> and a <dfn class="external" id="dfn-configuration-document">configuration document</dfn> are defined in the [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] specification.
</p>
<p>
A <dfn id="dfn-user-agent">user agent</dfn> is an implementation of this specification that also implements the [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] specification and its
dependencies.
</p>
<p>
An <dfn id="dfn-installed-widget">installed widget</dfn> is a <span>widget package</span> that has been correctly installed on a <a href="#dfn-user-agent" class="internalDFN">user agent</a>.
</p>
<p>
An <dfn id="dfn-update-description-source">update description source</dfn> is the URI referenced by the <code>href</code> attribute of an
<code>update-description</code> element of an <a title="installed widget" href="#dfn-installed-widget" class="internalDFN">installed widget's</a> <a href="#dfn-configuration-document" class="internalDFN">configuration document</a>.
</p>
<p>
An <dfn id="dfn-update-description-document">update description document</dfn> is an [<cite><a class="bibref" rel="biblioentry" href="#bib-XML10">XML10</a></cite>] document that has a <code>update-info</code> element at its root.
</p>
<p>
An <dfn id="dfn-update-source">update source</dfn> is the URI referenced by the <code>src</code> attribute of an <code>update-info</code> element of an
<a href="#dfn-update-description-document" class="internalDFN">update description document</a>.
</p>
<p>
A <dfn id="dfn-potential-update">potential update</dfn> is a resource acquired via HTTP from an <a href="#dfn-update-source" class="internalDFN">update source</a> or from local media.
</p>
<p>
The <dfn id="dfn-widget-update-process">widget update process</dfn> is a multi-step process whereby a <a href="#dfn-user-agent" class="internalDFN">user agent</a> acquires a <a href="#dfn-potential-update" class="internalDFN">potential update</a>,
performs the <a href="#dfn-rule-for-verifying-a-widget-update" class="internalDFN">rule for verifying a widget update</a>, and then proceeds to <a href="#dfn-install-the-widget-package" class="internalDFN">install the widget package</a>.
</p>
<p>
The <dfn id="dfn-identity">identity</dfn> of a <a href="#dfn-widget-package" class="internalDFN">widget package</a> is determined by the <code>id</code> attribute of the <code>widget</code>
element declared by an author in the <a href="#dfn-configuration-document" class="internalDFN">configuration document</a> of a <a href="#dfn-widget-package" class="internalDFN">widget package</a>.
</p>
<p>
The <dfn id="dfn-version">version</dfn> of a <a href="#dfn-widget-package" class="internalDFN">widget package</a> is determined by the <code>version</code> attribute of the <code>widget</code>
element declared by an author in the <a href="#dfn-configuration-document" class="internalDFN">configuration document</a> of a <a href="#dfn-widget-package" class="internalDFN">widget package</a>.
</p>
<p>
An <dfn id="dfn-incumbent-widget">incumbent widget</dfn> is an <a href="#dfn-installed-widget" class="internalDFN">installed widget</a> that is determined to have the same <a href="#dfn-identity" class="internalDFN">identity</a> as the
<a href="#dfn-potential-update" class="internalDFN">potential update</a>.
</p>
<p>
An <a href="#dfn-installed-widget" class="internalDFN">installed widget</a> is said to be <dfn id="dfn-up-to-date">up-to-date</dfn> if a <a href="#dfn-user-agent" class="internalDFN">user agent</a> determins that an <a href="#dfn-incumbent-widget" class="internalDFN">incumbent widget</a> does not need
updating.
</p>
<p>
A <dfn id="dfn-failure-notification">failure notification</dfn> is an optional message emitted by the <a href="#dfn-user-agent" class="internalDFN">user agent</a> to indicate to the user that a <a>widget
update</a> has failed.
</p>
<p>
Note: This specification does not define the means or format of a <a href="#dfn-failure-notification" class="internalDFN">failure notification</a>, which is left up to implementers.
</p>
<div id="value-types" class="section">
<h3><span class="secno">3.1 </span>
Value types
</h3>
<p>
The <a class="externalDFN" title="space character">space characters</a>, <a class="externalDFN">valid URI</a>, and <a class="externalDFN">valid version-tag</a> are defined in the <cite>Widget Packaging and Configuration</cite> specification
[<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>].
</p>
</div>
</div>
<div id="extensions-to-configuration-document" class="section">
<!-- OddPage -->
<h2><span class="secno">4. </span>
Extensions to Configuration Document
</h2>
As stated above, this specification introduces a new element to the <a href="#dfn-configuration-document" class="internalDFN">configuration document</a> defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>]. This new element is defined below.
<div id="the-update-description-element" class="section">
<h3><span class="secno">4.1 </span>
The <code>update-description</code> Element
</h3>
<p>
The <code>update-description</code> element points, via the <code>href</code> attribute, to an <a href="#dfn-update-description-document" class="internalDFN">update description
document</a>.
</p>
<p>
The <code>update-description</code> element is in the <code>http://www.w3.org/ns/widgets</code> namespace as defined in
[<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>].
</p>
<dl class="eldef">
<dt>
Context in which this element is used:
</dt>
<dd>
As a child of the <code>widget</code> element defined in the [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] specification.
</dd>
<dt>
Content model:
</dt>
<dd>
Empty.
</dd>
<dt>
Occurrences:
</dt>
<dd>
Zero or one.
</dd>
<dt>
Expected children:
</dt>
<dd>
None.
</dd>
<dt>
Localizable via <code>xml:lang</code>:
</dt>
<dd>
No.
</dd>
</dl>
<div id="attributes" class="section">
<h4><span class="secno">4.1.1 </span>
Attributes
</h4>
<dl class="attrs">
<dt>
<code><dfn id="dfn-href">href</dfn></code>
</dt>
<dd>
A <span>URI attribute</span> that points to the location of an <a href="#dfn-update-description-document" class="internalDFN">update description document</a>.
</dd>
</dl>
</div>
<div id="usage-example" class="section">
<h4><span class="secno">4.1.2 </span>
Usage example
</h4>
<p>
This example shows the expected usage of the <code>update-description</code> element.
</p>
<pre class="example">
<widget xmlns ="http://www.w3.org/ns/widgets"
id ="http://example.com/my-widget"
version="1.0">
<span class="hilite"><update-description
href="http//example.com/update?widget=my-widget&amp;version=1.0"/></span>
</widget></pre>
</div>
</div>
<div id="processing" class="section">
<h3><span class="secno">4.2 </span>
Processing <code>update-description</code> elements in the Configuration Document
</h3>
<p>This section describes the <dfn id="dfn-algorithm-for-processing-the-update-description-element">algorithm for processing the update-description element</dfn>. </p>
<ol>
<li>A <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> add the following to the <a href="http://www.w3.org/TR/widgets/#table-of-configuration-defaults">Table of Configuration Defaults</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] during Step 3 - Set the Configuration defaults. </li>
</ol>
<table summary="The configuration defaults that a user agent must set prior to instantiation." class="simple">
<caption>
Table of Configuration Defaults (addendum)
</caption>
<thead>
<tr>
<th scope="col">
Variable
</th>
<th scope="col">
Type
</th>
<th scope="col">
Default Value
</th>
<th scope="col">
Overridden in
</th>
<th scope="col">
Description
</th>
</tr>
</thead>
<tbody><tr>
<th scope="row">
<dfn id="dfn-update-href"><var>update href</var></dfn>
</th>
<td>
URI
</td>
<td>
<code>null</code>
</td>
<td>
<a href="#processing">Processing <code>update-description</code> elements in the Configuration Document</a>
</td>
<td>
The URI for where an update description can be downloaded, corresponding to the <code>update-description</code> element's
<code>href</code> attribute.
</td>
</tr>
</tbody></table>
<p> </p>
<ol start="2">
<li> During <a href="http://www.w3.org/TR/widgets/#step-7--process-the-configuration-docume">Step 7 - Process the Configuration Document</a>, if this is not the first <a><code>update-description</code></a> element, then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a>ignore</a> this
element and its descendants. </li>
<li>If this is the first <a><code>update-description</code></a> element and the <code>href</code> attribute is used, and it is a
<a>valid uri</a>, then let <a href="#dfn-update-href" class="internalDFN"><var>update href</var></a> be the value of the <code>href</code> attribute.
Otherwise, this elements is in error and the user agent <em class="rfc2119" title="must">must</em> ignore this element. </li>
</ol>
</div>
</div>
<div id="update-description-document" class="section">
<!-- OddPage -->
<h2><span class="secno">5. </span>
Update Description Document
</h2>
<p>
Within an <a href="#dfn-update-description-document" class="internalDFN">update description document</a> an author declares, amongst other things, what's new or different in the
<a href="#dfn-potential-update" class="internalDFN">potential update</a>, the version that the widget will be updated to, and the URI from where the <a href="#dfn-user-agent" class="internalDFN">user agent</a> can retrieve
the <a href="#dfn-potential-update" class="internalDFN">potential update</a> (the <a href="#dfn-update-source" class="internalDFN">update source</a>).
</p>
<p>
The purpose of the <a href="#dfn-update-description-document" class="internalDFN">update description document</a> is to provide the details about a <a href="#dfn-potential-update" class="internalDFN">potential update</a>, including a
pointer to a HTTP resource that will act as the <a href="#dfn-potential-update" class="internalDFN">potential update</a>.
</p>
<p>
In order for a <a href="#dfn-user-agent" class="internalDFN">user agent</a> to retrieve and process an <a href="#dfn-update-description-document" class="internalDFN">update description document</a>, an author must initially declare a
valid URI for the <code>update-description</code> element in the installed <a href="#dfn-configuration-document" class="internalDFN">configuration document</a> (e.g.
<code><update-description href="https://example.com/myWidget/updates"/></code>).
</p>
<div id="example-update-description-document" class="section">
<h3><span class="secno">5.1 </span>
Example Update Description Document
</h3>
<p>
Below is an example of a typical <a href="#dfn-update-description-document" class="internalDFN">update description document</a>.
</p>
<pre class="example">
<span class="hilite"><update-info xmlns = "http://www.w3.org/ns/widgets"
src = "https://w.example.com/2.1/RC/app.wgt"
version = "RC2.1">
<details>
Now supporting X, Y and Z features!
</details>
</update-info></span></pre>
</div>
<div id="namespace" class="section">
<h3><span class="secno">5.2 </span>
Namespace
</h3>
<p>
All elements defined to be used in an <a href="#dfn-update-description-document" class="internalDFN">update description document</a> are in the <code>http://www.w3.org/ns/widgets</code>
namespace as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>].
</p>
</div>
<div id="the-update-info-element" class="section">
<h3><span class="secno">5.3 </span>
The <code>update-info</code> Element
</h3>
<p>
The <code>update-info</code> element is intended to provide metadata about the <a href="#dfn-potential-update" class="internalDFN">potential update</a>. In addition, it serves as
a container for the other elements; as such, it <em class="ct1">must</em> be used.
</p>
<dl class="eldef">
<dt>
Context in which this element <em class="rfc2119" title="may">may</em> be used:
</dt>
<dd>
The root element of an <a href="#dfn-update-description-document" class="internalDFN">update description document</a>.
</dd>
<dt>
Content model:
</dt>
<dd>
Zero or more <a class="internalDFN"><code>details</code></a> elements.
</dd>
<dt>
Occurrences:
</dt>
<dd>
Exactly one, at the root element of the document.
</dd>
<dt>
Expected children:
</dt>
<dd>
<a><code>details</code></a>.
</dd>
<dt>
Localizable via <code>xml:lang</code>:
</dt>
<dd>
No.
</dd>
</dl>
<div id="attributes-1" class="section">
<h4><span class="secno">5.3.1 </span>
Attributes
</h4>
<dl class="attrs">
<dt>
<code>version</code>
</dt>
<dd>
A <span>valid version tag</span> that denotes the version number of the <a href="#dfn-potential-update" class="internalDFN">potential update</a>.
</dd>
<dt>
<code>src</code>
</dt>
<dd>
A <span>valid URI</span> that references a <a href="#dfn-potential-update" class="internalDFN">potential update</a>. Over the wire, the potential update <em class="rfc2119" title="must">must</em> be labeled with
a correct widget media type (i.e. <code>application/widget</code>).
</dd>
</dl>
</div>
<div id="usage-example-1" class="section">
<h4><span class="secno">5.3.2 </span>
Usage example
</h4>
<p>
The example below shows how the <code>update-info</code> element can be used.
</p>
<pre class="example">
<span class="hilite"><update-info xmlns="http://www.w3.org/ns/widgets"
src="http://sometld/somewidget_0_3_BETA.wgt"
version="BETA 0.3"></span>
<span class="hilite"></update-info></span></pre>
</div>
</div>
<div id="the-details-element" class="section">
<h3><span class="secno">5.4 </span>
The <code>details</code> Element
</h3>
<p>
The <code>details</code> element represents a human-readable description of what differentiates this <a href="#dfn-potential-update" class="internalDFN">potential update</a> from
other versions.
</p>
<dl class="eldef">
<dt>
Context in which this element can be used:
</dt>
<dd>
Inside a <code>update-info</code> element.
</dd>
<dt>
Content model:
</dt>
<dd>
Anything.
</dd>
<dt>
Occurrences:
</dt>
<dd>
Zero or more.
</dd>
<dt>
Expected children:
</dt>
<dd>
Anything.
</dd>
<dt>
Localizable via <code>xml:lang</code>:
</dt>
<dd>
Yes.
</dd>
</dl>
<div id="usage-example-2" class="section">
<h4><span class="secno">5.4.1 </span>
Usage example
</h4>
<p>
The example below shows how the <code>details</code> element can be used.
</p>
<pre class="example">
<update-info xmlns="http://www.w3.org/ns/widgets"
src="http://foo.com/widget.wgt"
version="1.3.1">
<span class="hilite"><details>
This update tries to make 2010 a little bit less like "1984".
</details></span>
</update-info></pre>
</div>
</div>
</div>
<div id="acquiring-an-update-description-document" class="section">
<!-- OddPage -->
<h2><span class="secno">6. </span>
Acquiring an Update Description Document
</h2>
<p>
The <dfn id="dfn-authoritative-update-uri">authoritative update URI</dfn> is the <code>update source</code> of an installed widget's <a href="#dfn-configuration-document" class="internalDFN">configuration
document</a>.
</p>
<p>
A <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> support the capability to acquire an <a href="#dfn-update-description-document" class="internalDFN">update description document</a> over HTTP protocols. For non-HTTP
protocols, UAs should act in equivalent ways.
</p>
<p>
It is expected that user agents will perform a <a href="#dfn-widget-update-process" class="internalDFN">widget update process</a> asynchronously and periodically check for any available
updates. The timing of any <a href="#dfn-widget-update-process" class="internalDFN">widget update process</a> is an implementation detail left to the discretion of the implementer (e.g.
once a day or once a week).
</p>
<p>
To check for updates to a widget, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> issues a HTTP request towards the <a href="#dfn-authoritative-update-uri" class="internalDFN">authoritative update URI</a>.
</p>
<p>
The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> send the last known <var>ETag</var> response value, if available, in an <var>If-None-Match</var>
header.
</p>
<p>
The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> send an <var>If-Modified-Since</var> header indicating the time of the last check for an update from
the <a href="#dfn-user-agent" class="internalDFN">user agent</a>.
</p>
<p>
If the widget is displaying localized content, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> send an <var>Accept-Encoding</var> header representing
the widget's locale.
</p>
<p>
As data is received, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> will then act as follows.
</p>
<p>
The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> ignore any <var>Cache-Control</var> or <var>Pragma</var> header with a value of <code>no-cache</code>.
</p>
<p>
The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="should">should</em> honor the value of any <var>Expires</var> header when scheduling the next <a href="#dfn-widget-update-process" class="internalDFN">widget update process</a>
for the current <a href="#dfn-installed-widget" class="internalDFN">installed widget</a>.
</p>
<p>
HTTP 200 OK responses with a <var>Content-Type</var> header specifying the type <code>application/xml</code> <em class="rfc2119" title="must">must</em> be processed
according to the rules defined in <a href="#processing-an-update-description-document">Processing an Update Description Document</a>.
</p>
<p>
HTTP 200 OK responses that have a <var>Content-Type</var> other than <code>application/xml</code> <em class="rfc2119" title="must">must</em> cause the <a href="#dfn-user-agent" class="internalDFN">user agent</a>
to <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the widget update</a>.
</p>
<p>
HTTP 204 No Content, 205 Reset Content, and 304 Not Modified responses are equivalent to 200 OK responses with a
<var>Content-Type</var> other than <code>application/xml</code>.
</p>
<p>
Other HTTP response codes in the 2xx range <em class="rfc2119" title="must">must</em> <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the widget update</a>. They are, however, likely to indicate an error
has occurred somewhere and <em class="rfc2119" title="may">may</em> cause the <a href="#dfn-user-agent" class="internalDFN">user agent</a> to emit a warning.
</p>
<p>
HTTP 301 Moved Permanently, 302 Found, 303 See Other, and 307 Temporary Redirect responses <em class="rfc2119" title="must">must</em> cause the <a href="#dfn-user-agent" class="internalDFN">user agent</a> to
reconnect using the new server specified URL instead of the previously specified URL.
</p>
<p>
HTTP 305 Use Proxy, 401 Unauthorized, and 407 Proxy Authentication Required should be treated transparently as for any other
subresource.
</p>
<p>
Any other HTTP response code not listed here, and any network error that prevents the HTTP connection from being established in the
first place (e.g. DNS errors), <em class="rfc2119" title="must">must</em> cause the <a href="#dfn-user-agent" class="internalDFN">user agent</a> to <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the widget update</a>.
</p>
<p>
</p>
</div>
<div id="processing-an-update-description-document" class="section">
<!-- OddPage -->
<h2><span class="secno">7. </span>
Processing an Update Description Document
</h2>
<p>
A <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> assume the following defaults prior to processing an <a href="#dfn-update-description-document" class="internalDFN">update description document</a>:
</p>
<table summary="The update configuration defaults that a user agent must set prior to update description document processing." class="simple">
<caption>
<dfn id="dfn-update-defaults">Update Defaults</dfn>
</caption>
<tbody>
<tr>
<th scope="col">
Variable
</th>
<th scope="col">
Type
</th>
<th scope="col">
Default value
</th>
<th scope="col">
Description
</th>
</tr>
<tr>
<th scope="row">
<var>update-source</var>
</th>
<td>
URI
</td>
<td>
<code>null</code>
</td>
<td>
</td>
</tr>
<tr>
<th scope="row">
<var>version-tag</var>
</th>
<td>
DOMString
</td>
<td>
null
</td>
<td>
</td>
</tr>
<tr>
<th scope="row">
details
</th>
<td>
DOMString
</td>
<td>
null
</td>
<td>
</td>
</tr>
</tbody>
</table>
<p>
A <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> process an <a href="#dfn-update-description-document" class="internalDFN">update description document</a> according to the <a href="#dfn-rule-for-processing-an-update-description-document" class="internalDFN">rule for processing an update
description document</a>.
</p>
<p>
The following processing model is written with more concern for clarity over efficiency. As such, a <a href="#dfn-user-agent" class="internalDFN">user agent</a> can optimize
the processing model so long as the end result is indistinguishable from the result that would be obtained by the following the
specification.
</p>
<p>
The term <dfn id="in-error">in error</dfn>, typically used on an element or attribute, means that the element, attribute, or other construct
does not conform to the rules of this specification. Rules for exactly how a user agent needs to treat the erroneous construct are
always given when the term is used.
</p>
<p>
When an <dfn id="dfn-invalid-update-description-document">invalid update description document</dfn> is determined, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> terminate the current <a href="#dfn-widget-update-process" class="internalDFN">widget
update process</a>.
</p>
<p>
The <dfn id="dfn-rule-for-processing-an-update-description-document">rule for processing an update description document</dfn> is defined as follows:
</p>
<ol class="rule">
<li>
Let <var>doc</var> be the result of parsing the acquired <a href="#dfn-update-description-document" class="internalDFN">update description document</a> as a [<cite><a class="bibref" rel="biblioentry" href="#bib-DOM-LEVEL-3-CORE">DOM-LEVEL-3-CORE</a></cite>]
<code>Document</code> using a [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-NAMES">XML-NAMES</a></cite>]-aware parser. If the document is not well-formed [<cite><a class="bibref" rel="biblioentry" href="#bib-XML10">XML10</a></cite>], then treat this as an
<a href="#dfn-invalid-update-description-document" class="internalDFN">invalid update description document</a>.
</li>
<li>
Let <var>root element</var> be the <code>documentElement</code> of <var>doc</var>.
</li>
<li>
If the <var>root element</var> is not a <code>update-info</code> element in the widget namespace, then treat this <a href="#dfn-update-description-document" class="internalDFN">update
description document</a> as an <a href="#dfn-invalid-update-description-document" class="internalDFN">invalid update description document</a>.
</li>
<li>
If the <var>root element</var> is a <code>update-info</code> element:
<ol class="rule">
<li>
If the <code>version</code> attribute was used, and it is a <span>valid version-tag</span>, then let <var>version-tag</var>
be the value of <span><code>version</code></span>.
</li>
<li>
If no <code>version</code> attribute was used, or the value was <a href="#in-error" class="internalDFN">in error</a>, treat this as an <a href="#dfn-invalid-update-description-document" class="internalDFN">invalid update
description document</a>.
</li>
<li>
If the <code>src</code> attribute was used, and it is a <span><span>valid URI</span></span>, then let
<var>update-source</var> be the value of <code>src</code>.
</li>
<li>
If no <code>src</code> attribute was used, or the value was <a href="#in-error" class="internalDFN">in error</a>, treat this as an <a href="#dfn-invalid-update-description-document" class="internalDFN">invalid update description
document</a>.
</li>
</ol>
</li>
<li>
For any child element of the <var>root element</var>:
</li>
<li style="list-style: none">
<ol>
<li>
If the child element is a <code>details</code> element:
<ol class="rule">
<li>
If this is not the first <code>details</code> element, then the element is <a href="#in-error" class="internalDFN">in error</a> and <em class="rfc2119" title="must">must</em> be
<span>ignored</span>.
</li>
<li>
Let <var>details</var> be the result of applying the <a class="externalDFN" title="rule for getting text content">rule for getting text content</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] to this element.
</li>
</ol>
</li>
<li>
Otherwise it <em class="rfc2119" title="must">must</em> be ignored.
</li>
</ol>
</li>
</ol>
<p>
</p>
</div>
<div id="verifying-and-installing-an-update" class="section">
<!-- OddPage -->
<h2><span class="secno">8. </span>
Verifying and Installing an Update
</h2>
<p>When a <a href="#dfn-user-agent" class="internalDFN">user agent</a> is to <dfn id="dfn-install-the-widget-package">install the widget package</dfn> it <em class="rfc2119" title="must">must</em> remove any <a href="#dfn-incumbent-widget" class="internalDFN">incumbent widget</a> and
add the <a href="#dfn-potential-update" class="internalDFN">potential update</a> as an <a href="#dfn-installed-widget" class="internalDFN">installed widget</a>. </p>
<p>When a <a href="#dfn-user-agent" class="internalDFN">user agent</a> is to <dfn id="dfn-terminate-the-widget-update">terminate the widget update</dfn> the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> terminate the current <a href="#dfn-widget-update-process" class="internalDFN">widget
update process</a>. The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="may">may</em> emit a <a href="#dfn-failure-notification" class="internalDFN">failure notification</a> warning that the widget update has been
terminated. </p>
<p>
To verify and install a <a href="#dfn-potential-update" class="internalDFN">potential update</a> the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> apply the <a href="#dfn-rule-for-verifying-a-widget-update" class="internalDFN">rule for verifying a widget update</a>.
</p>
<p>
The <dfn id="dfn-rule-for-verifying-a-widget-update">rule for verifying a widget update</dfn> enables a <a href="#dfn-user-agent" class="internalDFN">user agent</a> to match and verify a <a href="#dfn-potential-update" class="internalDFN">potential update</a> -
acquired via HTTP or from local media - with an installed <a href="#dfn-widget-package" class="internalDFN">widget package</a> and is defined as follows:
</p>
<ol class="rule">
<li>
Apply the <a class="externalDFN" title="steps for processing a widget package">steps for processing a widget package</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] to the obtained
<a href="#dfn-potential-update" class="internalDFN">potential update</a>.
<ul class="rule">
<li>
If an <a class="externalDFN" title="invalid widget package">invalid widget package</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS">WIDGETS</a></cite>] is detected, the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate
the widget update</a>.
</li>
</ul>
</li>
<li>
If an <a href="#dfn-incumbent-widget" class="internalDFN">incumbent widget</a> could not be found then skip the rest of this rule and <a href="#dfn-install-the-widget-package" class="internalDFN">install the widget package</a>.
</li>
<li>
If the <a href="#dfn-incumbent-widget" class="internalDFN">incumbent widget</a> has the same <a href="#dfn-version" class="internalDFN">version</a> as the <a href="#dfn-potential-update" class="internalDFN">potential update</a> then the <a href="#dfn-installed-widget" class="internalDFN">installed widget</a> is
<a href="#dfn-up-to-date" class="internalDFN">up-to-date</a> and the <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the widget update</a>.
</li>
<li>
If the <a href="#dfn-potential-update" class="internalDFN">potential update</a> is determined to be a <a class="externalDFN" title="digitally-signed widget package">digitally-signed widget package</a> when applying the rules for <a class="externalDFN" title="rules for signature validation">signature validation</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>] then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> will act as
follows:
<ul class="rule">
<li>
If the <a href="#dfn-incumbent-widget" class="internalDFN">incumbent widget</a> is also determined to be a <a class="externalDFN" title="digitally-signed widget package">digitally-signed widget package</a> when applying the rules for <a class="externalDFN" title="rules for signature validation">signature validation</a> [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>] then the <a href="#dfn-user-agent" class="internalDFN">user agent</a> will act as
follows:
<ol class="rule">
<li>
Let <var>update_digsigs</var> be an enumerated list of all the digital signatures contained within the <a href="#dfn-potential-update" class="internalDFN">potential
update</a> obtained according to the rule to <a class="externalDFN" title="rules for locating and processing digital signatures">locate signature files in a widget package</a>
[<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>].
</li>
<li>
If any of the elements within <var>update_digsigs</var> were determined to be <a href="#in-error" class="internalDFN">in error</a> then <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the
widget update</a>.
</li>
<li>
Let <var>incumbent_digsigs</var> be an enumerated list of all the digital signatures contained within the <a href="#dfn-incumbent-widget" class="internalDFN">incumbent
widget</a> obtained according to the rule to <a class="externalDFN" title="rules for locating and processing digital signatures">locate signature files in a widget package</a>
[<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>].
</li>
<li>
If any of the elements within <var>incumbent_digsigs</var> were determined to be <a href="#in-error" class="internalDFN">in error</a> then <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the
widget update</a>. This is, however, likely to indicate an error has occurred somewhere in the installed <a href="#dfn-widget-package" class="internalDFN">widget
package</a> processing and may cause the <a href="#dfn-user-agent" class="internalDFN">user agent</a> to emit a warning.
</li>
</ol>
<p>
Note: The decision of which (if any) <a class="externalDFN">distributor signatures</a> are to be validated and whether the <a class="externalDFN">author signature</a> is to be validated is out of scope [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>].
</p>
<ol start="5" class="rule">
<li>
For each <var>update_signature</var> to be validated in <var>update_digsigs</var>:
<ol class="rule">
<li>
Let <var>digSigsMatch</var> be the result of comparing the <code>dsp:Identifier</code> value [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-DIGSIG">WIDGETS-DIGSIG</a></cite>] from <var>update_signature</var> with the same
value obtained from the associated <var>incumbent_signature</var> within <var>incumbent_digsigs</var>.
</li>
<li>
If <var>digSigsMatch</var> is false then <a href="#dfn-terminate-the-widget-update" class="internalDFN">terminate the widget update</a>.
</li>
</ol>
</li>
</ol>
</li>
</ul>
</li>
<li>
The <a href="#dfn-user-agent" class="internalDFN">user agent</a> <em class="rfc2119" title="must">must</em> <a href="#dfn-install-the-widget-package" class="internalDFN">install the widget package</a>.
</li>
</ol>
</div>
<div id="security-considerations" class="section">
<!-- OddPage -->
<h2><span class="secno">9. </span>
Security Considerations
</h2>
<p>
Because an <a href="#dfn-update-description-document" class="internalDFN">update description document</a> is not self-contained, it is conceivable that the update model could be subject to a
man-in-the-middle attack, as with any unencrypted requests performed over [<cite><a class="bibref" rel="biblioentry" href="#bib-HTTP11">HTTP11</a></cite>]. For this reason, it is <em class="rfc2119" title="recommended">recommended</em> that, for
widgets that have not been digitally signed, updates are always performed over [<cite><a class="bibref" rel="biblioentry" href="#bib-HTTP-TLS">HTTP-TLS</a></cite>].
</p>
<p>
Another means of protection is for authors to always digitally sign their widget resources. During an update, the <a href="#dfn-user-agent" class="internalDFN">user agent</a>
will then validate the signature before installation, ensuring that a widget resource's identity and integrity was maintained
over the network.
</p>
<p>
Without the availability of a digitally signed <a href="#dfn-installed-widget" class="internalDFN">installed widget</a>, it is extremely easy to overwrite a widget resource with
another (potentially malicious) widget resource. Therefore it is <em class="rfc2119" title="recommended">recommended</em> that a <a href="#dfn-user-agent" class="internalDFN">user agent</a> only allow updates to a
signed <a href="#dfn-installed-widget" class="internalDFN">installed widget</a> or to a non-signed <a href="#dfn-installed-widget" class="internalDFN">installed widget</a> only from a <a href="#dfn-potential-update" class="internalDFN">potential update</a> obtained via its
<a href="#dfn-authoritative-update-uri" class="internalDFN">authoritative update URI</a>.
</p>
</div>
<div class="appendix informative section" id="design-goals-and-requirements">
<!-- OddPage -->
<h2><span class="secno">A. </span>
Design Goals and Requirements
</h2><p><em>This section is non-normative.</em></p>
<p>
This document addresses the <a href="http://www.w3.org/TR/widgets-reqs/#remote-and-local-updates">Remote and Local Updates</a> the requirement of the 30 April
2009 Working Draft of the <cite>Widgets 1.0: Requirements Document</cite> (see [<cite><a class="bibref" rel="biblioentry" href="#bib-WIDGETS-REQS">WIDGETS-REQS</a></cite>]).
</p>
</div>
<div class="appendix section" id="acknowledgements">
<!-- OddPage -->
<h2><span class="secno">B. </span>
Acknowledgements
</h2>
<p>
The editors would like to thank the following contributors (in no particular order): Raine Hillebrand.
</p>
</div>
<div id="references" class="appendix section">
<!-- OddPage -->
<h2><span class="secno">C. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-DOM-LEVEL-3-CORE">[DOM-LEVEL-3-CORE]</dt><dd>Gavin Nicol; et al. <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407"><cite>Document Object Model (DOM) Level 3 Core Specification.</cite></a> 7 April 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407">http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407</a>
</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
</dd><dt id="bib-WIDGETS">[WIDGETS]</dt><dd>Marcos Caceres. <a href="http://www.w3.org/TR/2009/CR-widgets-20091201/"><cite>Widget Packaging and Configuration.</cite></a> 01 December 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2009/CR-widgets-20091201/">http://www.w3.org/TR/2009/CR-widgets-20091201/</a>
</dd><dt id="bib-WIDGETS-DIGSIG">[WIDGETS-DIGSIG]</dt><dd>Marcos Caceres. <a href="http://www.w3.org/TR/2008/WD-widgets-digsig-20080414"><cite>Widgets 1.0: Digital Signature.</cite></a> 14 April 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-widgets-digsig-20080414">http://www.w3.org/TR/2008/WD-widgets-digsig-20080414</a>
</dd><dt id="bib-XML-NAMES">[XML-NAMES]</dt><dd>Richard Tobin; et al. <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/"><cite>Namespaces in XML 1.0 (Third Edition).</cite></a> 8 December 2009. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/">http://www.w3.org/TR/2009/REC-xml-names-20091208/</a>
</dd><dt id="bib-XML10">[XML10]</dt><dd>C. M. Sperberg-McQueen; et al. <a href="http://www.w3.org/TR/2008/REC-xml-20081126/"><cite>Extensible Markup Language (XML) 1.0 (Fifth Edition).</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-xml-20081126/">http://www.w3.org/TR/2008/REC-xml-20081126/</a>
</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-HTTP-TLS">[HTTP-TLS]</dt><dd>E. Rescorla. <a href="http://www.ietf.org/rfc/rfc2818.txt"><cite>HTTP Over TLS.</cite></a> May 2000. Internet RFC 2818. URL: <a href="http://www.ietf.org/rfc/rfc2818.txt">http://www.ietf.org/rfc/rfc2818.txt</a>
</dd><dt id="bib-HTTP11">[HTTP11]</dt><dd>R. Fielding; et al. <a href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer Protocol - HTTP/1.1.</cite></a> June 1999. Internet RFC 2616. URL: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>
</dd><dt id="bib-WIDGETS-REQS">[WIDGETS-REQS]</dt><dd>Marcos Caceres. <a href="http://www.w3.org/TR/2009/WD-widgets-reqs-20090430"><cite>Widgets 1.0: Requirements.</cite></a> 30 April 2009. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2009/WD-widgets-reqs-20090430">http://www.w3.org/TR/2009/WD-widgets-reqs-20090430</a>
</dd></dl></div></div></body></html>