index.html
66.2 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
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html lang="en" dir="ltr">
<head>
<title>XML Signature Streaming Profile of XPath 1.0</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<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: 1px 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" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">XML Signature Streaming Profile of XPath 1.0</h1><h2 id="w3c-working-draft-21-april-2011">W3C Working Draft 21 April 2011</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2011/WD-xmldsig-xpath-20110421/">http://www.w3.org/TR/2011/WD-xmldsig-xpath-20110421/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/xmldsig-xpath/">http://www.w3.org/TR/xmldsig-xpath/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2008/xmlsec/Drafts/xmldsig-xpath/">http://www.w3.org/2008/xmlsec/Drafts/xmldsig-xpath/</a></dd><dt>Previous version:</dt><dd><a href="http://www.w3.org/TR/2010/WD-xmldsig-xpath-20100831/">http://www.w3.org/TR/2010/WD-xmldsig-xpath-20100831/</a></dd><dt>Editors:</dt><dd><span>Pratik Datta</span>, <span class="ed_mailto"><a href="mailto:pratik.datta@oracle.com">pratik.datta@oracle.com</a></span> </dd>
<dd><span>Frederick Hirsch</span>, <span class="ed_mailto"><a href="mailto:frederick.hirsch@nokia.com">frederick.hirsch@nokia.com</a></span> </dd>
<dd><span>Meiko Jensen</span>, <span class="ed_mailto"><a href="mailto:Meiko.Jensen@ruhr-uni-bochum.de">Meiko.Jensen@ruhr-uni-bochum.de</a></span> </dd>
</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2011 <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 document defines a streamable profile of XPath 1.0
suitable for use
with XML Signature 2.0.
</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>
This is a W3C Last Call Working Draft of "XML Signature Streaming
Profile of XPath 1.0".
</p>
<p>A <a href="Overview-pub-diff.html">diff-marked version</a> of this
specification that highlights changes against the <a href="http://www.w3.org/TR/2010/WD-xmldsig-xpath-20100831/">previous
version</a> is available. Major changes in this version include:</p>
<ul>
<li>Update XPath profile based on review with W3C XSLT/XQuery working
groups, including various simplifications and corrections.</li>
<li>Modified grammar and split into sections:
top-level, LocationPaths and Predicates.</li>
<li>Add clarifications related to 1-pass, top-level expressions and predicate.</li>
<li>Add security considerations.</li>
<li>Editorial formatting and cleanup. Updated editors list.</li>
</ul>
<p>
This document was originally derived from material in an earlier
publication of XML Signature 2.0,
see <a href="http://www.w3.org/TR/2010/WD-xmldsig-core2-20100304/#sec-XPath-2.0">http://www.w3.org/TR/2010/WD-xmldsig-core2-20100304/#sec-XPath-2.0</a>.
</p>
<p>This document was published by the <a href="http://www.w3.org/2008/xmlsec/">XML Security Working Group</a> as a Last Call 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-xmlsec@w3.org">public-xmlsec@w3.org</a> (<a href="mailto:public-xmlsec-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-xmlsec/">archives</a>). The Last Call period ends 31 May 2011. 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 is a Last Call Working Draft and thus the Working Group has determined that this document has satisfied the relevant technical requirements and is sufficiently stable to advance through the Technical Recommendation process.</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/42458/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="#sec-Introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#sec-Streamable" class="tocxref"><span class="secno">2. </span>Streamable</a><ul class="toc"><li class="tocline"><a href="#sec-Streaming-Signatures" class="tocxref"><span class="secno">2.1 </span>Streaming for XML signatures</a></li><li class="tocline"><a href="#sec-One-Pass-Streaming" class="tocxref"><span class="secno">2.2 </span>Limitations with one-pass streaming</a></li></ul></li><li class="tocline"><a href="#sec-other-requirements" class="tocxref"><span class="secno">3. </span>Other requirements</a></li><li class="tocline"><a href="#sec-definition" class="tocxref"><span class="secno">4. </span>Definition of the Profile</a><ul class="toc"><li class="tocline"><a href="#sec-definition-toplevel" class="tocxref"><span class="secno">4.1 </span>Top level XPath expression</a></li><li class="tocline"><a href="#sec-definition-LocationPath" class="tocxref"><span class="secno">4.2 </span>LocationPaths</a></li><li class="tocline"><a href="#sec-definition-RestrictedPredicate" class="tocxref"><span class="secno">4.3 </span>Predicates</a></li></ul></li><li class="tocline"><a href="#sec-examples" class="tocxref"><span class="secno">5. </span>Examples of XPath expression that are part of this profile</a></li><li class="tocline"><a href="#sec-Algorithm" class="tocxref"><span class="secno">A. </span>Algorithm</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
<div id="sec-Introduction" class="section">
<!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
<p>This document specifies a streamable profile of XPath 1.0
[<cite><a class="bibref" rel="biblioentry" href="#bib-XPATH">XPATH</a></cite>] for use in XML
Signature 2.0 [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLDSIG-CORE2">XMLDSIG-CORE2</a></cite>]. It is a proper subset of XPath 1.0, i.e. any XPath expression that is
part of this subset is also a valid XPath 1.0 expression, and when evaluated using the streaming algorithm
mentioned here, produces exactly the same results as those produced by a regular DOM based XPath engine.
Although this XPath subset has been designed in the context of XML Signature 2.0, it is
a general purpose subset and can be used in other contexts too.
</p>
<p>
The motivation for introducing this
profile is outlined here. </p>
<p>XML Signature lets one
sign parts of the XML document. In 1.x version of XML Signature [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLDSIG-CORE1">XMLDSIG-CORE1</a></cite>],
the part to be signed can be identified
in one of the following ways:
</p><ol>
<li><p><b>ID based references</b> This is the simplest and the most popular mechanism. An ID attribute is added
to the element to be signed, and the signature refers to this element
by this ID. However this approach has certain
problems:
</p><ol style="list-style-type:lower-alpha">
<li> the document needs to be changed to add the id, this may not be possible in all situations,
especially if the schema does not allow an ID attribute for that element. </li>
<li> ID based references are subject
to wrapping attacks, these attacks can be avoided by using XPath expressions.</li>
<li> this mechanism can only sign complete subtrees, i.e. parts of a subtree cannot be excluded.</li>
</ol>
<p></p></li>
<li><p><b>XPath Filter Transform</b> This is the original XPath mechanism in XML Signature 1.0. It solves the three
problems mentioned above, but it introduces new problems:
</p><ol style="list-style-type:lower-alpha"><li>it is extremely inefficient, because the XPath needs to be
evaluated for every node of the document.</li>
<li>the XPath is not a "normal" XPath, because it has to be of the
form of a boolean expression that is evaluated with
every node as the context node. For example the XPath <code>//chapter/</code> (i.e. all <code>chapter</code>)
descendants has to be expressed as <code>ancestor-or-self::chapter</code> (i.e. a boolean expression which evaluates
to true for a node, if that node has an ancestor call <code>chapter</code>). Not only is this very hard to understand
, but also some XPaths cannot be expressed like this at all. For example it is not possible to express
<code>/book/chapter[3]</code> in this model.</li>
</ol><p></p></li>
<li><p><b>XPath Filter 2 Transform</b> This was introduced to solve the problems in above problems [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLDSIG-XPATH-FILTER2">XMLDSIG-XPATH-FILTER2</a></cite>]. However it has a few problems
of its own:
</p><ol style="list-style-type:lower-alpha"><li>although there are implementations of it, it was not popular because it is marked as optional to implement.</li>
<li>it is not streamable in general, although some limited set may be streamable. Note ID based references are streamable.</li>
</ol>
<p></p></li>
<li><p><b>XPointer</b> At the time the XML Signature 1.0 was written, XPointer supported a full XPath model,
but it was still under development. Later on it split up into multiple specs, the full XPath support remained as a Working draft [<cite><a class="bibref" rel="biblioentry" href="#bib-XPTR-XPOINTER">XPTR-XPOINTER</a></cite>],
and only the XPointer element scheme [<cite><a class="bibref" rel="biblioentry" href="#bib-XPTR-ELEMENT">XPTR-ELEMENT</a></cite>] became an
official W3C Recommendation. The XPointer
element scheme does not support generic XPaths, it only
allows basic addressing of XML elements e.g. <code>element(/1/2)</code> identifies the 2nd child of the root element.
</p><ol style="list-style-type:lower-alpha">
<li>there are almost no implementations of XPointer with XPath, in fact the XML Signature specification actively discourages it.</li>
<li>this mechanism can only sign complete subtrees, with no exclusions.</li>
</ol>
<p></p></li>
</ol>
<p></p>
<p>XML Signature 2.0, retains all 1.x mechanisms for backwards compatibility, but it introduces a new mechanism
<code><ds2:Selection></code> which can be viewed as a very simplified form of XPath Filter 2 Transform. It
consists of <code>URI</code> which can be used for ID based references and an <code>IncludedXPath</code> and <code>ExcludedXPath</code>
for inclusions and exclusions. The result of the selection is subtrees identified by included XPath, minus the subtrees
identified by excluded XPath. These <code>IncludedXPath</code> and <code>ExcludedXPath</code> take a profile of XPath, and
and it is this profile that this document describes.
</p>
<p>This 2.0 selection mechanism, has all the advantages of XPath Filter 2 transform, and additionally it is designed to
support streaming. However it does the restrict the kind
of selection - only subtrees with one round of subtree exclusion can be selected. This restriction is required for high performance.
</p>
</div>
<div id="sec-Streamable" class="section">
<!--OddPage--><h2><span class="secno">2. </span>Streamable</h2>
<p>The XPath profile defined in this document is streamable with single-pass pre-order XPath recognition. This means
</p><ul>
<li><p>All the XPaths to be evaluated are known at the beginning of the one-pass.</p></li>
<li><p>It should be possible to evaluate these XPaths on large XML documents without having having to load the entire document into memory.
The implementation should read the XML one chunk at a time, and do a single forward only pass over the document.</p></li>
<li><p>More specifically, the XPath engine should work off a streaming XML parser. A streaming parser is a software module that reads the XML document, and
constructs a stream of XML events like "beginElement", "text", "endElement" etc. [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-PARSER-STAX">XML-PARSER-STAX</a></cite>] is an example of a streaming parser. The
<a href="#sec-Algorithm">Algorithm Section</a> describes one
possible algorithm to evaluate this XPath subset with a streaming
parser. In this algorithm
each of the XPaths is converted into a state machine
during initialization then as
the XML input document is parsed with a streaming parser
the resultant XML events are fed as inputs into these state
machines. The state machines
determine whether the current XML event is accepted by the XPath or not. </p></li>
<li><p>The XPath itself might select a large portion of the document, or even the whole document. The result of the XPath evaluation
should not be loaded all into memory if it is large. Instead it
should be pipelined to the processing stage. </p></li>
<li><p>The XML document may have very large text nodes. The XPath
engine should not be required to load such large nodes in their
entirety. Instead they should be split up into multiple text nodes, and processed one by one. </p></li>
</ul>
<p></p>
<div id="sec-Streaming-Signatures" class="section">
<h3><span class="secno">2.1 </span>Streaming for XML signatures</h3>
<p>In the context of XML Signature, streaming is absolutely essential for XML gateways which need to perform XML Signature and Encryption
operations for messages on the wire. It is also important for performance sensitive applications; as streaming improves performance by conserving memory,
which greatly reduces temporary memory allocation, resulting in far less memory garbage collection.
</p>
<p>For XML Signatures it is not only the XPath expressions that need
to be evaluated in streaming, but the rest of the signature processing
as well (e.g. canonicalization and digesting also need to be performed
in streaming mode). For example a streaming Signature processor could
compute
Reference
digests for 2.0 Signatures as follows:
</p><ul>
<li><p>Initialize XPath engines for each of the <code><IncludedXPath></code> and <code><ExcludedXPath></code> for each <code><Reference></code>. </p> </li>
<li><p>Initialize a "Selector", "Canonicalizer" and a "Digestor" for each Reference and put them into a pipeline.
</p><ol>
<li><p>The "Selector" takes as input XML events generated by the Parser. It checks if the XML event is either a
descendant of the subtree identified by the <code><Selection></code>'s <code>URI</code> attribute or accepted
by the IncludedXPath engine and not accepted by the ExcludedXPath engine. Exclusions always trump Inclusions, and Exclusions also apply to
ID references.
If the check passes, it passes on the
XML event to the "Canonicalizer".
<br>
Note a <code><Selection></code> can either contain the <code>URI</code> attribute or a <code><IncludedXPath></code> subelement, but not
both. But in either case it can optionally contain the <code><ExcludedXPath></code> subelement.</p> </li>
<li><p>The "Canonicalizer" inputs XML events passed on by the Selector, and emits byte arrays for each event, and sends them to the "Digestor".</p> </li>
<li><p>The "Digestor" takes byte arrays and computes a running digest.</p> </li>
</ol>
<p></p> </li>
<li><p>Start parsing the current XML document using a streaming XML parser, and feed the XML events to each of the Reference processing pipelines.</p></li>
<li><p>At the end of parsing the pipelines will contain the computed digest for each Reference. Note the same XML event
may be accepted by more than one Reference, and hence included is multiple digests.</p> </li>
</ul>
<p>
For simplicity the above steps make a simplifying assumption that all the <code><Reference></code>s have a
<code><Selection></code> of <code>Type="http://www.w3.org/2010/xmldsig2#xml"</code>,
and each of the
<code><Selection></code> <code>URI</code>s are same document references. If the <code><Selection></code> <code>URI</code>s
refer to external resource, the URI should be dereferenced to fetch the external XML document,
and the XPaths be evaluated on this external document, instead of the current document.
</p>
</div>
<div id="sec-One-Pass-Streaming" class="section">
<h3><span class="secno">2.2 </span>Limitations with one-pass streaming</h3>
<p>
Note that it is not always possible to apply or verify XML Signatures in
a one-pass streaming fashion. For instance, the verification of an
enveloped signature requires an XPath for selection that matches an
element that is located prior to the XML Signature itself (in document
order). Hence, on signature verification, the selected elements are
processed by the streaming parser before the selection XPath itself gets
parsed. Example:
</p>
<pre class="example sh_xml sh_sourceCode"><span class="sh_keyword"><Document></span>
<span class="sh_keyword"><DataBlock1</span> <span class="sh_keyword">/></span>
<span class="sh_keyword"><Signature</span> <span class="sh_type">xmlns</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2000/09/xmldsig#"</span><span class="sh_keyword">></span>
<span class="sh_keyword"><SignedInfo></span>
[...]
<span class="sh_keyword"><Reference></span>
<span class="sh_keyword"><Transforms></span>
<span class="sh_keyword"><Transform</span> <span class="sh_type">Algorithm</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2010/xmldsig2#transform"</span><span class="sh_keyword">></span>
<span class="sh_keyword"><dsig2:Selection</span> <span class="sh_type">xmlns:dsig2</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2010/xmldsig2#"</span>
<span class="sh_type">type</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2010/xmldsig2#xml"</span> <span class="sh_type">URI</span><span class="sh_symbol">=</span><span class="sh_string">""</span> <span class="sh_keyword">/></span>
[...]
<span class="sh_keyword"></Transform></span>
<span class="sh_keyword"></Transforms></span>
[...]
<span class="sh_keyword"></Reference></span>
<span class="sh_keyword"></SignedInfo></span>
[...]
<span class="sh_keyword"></Signature></span>
<span class="sh_keyword"><DataBlock2</span> <span class="sh_keyword">/></span>
<span class="sh_keyword"></Document></span></pre>
<p>
As can be seen, the XML Signature selects the whole document, hence all
XML elements therein must be processed on signature verification.
However, when parsing this document using a streaming approach, the
verifying application might not know in advance which parts of the
document are protected by the XML Signature. Hence, it will start
parsing the document to extract the XPath expressions used for
selection, but once it encounters that information, all the elements
processed before have already been processed and dismissed (such as the
<Document> and <DataBlock1> elements). Thus, these elements have not
been digested, and hence there is no way to verify such an XML Signature
in a one-pass streaming fashion.
</p>
<p>
Note that this impossibility of one-pass streaming is not only affecting
enveloping signatures. For instance, an XML Signature verification with
a selection of
</p><pre class="example sh_xml sh_sourceCode"><span class="sh_keyword"><dsig2:Selection</span> <span class="sh_type">type</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2010/xmldsig2#xml"</span>
<span class="sh_type">xmlns:dsig2</span><span class="sh_symbol">=</span><span class="sh_string">"http://www.w3.org/2010/xmldsig2#"</span> <span class="sh_type">URI</span><span class="sh_symbol">=</span><span class="sh_string">""</span> <span class="sh_keyword">></span>
<span class="sh_keyword"><dsig2:IncludedXPath></span> //DataBlock1 <span class="sh_keyword"></dsig2:IncludedXPath></span>
<span class="sh_keyword"></dsig2:Selection></span></pre>
would have also failed due to the same issue, though not being an
enveloped signature. The same holds for ID-based selection if the
selected elements occur prior to the XML Signature in document order.
<p></p>
<p>
These problems can be alleviated by doing the verification in two passes, the
first pass merely scanning the document for the <code><Signature></code> and the second pass
actually evaluating the XPath , canonicalizing and computing the digest.
Applications that require pure one pass processing <em class="rfc2119" title="should">should</em> avoid backward references of any kind.
</p>
</div>
</div>
<div id="sec-other-requirements" class="section">
<!--OddPage--><h2><span class="secno">3. </span>Other requirements</h2>
<p>
Apart from streaming, the XPath profile also needs to satisfy the following requirements:
</p><ul>
<li> <p>
The profile should produce results that are compatible with the C14N
2.0 data model, i.e. it should
only result in element nodes or attribute nodes (but not xml: attribute and namespace
attributes). </p></li>
<li><p>This XPath profile should include some of the known usages of XPath in XML Signatures.
</p><ol>
<li>ebXML messages require a signature to exclude elements whose <code>@SOAP:actor</code> attribute matches
a certain value. Refer section 4.1.3 of [<cite><a class="bibref" rel="biblioentry" href="#bib-EBXML-MSG">EBXML-MSG</a></cite>].</li>
<li>UK government specification requires signature to include the <code>GovTalkMessage/Body</code> subtree, but exclude the
<code>GovTalkMessage/Body/IRevenvelope/IRHeader/IRmark</code>
subtree [<cite><a class="bibref" rel="biblioentry" href="#bib-HMRMC">HMRMC</a></cite>].</li>
</ol>
<p></p></li>
</ul>
<p></p>
</div>
<div id="sec-definition" class="section">
<!--OddPage--><h2><span class="secno">4. </span>Definition of the Profile</h2>
<p>
The following tables define this XPath profile. It is a restricted version of grammar in [<cite><a class="bibref" rel="biblioentry" href="#bib-XPATH">XPATH</a></cite>]. Although this grammar
appears to deviate from the [<cite><a class="bibref" rel="biblioentry" href="#bib-XPATH">XPATH</a></cite>] grammar, it is in fact a
proper subset of XPath 1.0, i.e. any XPath expression defined by this
grammar is also a valid XPath 1.0 expression and
has exactly the same meaning as that defined by the XPath 1.0 specification.
</p>
<div id="sec-definition-toplevel" class="section">
<h3><span class="secno">4.1 </span>Top level XPath expression</h3>
<table class="simple">
<thead>
<tr>
<th valign="top">
<p>Grammar</p>
</th>
<th valign="top">
<p>Explanation</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<pre><dfn id="dfn-xpath">XPath</dfn> ::=
(<a title="AbsoluteLocationPath" href="#dfn-absolutelocationpath" class="internalDFN">AbsoluteLocationPath</a> '|' )* <a title="AbsoluteLocationPath" href="#dfn-absolutelocationpath" class="internalDFN">AbsoluteLocationPath</a>
</pre>
</td>
<td valign="top">
At the top level it is union of absolute locationPaths. e.g. <code>/a/b | //a[@c]</code>.
<p>
Note: [<cite><a class="bibref" rel="biblioentry" href="#bib-XPATH">XPATH</a></cite>] allows a generic
Expr in top level, e.g <code>count(/a/b) + string-length(/a)</code> is a perfectly valid XPath 1.0 expression, but these are not allowed
in this subset. That's because the whole goal of this subset is to select a set of subtrees, identified by subtree root elements. E.g.
the XPath <code>/a/b</code> returns all <code>b</code> child elements of the top level element <code>a</code>. But when this XPath
expression is used in
an <code>IncludedXPath</code> in XML Signature 2.0, it means not only these <code>b</code> elements, but all <code>b</code>'s descendants
as well are to be selected for signing.
</p><p>
Relative Location Paths e.g. <code>../../a</code> are currently not allowed, This is because relative would be most useful
in Enveloped signatures in which the signature is contained inside the element to be signed. In such a situation,
the relative signature XPath would need to use the ancestor axis to reach the element to be signed, however the ancestor axis is not streamable.
</p></td>
</tr>
</tbody>
</table>
</div>
<div id="sec-definition-LocationPath" class="section">
<h3><span class="secno">4.2 </span>LocationPaths</h3>
<table class="simple">
<thead>
<tr>
<th valign="top">
<p>Grammar</p>
</th>
<th valign="top">
<p>Explanation</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<pre>
<dfn id="dfn-absolutelocationpath">AbsoluteLocationPath</dfn> ::=
'/' <a title="RelativeLocationPath" href="#dfn-relativelocationpath" class="internalDFN">RelativeLocationPath</a>?
| <a title="AbbreviatedAbsoluteLocationPath" href="#dfn-abbreviatedabsolutelocationpath" class="internalDFN">AbbreviatedAbsoluteLocationPath</a>
<dfn id="dfn-relativelocationpath">RelativeLocationPath</dfn> ::=
<a title="Step" href="#dfn-step" class="internalDFN">Step</a>
| <a title="RelativeLocationPath" href="#dfn-relativelocationpath" class="internalDFN">RelativeLocationPath</a> '/' <a title="Step" href="#dfn-step" class="internalDFN">Step</a>
| <a title="AbbreviatedRelativeLocationPath" href="#dfn-abbreviatedrelativelocationpath" class="internalDFN">AbbreviatedRelativeLocationPath</a>
<dfn id="dfn-abbreviatedabsolutelocationpath">AbbreviatedAbsoluteLocationPath</dfn> ::=
'//' <a title="RelativeLocationPath" href="#dfn-relativelocationpath" class="internalDFN">RelativeLocationPath</a>
<dfn id="dfn-abbreviatedrelativelocationpath">AbbreviatedRelativeLocationPath</dfn> ::=
<a title="RelativeLocationPath" href="#dfn-relativelocationpath" class="internalDFN">RelativeLocationPath</a> '//' <a title="Step" href="#dfn-step" class="internalDFN">Step</a>
</pre>
</td>
<td valign="top">
An absolute location path starts with a slash and has consists of one or many "steps" separated by slash. e.g. <code>/a/b</code>.
Double slashes are also allowed, they are short for <code>/descendant-or-self::node()/</code>.
</td>
</tr>
<tr>
<td valign="top">
<pre>
<dfn id="dfn-step">Step</dfn> ::=
<a title="AxisSpecifier" href="#dfn-axisspecifier" class="internalDFN">AxisSpecifier</a> <a title="NameTest" href="#dfn-nametest" class="internalDFN">NameTest</a> <a title="RestrictedPredicate" href="#dfn-restrictedpredicate" class="internalDFN">RestrictedPredicate</a>*
| <a title="AbbreviatedStep">AbbreviatedStep</a>
<dfn id="dfn-axisspecifier">AxisSpecifier</dfn> ::=
<a title="AxisName" href="#dfn-axisname" class="internalDFN">AxisName</a> '::'
| <a title="AbbreviatedAxisSpecifier" href="#dfn-abbreviatedaxisspecifier" class="internalDFN">AbbreviatedAxisSpecifier</a>
<dfn id="dfn-abbreviatedaxisspecifier">AbbreviatedAxisSpecifier</dfn> ::=
'@'?
<dfn id="dfn-axisname">AxisName</dfn> ::=
'attribute'
| 'child'
| 'descendant'
| 'descendant-or-self'
| 'following'
| 'following-sibling'
| 'self'
<dfn id="dfn-nametest">NameTest</dfn> ::=
'*'
| <a title="NCName">NCName</a> ':' '*'
| <a title="QName">QName</a>
</pre>
</td>
<td valign="top">
A Step consists of an AxisSpecifier a NameTest, and zero or more predicates. The AxisSpecifier allows only forward axes; all the backward axes
<code>ancestor</code>, <code>ancestor-or-self</code>,
<code>parent</code>, <code>preceding</code>, <code>preceding-sibling</code> are not streamable, and hence not allowed.
The <code>namespace</code> is also not streamable, so it is disallowed too.
<p>
Examples of allowed Steps : <code>b[2]</code>, <code>*</code>, <code>following::chapter</code>.
</p><p>
This Step is a restricted form of the Step in XPath 1.0 in two aspects. First it only allows a restricted set of Predicate expressions
that use attributes only, this restriction is described in the next section; and second it doesn't allow NodeTests.
e.g. <code>child::text()</code> is not an allowed Step. This is because some predicates involving text nodes are not streamable.
</p><p>
Consider
this Step <code>child::text()[contains(.,"foo")]</code>, it selects all child text nodes that contain the string "foo". But as mentioned
earlier, text nodes can be extremely long, so a streaming XPath processor will be processing text nodes in chunks. The "foo" substring may be
present at the very end of a large text node, so when the streaming XPath processor encounters the "foo", it would have already gotten past all
previous chunks of this text node, and with streaming there is no way to rewind back to the beginning of this text node.
</p><p>
Because of this possibility of large text nodes, this XPath subset eliminates all mechanisms of selecting text nodes, either directly
or through other mechanisms e.g. string-value.
</p><p>
Although the <code>node()</code> is not allowed, <code>//</code> which is an abbreviation for <code>/descendant-or-self::node()/</code>
is still allowed, because <code>//</code> always need to be followed by Step, so it cannot be used to select text nodes.
<code>
</code></p></td>
</tr>
</tbody>
</table>
</div>
<div id="sec-definition-RestrictedPredicate" class="section">
<h3><span class="secno">4.3 </span>Predicates</h3>
Although this XPath subset allows predicates, with all kinds of arithmetic, relational and boolean operators, including functions and variables,
these predicates are restricted to only referrring to the attributes of the current element.
So an XPath expression like <code>/a/b[c/d]</code> is not allowed.
<p>
These kinds of XPath expressions cannot be streamed in general, e.g. in the
<code>/a/b[c/d]</code> 'b' may have a lot of children, with 'c' being the last one. To determine if 'b' is included or not, the XPath processor
needs to traverse through all the children of 'b', searching for the existence of 'c'. By the time it finds 'c', all the previous children of 'b'
have already been passed, and there is no way to rewind back to beginning of 'b'.
</p><table class="simple">
<thead>
<tr>
<th valign="top">
<p>Grammar</p>
</th>
<th valign="top">
<p>Explanation</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<pre><dfn id="dfn-restrictedpredicate">RestrictedPredicate</dfn> ::=
'[' <a title="AttributeExpr" href="#dfn-attributeexpr" class="internalDFN">AttributeExpr</a> ']'
<dfn id="dfn-attributeexpr">AttributeExpr</dfn> ::=
<a title="OrExpr" href="#dfn-orexpr" class="internalDFN">OrExpr</a>
<dfn id="dfn-orexpr">OrExpr</dfn> ::=
<a title="AndExpr" href="#dfn-andexpr" class="internalDFN">AndExpr</a>
| <a title="OrExpr" href="#dfn-orexpr" class="internalDFN">OrExpr</a> 'or' <a title="AndExpr" href="#dfn-andexpr" class="internalDFN">AndExpr</a>
<dfn id="dfn-andexpr">AndExpr</dfn> ::=
<a title="EqualityExpr" href="#dfn-equalityexpr" class="internalDFN">EqualityExpr</a>
| <a title="AndExpr" href="#dfn-andexpr" class="internalDFN">AndExpr</a> 'and' <a title="EqualityExpr" href="#dfn-equalityexpr" class="internalDFN">EqualityExpr</a>
<dfn id="dfn-equalityexpr">EqualityExpr</dfn> ::=
<a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a>
| <a title="EqualityExpr" href="#dfn-equalityexpr" class="internalDFN">EqualityExpr</a> '=' <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a>
| <a title="EqualityExpr" href="#dfn-equalityexpr" class="internalDFN">EqualityExpr</a> '!=' <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a>
<dfn id="dfn-relationalexpr">RelationalExpr</dfn> ::=
<a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a>
| <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a> '<' <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a>
| <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a> '>' <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a>
| <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a> '<=' <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a>
| <a title="RelationalExpr" href="#dfn-relationalexpr" class="internalDFN">RelationalExpr</a> '>=' <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a>
<dfn id="dfn-additiveexpr">AdditiveExpr</dfn> ::=
<a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a>
| <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a> '+' <a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a>
| <a title="AdditiveExpr" href="#dfn-additiveexpr" class="internalDFN">AdditiveExpr</a> '-' <a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a>
<dfn id="dfn-multiplicativeexpr">MultiplicativeExpr</dfn> ::=
<a title="UnaryExpr" href="#dfn-unaryexpr" class="internalDFN">UnaryExpr</a>
| <a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a> <a title="MultiplyOperator">MultiplyOperator</a> <a title="UnaryExpr" href="#dfn-unaryexpr" class="internalDFN">UnaryExpr</a>
| <a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a> 'div' <a title="UnaryExpr" href="#dfn-unaryexpr" class="internalDFN">UnaryExpr</a>
| <a title="MultiplicativeExpr" href="#dfn-multiplicativeexpr" class="internalDFN">MultiplicativeExpr</a> 'mod' <a title="UnaryExpr" href="#dfn-unaryexpr" class="internalDFN">UnaryExpr</a>
<dfn id="dfn-unaryexpr">UnaryExpr</dfn> ::=
<a title="PrimaryExpr" href="#dfn-primaryexpr" class="internalDFN">PrimaryExpr</a>
| <a title="AttributeReference" href="#dfn-attributereference" class="internalDFN">AttributeReference</a>
| '-' <a title="UnaryExpr" href="#dfn-unaryexpr" class="internalDFN">UnaryExpr</a>
<dfn id="dfn-attributereference">AttributeReference</dfn> ::=
'attribute' '::' <a title="NameTest" href="#dfn-nametest" class="internalDFN">NameTest</a>
| '@' <a title="NameTest" href="#dfn-nametest" class="internalDFN">NameTest</a>
</pre>
</td>
<td valign="top">
An AttributeExpression is an expression involving arithmentic, boolean and relational operators. It can only involve AttributeReferences or PrimaryExprs.
<p>
An AttributeReference is reference to an attribute of the current element. e.g. <code>@title</code>.
</p></td>
</tr>
<tr>
<td valign="top">
<pre>
<dfn id="dfn-primaryexpr">PrimaryExpr</dfn> ::=
<a title="VariableReference" href="#dfn-variablereference" class="internalDFN">VariableReference</a>
| '(' <a title="AttributeExpr" href="#dfn-attributeexpr" class="internalDFN">AttributeExpr</a> ')'
| <a title="Literal" href="#dfn-literal" class="internalDFN">Literal</a>
| <a title="Number" href="#dfn-number" class="internalDFN">Number</a>
| <a title="FunctionCall" href="#dfn-functioncall" class="internalDFN">FunctionCall</a>
<dfn id="dfn-literal">Literal</dfn> ::= '"' [^"]* '"' | "'" [^']* "'"
<dfn id="dfn-number">Number</dfn> ::= <a title="Digits" href="#dfn-digits" class="internalDFN">Digits</a> ('.' <a title="Digits" href="#dfn-digits" class="internalDFN">Digits</a>?)? | '.' <a title="Digits" href="#dfn-digits" class="internalDFN">Digits</a>
<dfn id="dfn-digits">Digits</dfn> ::= [0-9]+
<dfn id="dfn-functioncall">FunctionCall</dfn> ::=
<a title="FunctionName" href="#dfn-functionname" class="internalDFN">FunctionName</a> '(' ( <a title="Argument" href="#dfn-argument" class="internalDFN">Argument</a> ( ',' <a title="Argument" href="#dfn-argument" class="internalDFN">Argument</a> )* )? ')'
<dfn id="dfn-argument">Argument</dfn> ::= <a title="AttributeExpr" href="#dfn-attributeexpr" class="internalDFN">AttributeExpr</a>
<dfn id="dfn-functionname">FunctionName</dfn> ::= <a title="QName">QName</a> - <a title="NodeType">NodeType</a>
<dfn id="dfn-variablereference">VariableReference</dfn> ::= '$' <a title="QName">QName</a>
</pre>
</td>
<td valign="top">
A PrimaryExpr is either a literal e.g. <code>"foo"</code> or a number e.g. <code>23</code> or a variable reference e.g. <code>$var1</code>
or a function call e.g. <code>sum(23, $price)</code>. It can also be a complete AttributeReference.
<p>
node(), comment(), text(), processing-instruction() are reserved names, and cannot be used for naming functions.
</p></td>
</tr>
<tr>
<td valign="top">
Node set functions
<ul>
<li>
position()
</li>
<li>
count(nodeset)
</li>
<li>
local-name(nodeset)
</li>
<li>
namespace-uri(nodeset)
</li>
<li>
name(nodeset)
</li>
</ul>
String functions
<ul class="ul1">
<li>
string(object?)
</li>
<li>
concat(string, string, string*)
</li>
<li>
starts-with(string, string)
</li>
<li>
contains(string, string)
</li>
<li>
substring-before(string, string)
</li>
<li>
substring-after(string, string)
</li>
<li>
substring(string, number, number)
</li>
<li>
string-length(string?)
</li>
<li>
normalize-space(string?)
</li>
</ul>
Boolean functions
<ul class="ul1">
<li>
boolean(object)
</li>
<li>
true()
</li>
<li>
false()
</li>
<li>
lang(string)
</li>
</ul>
Number functions
<ul class="ul1">
<li>
number(object?)
</li>
<li>
sum(node-set)
</li>
<li>
floor(number)
</li>
<li>
ceiling(number)
</li>
<li>
round(number)
</li>
</ul>
</td>
<td valign="top">
<p>Note:</p>
<p>All of these functions are only allowed inside a predicate.
</p>
<p>A predicate's
expression can only involve attribute nodes of the current element. Functions can also be
used inside this expression, but this function's arguments also have to be expressions involving
attribute nodes. There is no way to use elements, text nodes comments and processing instructions in predicate expressions.</p>
<p>The "string-value" of an attribute node is the attributes value. This XPath subset is designed in such a way that "string-value" only
need to be evaluted on attribute nodes, never on elements, text nodes or others. </p>
<p>The <code>last()</code> function is not supported because that involves backtracking, streaming
parsers cannot do that.</p>
<p>String, number and boolean functions are all supported. However the no argument forms of <code>string()</code>,
<code>string-length()</code> and <code>normalize-space()</code> are not supported, because they involve computing a string-value
of the current node, and this is not streamable as it involves looking ahead to collecting all descendant text nodes.
Also as mentioned before some text nodes can be very large, and cannot be loaded all at once into memory. </p>
<p>The no argument forms of <code>local-name()</code>, <code>namespace-uri()</code> and <code>name()</code> are
allowed. For example <code>/a/*[local-name()="foo"]</code> selects all "foo" children of "a" regardless of namespace. </p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Note: The descendant and related axes can be exploited by a denial of service attacks. See section
"XPath selection that causes denial of service in streaming mode" in [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLDSIG-BESTPRACTICES">XMLDSIG-BESTPRACTICES</a></cite>].
</p>
</div>
<div id="sec-examples" class="section">
<!--OddPage--><h2><span class="secno">5. </span>Examples of XPath expression that are part of this profile</h2>
<p>This sections explains the profile with some XPath expressions that are part of this
profile and some that aren't.
</p>
<p> All the XPath examples below are based on the following XML document. </p>
<pre class="example sh_xml sh_sourceCode"><span class="sh_keyword"><book></span>
<span class="sh_keyword"><foreword></span>
<span class="sh_keyword"></foreword></span>
<span class="sh_keyword"><chapter</span> <span class="sh_type">type</span><span class="sh_symbol">=</span><span class="sh_string">"preface"</span><span class="sh_keyword">></span>
<span class="sh_keyword"></chapter></span>
<span class="sh_keyword"><chapter></span>
<span class="sh_keyword"><title></span>Hybridism<span class="sh_keyword"></title></span>
<span class="sh_keyword"></chapter></span>
<span class="sh_keyword"><chapter></span>
<span class="sh_keyword"></chapter></span>
<span class="sh_keyword"></book></span></pre>
<p>Examples of XPath expression that are included in the profile.
</p>
<table class="simple">
<tbody><tr>
<th style="text-align:center">#</th>
<th style="text-align:center">Example</th>
<th style="text-align:center">Description</th>
<th style="text-align:center">XML Dsig 2.0</th>
</tr>
<tr>
<td>1</td>
<td><code>/book/chapter</code></td>
<td>all <code>chapter</code> children of <code>book</code></td>
<td>Y</td>
</tr>
<tr>
<td>2</td>
<td><code>/book/chapter[3]</code></td>
<td>third <code>chapter</code> child of <code>book</code> </td>
<td>Y</td>
</tr>
<tr>
<td>3</td>
<td><code>/book/chapter[@type="preface"]</code></td>
<td>all <code>chapter</code> children of <code>book</code> that have a <code>type</code> attribute with value <code>preface</code></td>
<td>Y</td>
</tr>
<tr>
<td>4</td>
<td><code>/book/chapter[@type="preface"][1]</code></td>
<td>the first <code>chapter</code> child of <code>book</code> that has a <code>title</code> attribute with
value preface.</td>
<td>Y</td>
</tr>
<tr>
<td>5</td>
<td><code>/book/chapter[2]/title[1]</code></td>
<td>the first <code>title</code> child of the second <code>chapter</code> child of <code>book</code>.</td>
<td>Y</td>
</tr>
<tr>
<td>6</td>
<td><code>/book/chapter[contains(@type,"pre")]</code></td>
<td>all <code>chapter</code> children of <code>book</code> that have an attribute
<code>type</code> whose value contains the string "pre".</td>
<td>Y</td>
</tr>
<tr>
<td>7</td>
<td><code>/child::book/child::chapter[contains(attribute::type,"pre")]</code></td>
<td>non abbreviated form of the above</td>
<td>Y</td>
</tr>
<tr>
<td>8</td>
<td><code>/book/chapter[position() mod 2 != 0]</code></td>
<td><code>chapter</code> children of <code>book</code> whose position is an odd number,
i.e. the odd numbered chapters of the book.</td>
<td>Y</td>
</tr>
<tr>
<td>9</td>
<td><code>/book/chapter[position() mod 2 != 0][@type="preface"]</code></td>
<td>all the odd numbered chapters whose <code>type</code> is "preface".</td>
<td>Y</td>
</tr>
<tr>
<td>10</td>
<td><code>//chapter</code></td>
<td>all <code>chapter</code> descendants</td>
<td>Y</td>
</tr>
<tr>
<td>11</td>
<td><code>/book/chapter | /book/foreword </code></td>
<td>all the <code>chapter</code> children of <code>book</code> and all the <code>foreword<code> children of book.</code></code></td>
<td>Y</td>
</tr>
<tr>
<td>12</td>
<td><code>//* </code></td>
<td>all the element nodes in the document.</td>
<td>Y<br>Note: when this is used to identify a selection in XML Dsig 2.0, it is exactly
equivalent to "/*" which select only the document root element.</td>
</tr>
</tbody></table>
<p>These are examples of XPath expressions that are NOT included in the profile.</p>
<table class="simple">
<tbody><tr>
<th style="text-align:center">#</th>
<th style="text-align:center">Example</th>
<th style="text-align:center">Description</th>
<th style="text-align:center">XML Dsig 2.0</th>
</tr>
<tr>
<td>1</td>
<td><code>/book/chapter[title="Hybridism"]</code></td>
<td>all <code>chapter</code> children of <code>book</code> that have a <code>title</code> sub element with value <code>Hybridism</code></td>
<td>N<br>expressions can only involve attributes</td>
</tr>
<tr>
<td>2</td>
<td><code>(/book)/chapter</code></td>
<td>Evaluate the (/book) expression and set that to the context node, and get the chapter child
of that context node.</td>
<td>N<br>the top level expression cannot have parenthesis or any other operators except the union operator "|"</td>
</tr>
<tr>
<td>3</td>
<td><code>count(/book/chapter)</code></td>
<td>count the number of <code>chapter</code> children of <code>book</code> </td>
<td>N<br></td>
</tr>
<tr>
<td>4</td>
<td><code>chapter</code></td>
<td>all <code>chapter</code> element children of context node.</td>
<td>N<br>relative location paths not allowed.</td>
</tr>
<tr>
<td>5</td>
<td><code>.</code></td>
<td>The context node.</td>
<td>N<br>relative location paths are not allowed.</td>
</tr>
<tr>
<td>6</td>
<td><code>/book/chapter/title/ancestor-or-self::chapter</code></td>
<td>the <code>chapter</code> ancestor of <code>/book/chapter/title</code>.</td>
<td>N<br>Only child, descendant and self axes are allowed.</td>
</tr>
<tr>
<td>7</td>
<td><code>/book/chapter/title/text()</code></td>
<td>the text child of <code>/book/chapter/title</code>.</td>
<td>N<br>text, comment and processing-instructions cannot be selected.</td>
</tr>
<tr>
<td>8</td>
<td><code>id("i1")</code></td>
<td>elements that have ID, whose value is "i1".</td>
<td>N<br>Functions are only allowed inside predicates, and also the <code>id()</code> function is not part of this subset.</td>
</tr>
<tr>
<td>9</td>
<td><code>/book[chapter/title]</code></td>
<td>the <code>book</code> element if it has a <code>chapter/title</code> grandchild.</td>
<td>N<br>only attributes are allowed in predicates.</td>
</tr>
<tr>
<td>10</td>
<td><code>/book/*[local-name(self::node()) = "chapter"]</code></td>
<td>the children of <code>book</code> element whose local name is "chapter".</td>
<td>N<br>Only attributes are allowed in predicates.</td>
</tr>
<tr>
<td>11</td>
<td><code>/book/chapter[2]/node()</code></td>
<td>all the child elements of the second <code>chapter</code> of the <code>book</code>.</td>
<td>N<br>node() test is not allowed, because it can select text nodes too.</td>
</tr>
<tr>
<td>12</td>
<td><code>/book/chapter or /book/foreword</code></td>
<td>boolean result is true, i.e. either of the location paths evaluate to non empty.</td>
<td>N<br>or operator is not allowed at top level. Top level expression can only be union
of location paths.</td>
</tr>
</tbody></table>
</div>
<div id="sec-Algorithm" class="appendix section">
<!--OddPage--><h2><span class="secno">A. </span>Algorithm</h2>
<p>This section outlines an algorithm for a Streaming XPath engine that can execute this XPath subset. It is
NOT NORMATIVE.
</p>
<p> A streaming XML Parser e.g. [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-PARSER-STAX">XML-PARSER-STAX</a></cite>] which will produce events like StartElement, EndElement, TextNode etc. This event stream will be
the input for the XPath engine. The StartElement event includes all the attributes in that element. An streaming XML Parser may break up a large text node
into multiple TextNode events. </p>
<ol>
<li>Split up the union expression by <code>"|"</code>. i.e.
break up the <code>locationPath | locationPath | .. </code> into individual
location paths.</li>
<li>For each location XPath create a state machine.</li>
<li>Drive the state machines using the events.</li>
</ol>
</div>
<div id="references" class="appendix section"><!--OddPage--><h2><span class="secno">B. </span>References</h2><p>Dated references below are to the latest known or appropriate edition of the referenced work. The referenced works may be subject to revision, and conformant implementations may follow, and are encouraged to investigate the appropriateness of following, some or all more recent editions or replacements of the works cited. It is in each case implementation-defined which editions are supported.</p><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-XPATH">[XPATH]</dt><dd>James Clark; Steven DeRose. <a href="http://www.w3.org/TR/1999/REC-xpath-19991116/"><cite>XML Path Language (XPath) Version 1.0.</cite></a> 16 November 1999. W3C Recommendation. URL: <a href="http://www.w3.org/TR/1999/REC-xpath-19991116/">http://www.w3.org/TR/1999/REC-xpath-19991116/</a>
</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-EBXML-MSG">[EBXML-MSG]</dt><dd>Ian Jones; Brian Gibb; David Fischer. <a href="http://www.oasis-open.org/committees/download.php/272/ebMS_v2_0.pdf"><cite> OASIS ebXML Message Service Specification</cite></a> 1 April 2002. URL: <a href="http://www.oasis-open.org/committees/download.php/272/ebMS_v2_0.pdf">http://www.oasis-open.org/committees/download.php/272/ebMS_v2_0.pdf</a>
</dd><dt id="bib-HMRMC">[HMRMC]</dt><dd><a href="http://www.hmrc.gov.uk/softwaredevelopers/index.htm"><cite>HM Revenue and customs</cite></a> Her Majesty's Revenue and Customs. URL: <a href="http://www.hmrc.gov.uk/softwaredevelopers/index.htm">http://www.hmrc.gov.uk/softwaredevelopers/index.htm</a> <br> Sample response message with XML signature: <a href="http://www.hmrc.gov.uk/ebu/responsemessages.pdf">http://www.hmrc.gov.uk/ebu/responsemessages.pdf</a>
</dd><dt id="bib-XML-PARSER-STAX">[XML-PARSER-STAX]</dt><dd>Christopher Fry; <a href="http://jcp.org/en/jsr/detail?id=173"><cite>JSR 173: Streaming API for XML for Java Specification</cite></a> 8th October 2003. v1.0 URL: <a href="http://jcp.org/en/jsr/detail?id=173">http://jcp.org/en/jsr/detail?id=173</a>
</dd><dt id="bib-XMLDSIG-BESTPRACTICES">[XMLDSIG-BESTPRACTICES]</dt><dd>Pratik Datta; Frederick Hirsch. <a href="http://www.w3.org/TR/2010/WD-xmldsig-bestpractices-20100204/"><cite>XML Signature Best Practices.</cite></a> 4 February 2010. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2010/WD-xmldsig-bestpractices-20100204/">http://www.w3.org/TR/2010/WD-xmldsig-bestpractices-20100204/</a>
</dd><dt id="bib-XMLDSIG-CORE1">[XMLDSIG-CORE1]</dt><dd>D. Eastlake, J. Reagle, D. Solo, F. Hirsch, T. Roessler, K. Yiu. <a href="http://www.w3.org/TR/2011/CR-xmldsig-core1-20110303/"><cite>XML Signature Syntax and Processing Version 1.1.</cite></a> 3 March 2011. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2011/CR-xmldsig-core1-20110303/">http://www.w3.org/TR/2011/CR-xmldsig-core1-20110303/</a>
</dd><dt id="bib-XMLDSIG-CORE2">[XMLDSIG-CORE2]</dt><dd>Mark Bartel; John Boyer; Barb Fox et al. <a href="http://www.w3.org/TR/2011/WD-xmldsig-core2-20110421/"><cite>XML Signature Syntax and Processing Version 2.0</cite></a>. 21 April 2011. W3C Last Call Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-xmldsig-core2-20110421/">http://www.w3.org/TR/2011/WD-xmldsig-core2-20110421/</a>
</dd><dt id="bib-XMLDSIG-XPATH-FILTER2">[XMLDSIG-XPATH-FILTER2]</dt><dd>Merlin Hughes; John Boyer; Joseph Reagle. <a href="http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/"><cite>XML-Signature XPath Filter 2.0.</cite></a> 8 November 2002. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/">http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/</a>
</dd><dt id="bib-XPTR-ELEMENT">[XPTR-ELEMENT]</dt><dd>Norman Walsh; et al. <a href="http://www.w3.org/TR/2003/REC-xptr-element-20030325/"><cite>XPointer element() Scheme.</cite></a> 25 March 2003. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2003/REC-xptr-element-20030325/">http://www.w3.org/TR/2003/REC-xptr-element-20030325/</a>
</dd><dt id="bib-XPTR-XPOINTER">[XPTR-XPOINTER]</dt><dd>Ron Daniel Jr.; Eve Maler; Steven DeRose. <a href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/"><cite>XPointer xpointer() Scheme.</cite></a> 19 December 2002. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/">http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/</a>
</dd></dl></div></div></body></html>