/
_character-map-test-set.xml
584 lines (553 loc) · 22.4 KB
/
_character-map-test-set.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<test-set xmlns="http://www.w3.org/2012/10/xslt-test-catalog"
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="character-map">
<description>Tests the xsl:character-map declaration</description>
<environment name="charmap001">
<source role=".">
<content><![CDATA[<doc><a value="abcde">vwxyz</a></doc>]]></content>
</source>
</environment>
<dependencies>
<feature value="serialization" satisfied="true"/>
</dependencies>
<test-case name="character-map-001">
<description>test simple use of a character map</description>
<keywords>single-character-map xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-001.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]ab\[C\]de['"]</serialization-matches>
<serialization-matches>vw\[X\]yz</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-002">
<description>test a composite character map</description>
<keywords>composite-character-map xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-002.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]ab\[C\]de['"]</serialization-matches>
<serialization-matches>vwx\[Y\]z</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-003">
<description>test a composite character map containing duplicate characters</description>
<keywords>composite-character-map conflict-resolution xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-003.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]ab\{C\}de['"]</serialization-matches>
<serialization-matches>vwx\{Y\}z</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-004">
<description>test xsl:output referencing two character maps. Use forwards
references</description>
<keywords>multiple-character-maps conflict-resolution xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-004.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]ab\[C\]de['"]</serialization-matches>
<serialization-matches>vwx\{Y\}z</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-005">
<description>test multiple xsl:outputs referencing character maps.</description>
<keywords>multiple-character-maps conflict-resolution xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-005.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]\[A\]b\{C\}de['"]</serialization-matches>
<serialization-matches>vwx\{Y\}z</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-006">
<description>test generation of markup using character maps.</description>
<keywords>single-character-map xml-markup-generation xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-006.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]abcde['"]</serialization-matches>
<serialization-matches><jjj>wxy</jjj></serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-007">
<description>test use of high Unicode characters in character maps.</description>
<keywords>unicode encoding-attribute iso-8859-1 single-character-map
xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-007.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>\[\[\[#####\]\]\]</serialization-matches>
</result>
</test-case>
<test-case name="character-map-008">
<description>test character maps in a namespace</description>
<keywords>qname-resolution composite-character-map xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-008.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>value=['"]\[A\]\[B\]cde['"]</serialization-matches>
<serialization-matches>vwxyz</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-009">
<description> Test character maps with HTML output method, specifically the interaction of
HTML URI escaping with character maps. See resolution of CR Bug 2459. </description>
<keywords>html-uri-escaping single-character-map html-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-009.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>href=['"]z-linkage\.html['"]</serialization-matches>
<serialization-matches>>A \[Z\] linkage</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-010">
<description>test use of a character map in attribute values</description>
<keywords>single-character-map attribute-nodes illegal-xml-generation
xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-010.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>att1=['"]normal['"]</serialization-matches>
<serialization-matches>att2=['"]&amp;\[<\]&amp;\[>\]&amp;['"]</serialization-matches>
<serialization-matches>att3=['"](&#100000;|&#x186[aA]0;)['"]</serialization-matches>
<serialization-matches>att4=['"]He said "quote", I think['"]</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-011">
<description>test character maps with a default namespace</description>
<keywords>iso-8859-1 single-character-map namespace-resolution xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-011.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches><x>b</x></serialization-matches>
</result>
</test-case>
<test-case name="character-map-012">
<description>test character maps with method="text"</description>
<keywords>text-output-method single-character-map</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-012.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>^b$</serialization-matches>
</result>
</test-case>
<test-case name="character-map-013">
<description>tests generation of special characters in replacement string with HTML output
method (both text and attribute nodes)</description>
<keywords>iso-8859-1 illegal-xml-generation single-character-map html-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-013.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches><body>value='<%= "id" \+ idValue %>'</serialization-matches>
<serialization-matches><setProperty value=['"]<%= "id" \+ idValue %>['"]</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-014">
<description>tests generation of special characters in replacement string with text output
method (both text and attribute nodes)</description>
<keywords>iso-8859-1 single-character-map text-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-014.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>\[\{\{=\}\}\]</serialization-matches>
</result>
</test-case>
<test-case name="character-map-015">
<description>tests use of a character map in xsl:result-document (no href
attribute)</description>
<keywords>single-character-map iso-8859-1 xsl:result-document</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-015.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>\[\{\{=\}\}\]</serialization-matches>
</result>
</test-case>
<test-case name="character-map-016">
<description>tests use of a character map in xsl:result-document combined with one on
xsl:output, including a conflict</description>
<keywords>xsl:result-document multiple-character-maps conflict-resolution
xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-016.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>\[\{\{#\}\}\]</serialization-matches>
</result>
</test-case>
<test-case name="character-map-017">
<description>test simple use of a character map with XHTML output method</description>
<keywords>single-character-map xhtml-output-method _WRONG:output-method-incorrect</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-017.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>content=["']te\[X\]t/html; \[C\]harset=UTF-8['"]</serialization-matches>
<serialization-matches>The qui\[C\]k brown fo\[X\] jumped over the lazy dog</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-018">
<description>tests use of a character map in xsl:result-document combined with one on
xsl:output, including a conflict. Same as charmap018, but with a forwards
reference</description>
<keywords>multiple-character-maps conflict-resolution xml-output-method
xsl:result-document</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-018.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches>\[\{\{#\}\}\]</serialization-matches>
</result>
</test-case>
<test-case name="character-map-019">
<description>test unresolved reference from xsl:output to character map.</description>
<keywords>multiple-character-maps XTSE1590 xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-019.xsl"/>
<output serialize="yes"/>
</test>
<result>
<error code="XTSE1590"/>
</result>
</test-case>
<test-case name="character-map-020">
<description>test unresolved reference from xsl:character-map to another character
map.</description>
<keywords>XTSE1590 xml-output-method multiple-character-maps</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-020.xsl"/>
<output serialize="yes"/>
</test>
<result>
<error code="XTSE1590"/>
</result>
</test-case>
<test-case name="character-map-021">
<description>test circular reference from xsl:character-map to another character
map.</description>
<keywords>XTSE1600 conflict-resolution circular-reference xml-output-method
multiple-character-maps</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-021.xsl"/>
<output serialize="yes"/>
</test>
<result>
<error code="XTSE1600"/>
</result>
</test-case>
<test-case name="character-map-022">
<description>test multiple xsl:character-maps with same name.</description>
<keywords>conflict-resolution xml-output-method multiple-character-maps</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-022.xsl"/>
<output serialize="yes"/>
</test>
<result>
<error code="XTSE1580"/>
</result>
</test-case>
<test-case name="character-map-023">
<description/>
<keywords>single-character-map xml-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment>
<source role=".">
<content><![CDATA[<root>Hello < > World</root>]]></content>
</source>
</environment>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-023.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches>Hello &lt; GT World</serialization-matches>
<serialization-matches>att=['"]&lt;GT&lt;GT['"]</serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-024">
<description>test character maps with text output method</description>
<keywords>single-character-map text-output-method</keywords>
<created by="Michael Kay" on="2012-11-07"/>
<modified by="John Lumley" on="2014-09-02" change="Declared serialization requirement"/>
<environment>
<source role=".">
<content><![CDATA[<x><z>1+2</z></x>]]></content>
</source>
</environment>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-024.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches><z>1plus2</z></serialization-matches>
</result>
</test-case>
<test-case name="character-map-025">
<description>Test that characters produced by a character map are immune to Unicode normalization</description>
<keywords>single-character-map xml-output-method</keywords>
<created by="Michael Kay" on="2016-02-18"/>
<modified by="Debbie Lockett" on="2019-11-29" change="Use numeric character references in regex"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-025.xsl"/>
<output serialize="yes"/>
</test>
<result>
<any-of>
<!-- The first c-cedilla is in composed form as codepoint (231); the second is in decomposed form as (99, 807) -->
<serialization-matches><out>ab#ç#çde</out></serialization-matches>
<serialization-matches><out>ab#ç#çde</out></serialization-matches>
</any-of>
</result>
</test-case>
<test-case name="character-map-026">
<description>Test use of character maps with the adaptive output method</description>
<keywords>single-character-map adaptive-output-method</keywords>
<created by="Michael Kay" on="2019-04-02"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-026.xsl"/>
<output serialize="yes"/>
</test>
<result>
<all-of>
<serialization-matches><![CDATA[<test>\\'E4</test>]]></serialization-matches>
<serialization-matches><![CDATA["\\'E4"]]></serialization-matches>
<serialization-matches><![CDATA[map\{"ä":"\\'E4"\}]]></serialization-matches>
</all-of>
</result>
</test-case>
<test-case name="character-map-027">
<description>Misplaced character map declaration</description>
<created by="Michael Kay after Dave Pawson" on="2019-11-22"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-027.xsl"/>
<initial-template name="go"/>
</test>
<result>
<error code="XTSE0010"/>
</result>
</test-case>
<test-case name="character-map-028">
<description>Test that characters produced by a character map are immune to Unicode normalization</description>
<keywords>single-character-map xml-output-method</keywords>
<created by="Debbie Lockett" on="2019-11-29"/>
<environment ref="charmap001"/>
<dependencies>
<spec value="XSLT20+"/>
</dependencies>
<test>
<stylesheet file="character-map-028.xsl"/>
<output serialize="yes"/>
</test>
<result>
<serialization-matches><out att=['"]ab#ç#çde['"]>ab#ç#çde</out></serialization-matches>
</result>
</test-case>
</test-set>