-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathhtml-manifest.html
1671 lines (1671 loc) · 61.3 KB
/
html-manifest.html
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
<!DOCTYPE html>
<html>
<head>
<meta content='text/html;charset=utf-8' http-equiv='Content-Type'>
<title>
HTML
</title>
<link href='html-manifest.jsonld' rel='alternate'>
<link href='https://www.w3.org/StyleSheets/TR/base' rel='stylesheet'>
</head>
<body>
<p>
<a href='http://www.w3.org/'>
<img alt='W3C' height='48' src='http://www.w3.org/Icons/w3c_home' width='72'>
</a>
</p>
<h1>HTML</h1>
<p>These tests implement the requirements for the JSON-LD <a href="https://www.w3.org/TR/json-ld11-api/#html-content-algorithms">HTML Content Algorithms</a>.</p>
<p>This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at
<a href="html-manifest.jsonld">html-manifest.jsonld</a>. The manifest vocabulary is described in the <a href="vocab.html">JSON-LD Test Vocabulary</a> (<a href="vocab.jsonld">JSON-LD</a>, <a href="vocab.ttl">Turtle</a>) and is based on the <a href="http://www.w3.org/TR/2014/NOTE-rdf11-testcases-20140225/">RDF Test Vocabulary</a>.</p>
<p>The JSON-LD Test Suite is a set of tests that can
be used to verify JSON-LD Processor conformance to the set of specifications
that constitute JSON-LD. The goal of the suite is to provide an easy and
comprehensive JSON-LD testing solution for developers creating JSON-LD Processors.</p>
<p>The <a href="https://w3.org/TR/json-ld11-framing">JSON-LD Framing Specification</a> maintains its own
<a href="https://w3c.github.io/json-ld-framing/tests/">test suite</a>.</p>
<h2>General instructions for running the JSON-LD Test suites</h2>
<h3><a href="compact-manifest.html">compact</a> tests have <em>input</em>, <em>expected</em> and <em>context</em> documents.</h3>
<p>The <em>expected</em> results can be compared using <a href="#json-ld-object-comparison">JSON-LD object comparison</a> with the processor output. Additionally, if the <code>ordered</code> option is not set, result should be expanded and compared with the expanded <em>expected</em> document also using <a href="#json-ld-object-comparison">JSON-LD object comparison</a>.</p>
<p>For <strong>NegativeEvaluationTests</strong>, the result is a string associated with the expected error code.</p>
<h3><a href="expand-manifest.html">expand</a> tests have <em>input</em> and <em>expected</em> documents.</h3>
<p>The <em>expected</em> results can be compared using <a href="#json-ld-object-comparison">JSON-LD object comparison</a> with the processor output.</p>
<p>Expansion tests may have a <code>expandContext</code> option, which is treated
as an IRI relative to the manifest.</p>
<p>For <strong>NegativeEvaluationTests</strong>, the result is a string associated with the expected error code.</p>
<h3><a href="html-manifest.html">html</a> tests have <em>input</em> and <em>expected</em> documents and an optional <em>context</em> document.</h3>
<p>The <em>expected</em> results can be compared using <a href="#json-ld-object-comparison">JSON-LD object comparison</a> with the processor output after potentially remapping blank node identifiers (see below). Additionally, if the result is compacted and the <code>ordered</code> option is not set, result should be expanded and compared with the expanded <em>expected</em> document also using <a href="#json-ld-object-comparison">JSON-LD object comparison</a>.</p>
<p>For <strong>NegativeEvaluationTests</strong>, the result is a string associated with the expected error code.</p>
<h3><a href="flatten-manifest.html">flatten</a> tests have <em>input</em> and <em>expected</em> documents and an optional <em>context</em> document.</h3>
<p>The <em>expected</em> results can be compared using <a href="#json-ld-object-comparison">JSON-LD object comparison</a> with the processor output after potentially remapping blank node identifiers (see below). Additionally, if the result is compacted and the <code>ordered</code> option is not set, result should be expanded and compared with the expanded <em>expected</em> document also using <a href="#json-ld-object-comparison">JSON-LD object comparison</a>.</p>
<p>For <strong>NegativeEvaluationTests</strong>, the result is a string associated with the expected error code.</p>
<p>Unless <code>processingMode</code> is set explicitly in a test entry, <code>processingMode</code> is compatible with both <code>json-ld-1.0</code> and <code>json-ld-1.1</code>.</p>
<p>Test results that include a context input presume that the context is provided locally, and not from the referenced location, thus the results will include the content of the context file, rather than a reference.</p>
<p>Developers are encouraged to make a local copy of the test suite (available on <a href="https://github.com/w3c/json-ld-api/tree/main/tests">GitHub</a>) and simulate the behavior of fetching test files remotely and setting HTTP headers as described in a particular test entry.</p>
<h2 id="json-ld-object-comparison">JSON-LD Object comparison</h2>
<p>If algorithms are invoked with the <code>ordered</code> flag set to <code>true</code>, simple JSON Object comparison may be used, as the order of all arrays will be preserved (except for <em>fromRdf</em>, unless the input quads are also ordered). If <code>ordered</code> is <code>false</code>, then the following algorithm will ensure arrays other than values of <code>@list</code> are compared without regard to order.</p>
<p>JSON-LD Object comparison compares JSON objects, arrays, and values recursively for equality.</p>
<ul>
<li>JSON objects are compared entry by entry without regard to the ordering of entries within the object. Each entry must have a corresponding entry in the object being compared to. Values are compared recursively.</li>
<li>JSON arrays are generally compared without regard to order (the lone exception being if the referencing key is <code>@list</code>). Each item within the array must be equivalent to an item in the array being compared to by using the comparison algorithm recursively. For values of <code>@list</code>, the order of these items is significant.</li>
<li>JSON values are compared using strict equality.</li>
<li>Values of <code>@language</code>, and other places where language tags may be used are specified in lowercase in the test results. Implementations should either normalize language tags for testing purposes, or compare language tags in a case-independent way.</li>
</ul>
<p>Note that some tests require re-expansion and comparison, as list values may exist as values of properties that have <code>@container: @list</code> and the comparison algorithm will not consider ordering significant.</p>
<h1>Running tests</h1>
<p>The top-level <a href="manifest.jsonld">manifest</a> references the specific test manifests, which in turn reference each test associated with a particular type of behavior.</p>
<p>Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:</p>
<ul>
<li><em>remote-doc</em> tests will likely not return expected HTTP headers, so the <em>options</em> should be used to determine what headers are associated with the input document.</li>
<li>Test case properties identifying a file (<em>input</em>, <em>output</em>, <em>context</em>, <em>expectContext</em>, and <em>frame</em>) are presumed to have a media type appropriate for the file extension.
<ul>
<li><code>application/ld+json</code> for <code>.jsonld</code></li>
<li><code>text/html</code> for <code>.html</code></li>
<li><code>application/n-quads</code> for <code>.nq</code></li>
</ul>
</li>
<li>The media type for the file associated with the <em>input</em> property can be overridden using the <code>contentType</code> option.</li>
<li>Some algorithms, particularly <em>fromRdf</em>, may not preserve the order of statements listed in the input document, and provision should be taken for performing unordered array comparison, for arrays other than values of <code>@list</code>. (This may be difficult for compacted results, where array value ordering is dependent on the associated term definition).</li>
<li>Some <em>toRdf</em> tests require the use of <a href="https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05">JSON Canonicalization Scheme</a> to properly generate RDF Literals from JSON literal values. This algorithm is non-normative, but is assumed to be used to properly compare results using <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-dataset-isomorphism">RDF Dataset Isomorphism</a>. These tests are marked using the <code>useJCS</code> option.</li>
<li>When comparing documents after flattening, framing or generating RDF, blank node identifiers may not be predictable. Implementations using the JSON-LD 1.0 algorithm, where output is always sorted and blank node identifiers are generated sequentially from <code>_:b0</code> may continue to use a simple object comparison. Otherwise, implementations should take this into consideration. (One way to do this may be to reduce both results and <em>expected</em> to datsets to extract a bijective mapping of blank node labels between the two datasets as described in <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-dataset-isomorphism">RDF Dataset Isomorphism</a>).</li>
<li>Some tests may have a <code>requires</code> property, indicating some optional behavior described by a test vocabulary term.</li>
</ul>
<h1>Contributing Tests</h1>
<p>If you would like to contribute a new test or a fix to an existing test,
please follow these steps:</p>
<ol>
<li>Notify the JSON-LD mailing list, [email protected],
that you will be creating a new test or fix and the purpose of the
change.</li>
<li>Clone the git repository: git://github.com/w3c/json-ld-api.git</li>
<li>Make your changes and submit them via github, or via a 'git format-patch'
to the <a href="mailto:[email protected]">JSON-LD Working Group mailing list</a>.</li>
</ol>
<h2>Distribution</h2>
<p>Distributed under the <a href="http://www.w3.org/Consortium/Legal/2008/04-testsuite-license">W3C Test Suite License</a>. To contribute to a W3C Test Suite, see the <a href="http://www.w3.org/2004/10/27-testcases">policies and contribution forms</a>.</p>
<h2>Disclaimer</h2>
<p>UNDER THE EXCLUSIVE LICENSE, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.</p>
<dl>
<dt>baseIri</dt>
<dd>https://w3c.github.io/json-ld-api/tests/</dd>
</dl>
<section>
<h2>
Test sequence:
</h2>
<dl class='entries'>
<dt id='te001'>
Test te001 Expands embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te001</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e001-in.html'>html/e001-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e001-out.jsonld'>html/e001-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tex01'>
Test tex01 Expands embedded JSON-LD script element (xhtml)
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tex01</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in XHTML</dd>
<dt>input</dt>
<dd>
<a href='html/e001-in.html'>html/e001-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e001-out.jsonld'>html/e001-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>contentType</dt>
<dd>application/xhtml+xml</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te002'>
Test te002 Expands first embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te002</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e002-in.html'>html/e002-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e002-out.jsonld'>html/e002-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te003'>
Test te003 Expands targeted JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te003</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with fragment identifier</dd>
<dt>input</dt>
<dd>
<a href='html/e003-in.html#second'>html/e003-in.html#second</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e003-out.jsonld'>html/e003-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te004'>
Test te004 Expands all embedded JSON-LD script elements with extractAllScripts option
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te004</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML extracting all elements</dd>
<dt>input</dt>
<dd>
<a href='html/e004-in.html'>html/e004-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e004-out.jsonld'>html/e004-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>extractAllScripts</dt>
<dd>true</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te005'>
Test te005 Expands multiple embedded JSON-LD script elements where one is an array
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te005</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML extracting all elements with array</dd>
<dt>input</dt>
<dd>
<a href='html/e005-in.html'>html/e005-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e005-out.jsonld'>html/e005-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>extractAllScripts</dt>
<dd>true</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te006'>
Test te006 Expands as empty with no embedded JSON-LD script elements
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te006</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML when none exist</dd>
<dt>input</dt>
<dd>
<a href='html/e006-in.html'>html/e006-in.html</a>
</dd>
<dt>expect</dt>
<dd>
loading document failed
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te007'>
Test te007 Expands as empty with no embedded JSON-LD script elements and extractAllScripts
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te007</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML when none exist extracting all elements</dd>
<dt>input</dt>
<dd>
<a href='html/e007-in.html'>html/e007-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e007-out.jsonld'>html/e007-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>extractAllScripts</dt>
<dd>true</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te010'>
Test te010 Expands embedded JSON-LD script element with HTML character references
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te010</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with character references</dd>
<dt>input</dt>
<dd>
<a href='html/e010-in.html'>html/e010-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e010-out.jsonld'>html/e010-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te011'>
Test te011 Errors if no element found at target
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te011</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with fragment identifier that doesn't exist</dd>
<dt>input</dt>
<dd>
<a href='html/e011-in.html#third'>html/e011-in.html#third</a>
</dd>
<dt>expect</dt>
<dd>
loading document failed
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te012'>
Test te012 Errors if targeted element is not a script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te012</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML which isn't a script element</dd>
<dt>input</dt>
<dd>
<a href='html/e012-in.html#first'>html/e012-in.html#first</a>
</dd>
<dt>expect</dt>
<dd>
loading document failed
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te013'>
Test te013 Errors if targeted element does not have type application/ld+json
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te013</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with wrong type</dd>
<dt>input</dt>
<dd>
<a href='html/e013-in.html#first'>html/e013-in.html#first</a>
</dd>
<dt>expect</dt>
<dd>
loading document failed
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te014'>
Test te014 Errors if uncommented script text contains comment
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te014</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with comments leftover</dd>
<dt>input</dt>
<dd>
<a href='html/e014-in.html'>html/e014-in.html</a>
</dd>
<dt>expect</dt>
<dd>
invalid script element
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te015'>
Test te015 Errors if end comment missing
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te015</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with unballanced comments</dd>
<dt>input</dt>
<dd>
<a href='html/e015-in.html'>html/e015-in.html</a>
</dd>
<dt>expect</dt>
<dd>
invalid script element
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te016'>
Test te016 Errors if start comment missing
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te016</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with unballanced comments</dd>
<dt>input</dt>
<dd>
<a href='html/e016-in.html'>html/e016-in.html</a>
</dd>
<dt>expect</dt>
<dd>
invalid script element
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te017'>
Test te017 Errors if uncommented script is not valid JSON
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te017</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML which is invalid JSON</dd>
<dt>input</dt>
<dd>
<a href='html/e017-in.html'>html/e017-in.html</a>
</dd>
<dt>expect</dt>
<dd>
invalid script element
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te018'>
Test te018 Expands embedded JSON-LD script element relative to document base
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te018</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e018-in.html'>html/e018-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e018-out.jsonld'>html/e018-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te019'>
Test te019 Expands embedded JSON-LD script element relative to base option
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te019</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e019-in.html'>html/e019-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e019-out.jsonld'>html/e019-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>base</dt>
<dd>http://a.example.com/doc</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te020'>
Test te020 Expands embedded JSON-LD script element relative to HTML base
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te020</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e020-in.html'>html/e020-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e020-out.jsonld'>html/e020-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>base</dt>
<dd>http://a.example.com/doc</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te021'>
Test te021 Expands embedded JSON-LD script element relative to relative HTML base
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te021</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/e021-in.html'>html/e021-in.html</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e021-out.jsonld'>html/e021-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>base</dt>
<dd>http://a.example.com/doc</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te022'>
Test te022 Expands targeted JSON-LD script element with fragment and HTML base
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te022</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with fragment identifier</dd>
<dt>input</dt>
<dd>
<a href='html/e022-in.html#second'>html/e022-in.html#second</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/e022-out.jsonld'>html/e022-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tc001'>
Test tc001 Compacts embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tc001</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:CompactTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/c001-in.html'>html/c001-in.html</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/c001-context.jsonld'>html/c001-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/c001-out.jsonld'>html/c001-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tc002'>
Test tc002 Compacts first embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tc002</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:CompactTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/c002-in.html'>html/c002-in.html</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/c002-context.jsonld'>html/c002-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/c002-out.jsonld'>html/c002-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tc003'>
Test tc003 Compacts targeted JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tc003</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:CompactTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with fragment identifier</dd>
<dt>input</dt>
<dd>
<a href='html/c003-in.html#second'>html/c003-in.html#second</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/c003-context.jsonld'>html/c003-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/c003-out.jsonld'>html/c003-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tc004'>
Test tc004 Compacts all embedded JSON-LD script elements with extractAllScripts option
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tc004</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:CompactTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML extracting all elements</dd>
<dt>input</dt>
<dd>
<a href='html/c004-in.html'>html/c004-in.html</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/c004-context.jsonld'>html/c004-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/c004-out.jsonld'>html/c004-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>extractAllScripts</dt>
<dd>true</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tf001'>
Test tf001 Flattens embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tf001</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:FlattenTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/f001-in.html'>html/f001-in.html</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/f001-context.jsonld'>html/f001-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/f001-out.jsonld'>html/f001-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tf002'>
Test tf002 Flattens first embedded JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tf002</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:FlattenTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML</dd>
<dt>input</dt>
<dd>
<a href='html/f002-in.html'>html/f002-in.html</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/f002-context.jsonld'>html/f002-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/f002-out.jsonld'>html/f002-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>extractAllScripts</dt>
<dd>false</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tf003'>
Test tf003 Flattens targeted JSON-LD script element
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tf003</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:FlattenTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML with fragment identifier</dd>
<dt>input</dt>
<dd>
<a href='html/f003-in.html#second'>html/f003-in.html#second</a>
</dd>
<dt>context</dt>
<dd>
<a href='html/f003-context.jsonld'>html/f003-context.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='html/f003-out.jsonld'>html/f003-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
<dt>processorFeature</dt>
<dd>HTML Script Extraction</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tf004'>
Test tf004 Flattens first script element by default
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#tf004</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:FlattenTest, jld:HtmlTest</dd>
<dt>Purpose</dt>
<dd>Tests embedded JSON-LD in HTML multiple script elements</dd>
<dt>input</dt>
<dd>
<a href='html/f004-in.html'>html/f004-in.html</a>
</dd>
<dt>context</dt>
<dd>