-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathvalidator-generated.php
5276 lines (5247 loc) · 183 KB
/
validator-generated.php
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
<?php
/*
* Copyright 2016 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// Generated by validator_gen_php.py - do not edit.
// validator_gen_php.py is available in a Lullabot forked repo https://github.com/Lullabot/amphtml
// Be sure to look in the `php-validator-generated` branch of the repo in the `validator` folder
//
namespace Lullabot\AMP\Spec;
class AmpLayout {
public $supported_layouts = [];
public $defines_default_width = null;
public $defines_default_height = null;
}
class AmpLayoutLayout {
const UNKNOWN = 'UNKNOWN';
const NODISPLAY = 'NODISPLAY';
const FIXED = 'FIXED';
const FIXED_HEIGHT = 'FIXED_HEIGHT';
const RESPONSIVE = 'RESPONSIVE';
const CONTAINER = 'CONTAINER';
const FILL = 'FILL';
const FLEX_ITEM = 'FLEX_ITEM';
const INTRINSIC = 'INTRINSIC';
}
class AtRuleSpec {
public $name = null;
public $type = null;
}
class AtRuleSpecBlockType {
const PARSE_AS_ERROR = 'PARSE_AS_ERROR';
const PARSE_AS_IGNORE = 'PARSE_AS_IGNORE';
const PARSE_AS_RULES = 'PARSE_AS_RULES';
const PARSE_AS_DECLARATIONS = 'PARSE_AS_DECLARATIONS';
}
class AttrList {
public $name = null;
public $attrs = [];
}
class AttrSpec {
public $name = null;
public $alternative_names = [];
public $mandatory = null;
public $mandatory_oneof = null;
public $value = null;
public $value_regex = null;
public $value_regex_casei = null;
public $value_url = null;
public $value_properties = null;
public $trigger = null;
public $blacklisted_value_regex = null;
public $deprecation = null;
public $deprecation_url = null;
public $dispatch_key = null;
public $implicit = null;
}
class AttrTriggerSpec {
public $if_value_regex = null;
public $also_requires_attr = [];
}
class BlackListedCDataRegex {
public $regex = null;
public $error_message = null;
}
class CdataSpec {
public $max_bytes = null;
public $max_bytes_spec_url = null;
public $mandatory_cdata = null;
public $cdata_regex = null;
public $css_spec = null;
public $blacklisted_cdata_regex = [];
}
class ChildTagSpec {
public $mandatory_num_child_tags = null;
public $first_child_tag_name_oneof = [];
public $child_tag_name_oneof = [];
}
class CssRuleSpec {
}
class CssSpec {
public $at_rule_spec = [];
public $css_rule = [];
public $image_url_spec = null;
public $font_url_spec = null;
}
class ErrorCategory {
}
class ErrorCategoryCode {
const UNKNOWN = 'UNKNOWN';
const GENERIC = 'GENERIC';
const DISALLOWED_HTML_WITH_AMP_EQUIVALENT = 'DISALLOWED_HTML_WITH_AMP_EQUIVALENT';
const DISALLOWED_HTML = 'DISALLOWED_HTML';
const AUTHOR_STYLESHEET_PROBLEM = 'AUTHOR_STYLESHEET_PROBLEM';
const MANDATORY_AMP_TAG_MISSING_OR_INCORRECT = 'MANDATORY_AMP_TAG_MISSING_OR_INCORRECT';
const AMP_TAG_PROBLEM = 'AMP_TAG_PROBLEM';
const CUSTOM_JAVASCRIPT_DISALLOWED = 'CUSTOM_JAVASCRIPT_DISALLOWED';
const AMP_LAYOUT_PROBLEM = 'AMP_LAYOUT_PROBLEM';
const AMP_HTML_TEMPLATE_PROBLEM = 'AMP_HTML_TEMPLATE_PROBLEM';
const DEPRECATION = 'DEPRECATION';
}
class ErrorFormat {
public $code = null;
public $format = null;
}
class PropertySpec {
public $name = null;
public $mandatory = null;
public $value = null;
public $value_double = null;
}
class PropertySpecList {
public $properties = [];
}
class TagSpec {
public $tag_name = null;
public $spec_name = null;
public $mandatory = null;
public $mandatory_alternatives = null;
public $unique = null;
public $mandatory_parent = null;
public $mandatory_ancestor = null;
public $mandatory_ancestor_suggested_alternative = null;
public $disallowed_ancestor = [];
public $also_requires_tag = [];
public $deprecation = null;
public $deprecation_url = null;
public $attrs = [];
public $attr_lists = [];
public $cdata = null;
public $child_tags = null;
public $spec_url = null;
public $amp_layout = null;
}
class UrlSpec {
public $allowed_protocol = [];
public $allow_relative = null;
public $allow_empty = null;
}
class ValidationError {
public $severity = null;
public $code = null;
public $line = null;
public $col = null;
public $detail = null;
public $spec_url = null;
public $params = [];
public $category = null;
public $data_amp_report_test_value = null;
}
class ValidationErrorCode {
const UNKNOWN_CODE = 'UNKNOWN_CODE';
const MANDATORY_TAG_MISSING = 'MANDATORY_TAG_MISSING';
const TAG_REQUIRED_BY_MISSING = 'TAG_REQUIRED_BY_MISSING';
const ATTR_REQUIRED_BUT_MISSING = 'ATTR_REQUIRED_BUT_MISSING';
const DISALLOWED_TAG = 'DISALLOWED_TAG';
const GENERAL_DISALLOWED_TAG = 'GENERAL_DISALLOWED_TAG';
const DISALLOWED_ATTR = 'DISALLOWED_ATTR';
const INVALID_ATTR_VALUE = 'INVALID_ATTR_VALUE';
const ATTR_VALUE_REQUIRED_BY_LAYOUT = 'ATTR_VALUE_REQUIRED_BY_LAYOUT';
const IMPLIED_LAYOUT_INVALID = 'IMPLIED_LAYOUT_INVALID';
const SPECIFIED_LAYOUT_INVALID = 'SPECIFIED_LAYOUT_INVALID';
const MANDATORY_ATTR_MISSING = 'MANDATORY_ATTR_MISSING';
const MANDATORY_ONEOF_ATTR_MISSING = 'MANDATORY_ONEOF_ATTR_MISSING';
const DUPLICATE_DIMENSION = 'DUPLICATE_DIMENSION';
const DUPLICATE_UNIQUE_TAG = 'DUPLICATE_UNIQUE_TAG';
const WRONG_PARENT_TAG = 'WRONG_PARENT_TAG';
const STYLESHEET_TOO_LONG_OLD_VARIANT = 'STYLESHEET_TOO_LONG_OLD_VARIANT';
const STYLESHEET_TOO_LONG = 'STYLESHEET_TOO_LONG';
const MANDATORY_CDATA_MISSING_OR_INCORRECT = 'MANDATORY_CDATA_MISSING_OR_INCORRECT';
const CDATA_VIOLATES_BLACKLIST = 'CDATA_VIOLATES_BLACKLIST';
const DEV_MODE_ENABLED = 'DEV_MODE_ENABLED';
const DEPRECATED_ATTR = 'DEPRECATED_ATTR';
const DEPRECATED_TAG = 'DEPRECATED_TAG';
const MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE = 'MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE';
const INVALID_PROPERTY_VALUE_IN_ATTR_VALUE = 'INVALID_PROPERTY_VALUE_IN_ATTR_VALUE';
const MISSING_URL = 'MISSING_URL';
const INVALID_URL = 'INVALID_URL';
const INVALID_URL_PROTOCOL = 'INVALID_URL_PROTOCOL';
const DISALLOWED_RELATIVE_URL = 'DISALLOWED_RELATIVE_URL';
const DISALLOWED_PROPERTY_IN_ATTR_VALUE = 'DISALLOWED_PROPERTY_IN_ATTR_VALUE';
const MUTUALLY_EXCLUSIVE_ATTRS = 'MUTUALLY_EXCLUSIVE_ATTRS';
const UNESCAPED_TEMPLATE_IN_ATTR_VALUE = 'UNESCAPED_TEMPLATE_IN_ATTR_VALUE';
const TEMPLATE_PARTIAL_IN_ATTR_VALUE = 'TEMPLATE_PARTIAL_IN_ATTR_VALUE';
const TEMPLATE_IN_ATTR_NAME = 'TEMPLATE_IN_ATTR_NAME';
const INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT = 'INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT';
const DISALLOWED_TAG_ANCESTOR = 'DISALLOWED_TAG_ANCESTOR';
const MANDATORY_TAG_ANCESTOR = 'MANDATORY_TAG_ANCESTOR';
const MANDATORY_TAG_ANCESTOR_WITH_HINT = 'MANDATORY_TAG_ANCESTOR_WITH_HINT';
const ATTR_DISALLOWED_BY_IMPLIED_LAYOUT = 'ATTR_DISALLOWED_BY_IMPLIED_LAYOUT';
const ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT = 'ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT';
const INCORRECT_NUM_CHILD_TAGS = 'INCORRECT_NUM_CHILD_TAGS';
const DISALLOWED_CHILD_TAG_NAME = 'DISALLOWED_CHILD_TAG_NAME';
const DISALLOWED_FIRST_CHILD_TAG_NAME = 'DISALLOWED_FIRST_CHILD_TAG_NAME';
const CSS_SYNTAX = 'CSS_SYNTAX';
const CSS_SYNTAX_INVALID_AT_RULE = 'CSS_SYNTAX_INVALID_AT_RULE';
const CSS_SYNTAX_STRAY_TRAILING_BACKSLASH = 'CSS_SYNTAX_STRAY_TRAILING_BACKSLASH';
const CSS_SYNTAX_UNTERMINATED_COMMENT = 'CSS_SYNTAX_UNTERMINATED_COMMENT';
const CSS_SYNTAX_UNTERMINATED_STRING = 'CSS_SYNTAX_UNTERMINATED_STRING';
const CSS_SYNTAX_BAD_URL = 'CSS_SYNTAX_BAD_URL';
const CSS_SYNTAX_EOF_IN_PRELUDE_OF_QUALIFIED_RULE = 'CSS_SYNTAX_EOF_IN_PRELUDE_OF_QUALIFIED_RULE';
const CSS_SYNTAX_INVALID_DECLARATION = 'CSS_SYNTAX_INVALID_DECLARATION';
const CSS_SYNTAX_INCOMPLETE_DECLARATION = 'CSS_SYNTAX_INCOMPLETE_DECLARATION';
const CSS_SYNTAX_ERROR_IN_PSEUDO_SELECTOR = 'CSS_SYNTAX_ERROR_IN_PSEUDO_SELECTOR';
const CSS_SYNTAX_MISSING_SELECTOR = 'CSS_SYNTAX_MISSING_SELECTOR';
const CSS_SYNTAX_NOT_A_SELECTOR_START = 'CSS_SYNTAX_NOT_A_SELECTOR_START';
const CSS_SYNTAX_UNPARSED_INPUT_REMAINS_IN_SELECTOR = 'CSS_SYNTAX_UNPARSED_INPUT_REMAINS_IN_SELECTOR';
const CSS_SYNTAX_MISSING_URL = 'CSS_SYNTAX_MISSING_URL';
const CSS_SYNTAX_INVALID_URL = 'CSS_SYNTAX_INVALID_URL';
const CSS_SYNTAX_INVALID_URL_PROTOCOL = 'CSS_SYNTAX_INVALID_URL_PROTOCOL';
const CSS_SYNTAX_DISALLOWED_RELATIVE_URL = 'CSS_SYNTAX_DISALLOWED_RELATIVE_URL';
const CSS_SYNTAX_INVALID_ATTR_SELECTOR = 'CSS_SYNTAX_INVALID_ATTR_SELECTOR';
}
class ValidationErrorSeverity {
const UNKNOWN_SEVERITY = 'UNKNOWN_SEVERITY';
const ERROR = 'ERROR';
const WARNING = 'WARNING';
const PROD_WARNING = 'PROD_WARNING';
const DEV_WARNING = 'DEV_WARNING';
}
class ValidationResult {
public $status = null;
public $errors = [];
public $validator_revision = null;
public $spec_file_revision = null;
}
class ValidationResultStatus {
const UNKNOWN = 'UNKNOWN';
const PASS = 'PASS';
const FAIL = 'FAIL';
}
class ValidatorInfo {
public $rules_path = null;
public $validator_revision = null;
public $spec_file_revision = null;
}
class ValidatorRules {
public $tags = [];
public $attr_lists = [];
public $min_validator_revision_required = null;
public $spec_file_revision = null;
public $template_spec_url = null;
public $error_formats = [];
}
class ValidationRulesFactory {
public static function createValidationRules() {
$o_0 = new ValidatorRules();
$o_1 = new TagSpec();
$o_1->tag_name = '!doctype';
$o_1->spec_name = 'html doctype';
$o_1->mandatory = true;
$o_1->unique = true;
$o_1->mandatory_parent = '$ROOT';
$o_2 = new AttrSpec();
$o_2->name = 'html';
$o_2->mandatory = true;
$o_2->value = '';
$o_1->attrs[] = $o_2;
$o_0->tags[] = $o_1;
$o_3 = new TagSpec();
$o_3->tag_name = 'html';
$o_3->spec_name = 'html \u26a1 for top-level html';
$o_3->mandatory = true;
$o_3->unique = true;
$o_3->mandatory_parent = '!doctype';
$o_4 = new AttrSpec();
$o_4->name = '\u26a1';
$o_4->alternative_names = ['amp'];
$o_4->mandatory = true;
$o_4->value = '';
$o_3->attrs[] = $o_4;
$o_3->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_3;
$o_5 = new TagSpec();
$o_5->tag_name = 'head';
$o_5->mandatory = true;
$o_5->unique = true;
$o_5->mandatory_parent = 'html';
$o_5->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_5;
$o_6 = new TagSpec();
$o_6->tag_name = 'title';
$o_6->spec_name = 'title';
$o_0->tags[] = $o_6;
$o_7 = new TagSpec();
$o_7->tag_name = 'base';
$o_8 = new AttrSpec();
$o_8->name = 'target';
$o_8->value_regex_casei = '(_blank|_self)';
$o_7->attrs[] = $o_8;
$o_0->tags[] = $o_7;
$o_9 = new TagSpec();
$o_9->tag_name = 'link';
$o_9->spec_name = 'link rel=';
$o_10 = new AttrSpec();
$o_10->name = 'href';
$o_9->attrs[] = $o_10;
$o_11 = new AttrSpec();
$o_11->name = 'rel';
$o_11->mandatory = true;
$o_11->blacklisted_value_regex = '(^|\\s)(canonical|components|dns-prefetch|import|manifest|preconnect|prefetch|preload|prerender|serviceworker|stylesheet|subresource|)(\\s|$)';
$o_9->attrs[] = $o_11;
$o_12 = new AttrSpec();
$o_12->name = 'sizes';
$o_9->attrs[] = $o_12;
$o_13 = new AttrSpec();
$o_13->name = 'type';
$o_9->attrs[] = $o_13;
$o_9->attr_lists = ['common-link-attrs'];
$o_9->disallowed_ancestor = ['template'];
$o_0->tags[] = $o_9;
$o_14 = new TagSpec();
$o_14->tag_name = 'link';
$o_14->spec_name = 'link rel=canonical';
$o_14->mandatory = true;
$o_14->unique = true;
$o_14->mandatory_parent = 'head';
$o_15 = new AttrSpec();
$o_15->name = 'href';
$o_15->mandatory = true;
$o_16 = new UrlSpec();
$o_16->allowed_protocol = ['http', 'https'];
$o_16->allow_relative = true;
$o_15->value_url = $o_16;
$o_14->attrs[] = $o_15;
$o_17 = new AttrSpec();
$o_17->name = 'rel';
$o_17->mandatory = true;
$o_17->value = 'canonical';
$o_17->dispatch_key = true;
$o_14->attrs[] = $o_17;
$o_14->attr_lists = ['common-link-attrs'];
$o_14->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_14;
$o_18 = new TagSpec();
$o_18->tag_name = 'link';
$o_18->spec_name = 'link rel=stylesheet for fonts';
$o_18->mandatory_parent = 'head';
$o_19 = new AttrSpec();
$o_19->name = 'href';
$o_19->mandatory = true;
$o_19->value_regex = 'https://fonts\\.googleapis\\.com/css\\?.*|https://fonts\\.googleapis\\.com/icon\\?.*|https://fonts\\.googleapis\\.com/earlyaccess/.*\\.css|https://fast\\.fonts\\.net/.*|https://maxcdn\\.bootstrapcdn\\.com/font-awesome/.*';
$o_18->attrs[] = $o_19;
$o_20 = new AttrSpec();
$o_20->name = 'rel';
$o_20->mandatory = true;
$o_20->value = 'stylesheet';
$o_20->dispatch_key = true;
$o_18->attrs[] = $o_20;
$o_21 = new AttrSpec();
$o_21->name = 'type';
$o_21->value = 'text/css';
$o_18->attrs[] = $o_21;
$o_22 = new AttrSpec();
$o_22->name = 'media';
$o_18->attrs[] = $o_22;
$o_0->tags[] = $o_18;
$o_23 = new TagSpec();
$o_23->tag_name = 'link';
$o_23->spec_name = 'link itemprop=sameAs';
$o_24 = new AttrSpec();
$o_24->name = 'href';
$o_24->mandatory = true;
$o_23->attrs[] = $o_24;
$o_25 = new AttrSpec();
$o_25->name = 'itemprop';
$o_25->mandatory = true;
$o_25->value = 'sameAs';
$o_25->dispatch_key = true;
$o_23->attrs[] = $o_25;
$o_23->attr_lists = ['common-link-attrs'];
$o_0->tags[] = $o_23;
$o_26 = new TagSpec();
$o_26->tag_name = 'link';
$o_26->spec_name = 'link itemprop=';
$o_27 = new AttrSpec();
$o_27->name = 'href';
$o_27->mandatory = true;
$o_26->attrs[] = $o_27;
$o_28 = new AttrSpec();
$o_28->name = 'itemprop';
$o_28->mandatory = true;
$o_26->attrs[] = $o_28;
$o_26->attr_lists = ['common-link-attrs'];
$o_0->tags[] = $o_26;
$o_29 = new TagSpec();
$o_29->tag_name = 'meta';
$o_29->spec_name = 'meta charset=utf-8';
$o_29->mandatory = true;
$o_29->unique = true;
$o_29->mandatory_parent = 'head';
$o_30 = new AttrSpec();
$o_30->name = 'charset';
$o_30->mandatory = true;
$o_30->value = 'utf-8';
$o_30->dispatch_key = true;
$o_29->attrs[] = $o_30;
$o_29->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_29;
$o_31 = new TagSpec();
$o_31->tag_name = 'meta';
$o_31->spec_name = 'meta name=viewport';
$o_31->mandatory = true;
$o_31->unique = true;
$o_31->mandatory_parent = 'head';
$o_32 = new AttrSpec();
$o_32->name = 'content';
$o_32->mandatory = true;
$o_33 = new PropertySpecList();
$o_34 = new PropertySpec();
$o_34->name = 'width';
$o_34->mandatory = true;
$o_34->value = 'device-width';
$o_33->properties[] = $o_34;
$o_35 = new PropertySpec();
$o_35->name = 'height';
$o_33->properties[] = $o_35;
$o_36 = new PropertySpec();
$o_36->name = 'initial-scale';
$o_33->properties[] = $o_36;
$o_37 = new PropertySpec();
$o_37->name = 'minimum-scale';
$o_37->mandatory = true;
$o_37->value_double = 1.0;
$o_33->properties[] = $o_37;
$o_38 = new PropertySpec();
$o_38->name = 'maximum-scale';
$o_33->properties[] = $o_38;
$o_39 = new PropertySpec();
$o_39->name = 'shrink-to-fit';
$o_33->properties[] = $o_39;
$o_40 = new PropertySpec();
$o_40->name = 'user-scalable';
$o_33->properties[] = $o_40;
$o_32->value_properties = $o_33;
$o_31->attrs[] = $o_32;
$o_41 = new AttrSpec();
$o_41->name = 'name';
$o_41->mandatory = true;
$o_41->value = 'viewport';
$o_41->dispatch_key = true;
$o_31->attrs[] = $o_41;
$o_31->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_31;
$o_42 = new TagSpec();
$o_42->tag_name = 'meta';
$o_42->spec_name = 'meta http-equiv=X-UA-Compatible';
$o_43 = new AttrSpec();
$o_43->name = 'http-equiv';
$o_43->mandatory = true;
$o_43->value = 'X-UA-Compatible';
$o_43->dispatch_key = true;
$o_42->attrs[] = $o_43;
$o_44 = new AttrSpec();
$o_44->name = 'content';
$o_44->mandatory = true;
$o_45 = new PropertySpecList();
$o_46 = new PropertySpec();
$o_46->name = 'ie';
$o_46->value = 'edge';
$o_45->properties[] = $o_46;
$o_47 = new PropertySpec();
$o_47->name = 'chrome';
$o_47->value = '1';
$o_45->properties[] = $o_47;
$o_44->value_properties = $o_45;
$o_42->attrs[] = $o_44;
$o_0->tags[] = $o_42;
$o_48 = new TagSpec();
$o_48->tag_name = 'meta';
$o_48->spec_name = 'meta name= and content=';
$o_49 = new AttrSpec();
$o_49->name = 'name';
$o_49->blacklisted_value_regex = '(^|\\s)(viewport|content-disposition|revisit-after)(\\s|$)';
$o_48->attrs[] = $o_49;
$o_50 = new AttrSpec();
$o_50->name = 'content';
$o_48->attrs[] = $o_50;
$o_51 = new AttrSpec();
$o_51->name = 'property';
$o_48->attrs[] = $o_51;
$o_52 = new AttrSpec();
$o_52->name = 'itemprop';
$o_48->attrs[] = $o_52;
$o_0->tags[] = $o_48;
$o_53 = new TagSpec();
$o_53->tag_name = 'meta';
$o_53->spec_name = 'meta http-equiv=content-type';
$o_54 = new AttrSpec();
$o_54->name = 'http-equiv';
$o_54->mandatory = true;
$o_54->value = 'content-type';
$o_54->dispatch_key = true;
$o_53->attrs[] = $o_54;
$o_55 = new AttrSpec();
$o_55->name = 'content';
$o_55->mandatory = true;
$o_55->value = 'text/html; charset=utf-8';
$o_53->attrs[] = $o_55;
$o_0->tags[] = $o_53;
$o_56 = new TagSpec();
$o_56->tag_name = 'meta';
$o_56->spec_name = 'meta http-equiv=Content-Type';
$o_57 = new AttrSpec();
$o_57->name = 'http-equiv';
$o_57->mandatory = true;
$o_57->value = 'Content-Type';
$o_57->dispatch_key = true;
$o_56->attrs[] = $o_57;
$o_58 = new AttrSpec();
$o_58->name = 'content';
$o_58->mandatory = true;
$o_58->value = 'text/html; charset=utf-8';
$o_56->attrs[] = $o_58;
$o_0->tags[] = $o_56;
$o_59 = new TagSpec();
$o_59->tag_name = 'meta';
$o_59->spec_name = 'meta http-equiv=content-language';
$o_60 = new AttrSpec();
$o_60->name = 'http-equiv';
$o_60->mandatory = true;
$o_60->value = 'content-language';
$o_60->dispatch_key = true;
$o_59->attrs[] = $o_60;
$o_61 = new AttrSpec();
$o_61->name = 'content';
$o_61->mandatory = true;
$o_59->attrs[] = $o_61;
$o_0->tags[] = $o_59;
$o_62 = new TagSpec();
$o_62->tag_name = 'meta';
$o_62->spec_name = 'meta http-equiv=pics-label';
$o_63 = new AttrSpec();
$o_63->name = 'http-equiv';
$o_63->mandatory = true;
$o_63->value = 'pics-label';
$o_63->dispatch_key = true;
$o_62->attrs[] = $o_63;
$o_64 = new AttrSpec();
$o_64->name = 'content';
$o_64->mandatory = true;
$o_62->attrs[] = $o_64;
$o_0->tags[] = $o_62;
$o_65 = new TagSpec();
$o_65->tag_name = 'meta';
$o_65->spec_name = 'meta http-equiv=imagetoolbar';
$o_66 = new AttrSpec();
$o_66->name = 'http-equiv';
$o_66->mandatory = true;
$o_66->value = 'imagetoolbar';
$o_66->dispatch_key = true;
$o_65->attrs[] = $o_66;
$o_67 = new AttrSpec();
$o_67->name = 'content';
$o_67->mandatory = true;
$o_65->attrs[] = $o_67;
$o_0->tags[] = $o_65;
$o_68 = new TagSpec();
$o_68->tag_name = 'meta';
$o_68->spec_name = 'meta http-equiv=Content-Style-Type';
$o_69 = new AttrSpec();
$o_69->name = 'http-equiv';
$o_69->mandatory = true;
$o_69->value = 'Content-Style-Type';
$o_69->dispatch_key = true;
$o_68->attrs[] = $o_69;
$o_70 = new AttrSpec();
$o_70->name = 'content';
$o_70->mandatory = true;
$o_70->value = 'text/css';
$o_68->attrs[] = $o_70;
$o_0->tags[] = $o_68;
$o_71 = new TagSpec();
$o_71->tag_name = 'meta';
$o_71->spec_name = 'meta http-equiv=Content-Script-Type';
$o_72 = new AttrSpec();
$o_72->name = 'http-equiv';
$o_72->mandatory = true;
$o_72->value = 'Content-Script-Type';
$o_72->dispatch_key = true;
$o_71->attrs[] = $o_72;
$o_73 = new AttrSpec();
$o_73->name = 'content';
$o_73->mandatory = true;
$o_73->value = 'text/javascript';
$o_71->attrs[] = $o_73;
$o_0->tags[] = $o_71;
$o_74 = new TagSpec();
$o_74->tag_name = 'meta';
$o_74->spec_name = 'meta http-equiv=resource-type';
$o_75 = new AttrSpec();
$o_75->name = 'http-equiv';
$o_75->mandatory = true;
$o_75->value = 'RESOURCE-TYPE';
$o_75->dispatch_key = true;
$o_74->attrs[] = $o_75;
$o_76 = new AttrSpec();
$o_76->name = 'content';
$o_76->mandatory = true;
$o_74->attrs[] = $o_76;
$o_0->tags[] = $o_74;
$o_77 = new TagSpec();
$o_77->tag_name = 'style';
$o_77->spec_name = 'style amp-custom';
$o_77->unique = true;
$o_77->mandatory_parent = 'head';
$o_78 = new AttrSpec();
$o_78->name = 'amp-custom';
$o_78->mandatory = true;
$o_78->value = '';
$o_77->attrs[] = $o_78;
$o_79 = new AttrSpec();
$o_79->name = 'type';
$o_79->value = 'text/css';
$o_77->attrs[] = $o_79;
$o_77->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#stylesheets';
$o_80 = new CdataSpec();
$o_80->max_bytes = 50000;
$o_80->max_bytes_spec_url = 'https://www.ampproject.org/docs/reference/spec.html#maximum-size';
$o_81 = new BlackListedCDataRegex();
$o_81->regex = '<!--';
$o_81->error_message = 'html comments';
$o_80->blacklisted_cdata_regex[] = $o_81;
$o_82 = new BlackListedCDataRegex();
$o_82->regex = '\\.i?-amp-';
$o_82->error_message = 'CSS -amp- class name prefix';
$o_80->blacklisted_cdata_regex[] = $o_82;
$o_83 = new BlackListedCDataRegex();
$o_83->regex = '!important';
$o_83->error_message = 'CSS !important';
$o_80->blacklisted_cdata_regex[] = $o_83;
$o_84 = new CssSpec();
$o_85 = new AtRuleSpec();
$o_85->name = 'font-face';
$o_85->type = AtRuleSpecBlockType::PARSE_AS_DECLARATIONS;
$o_84->at_rule_spec[] = $o_85;
$o_86 = new AtRuleSpec();
$o_86->name = 'keyframes';
$o_86->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_86;
$o_87 = new AtRuleSpec();
$o_87->name = 'media';
$o_87->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_87;
$o_88 = new AtRuleSpec();
$o_88->name = 'supports';
$o_88->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_88;
$o_89 = new AtRuleSpec();
$o_89->name = '-moz-keyframes';
$o_89->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_89;
$o_90 = new AtRuleSpec();
$o_90->name = '-o-keyframes';
$o_90->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_90;
$o_91 = new AtRuleSpec();
$o_91->name = '-webkit-keyframes';
$o_91->type = AtRuleSpecBlockType::PARSE_AS_RULES;
$o_84->at_rule_spec[] = $o_91;
$o_92 = new AtRuleSpec();
$o_92->name = '$DEFAULT';
$o_92->type = AtRuleSpecBlockType::PARSE_AS_ERROR;
$o_84->at_rule_spec[] = $o_92;
$o_93 = new UrlSpec();
$o_93->allowed_protocol = ['https', 'http', 'data', 'absolute'];
$o_93->allow_relative = true;
$o_93->allow_empty = true;
$o_84->image_url_spec = $o_93;
$o_94 = new UrlSpec();
$o_94->allowed_protocol = ['https', 'http', 'data'];
$o_94->allow_relative = true;
$o_94->allow_empty = true;
$o_84->font_url_spec = $o_94;
$o_80->css_spec = $o_84;
$o_77->cdata = $o_80;
$o_0->tags[] = $o_77;
$o_95 = new TagSpec();
$o_95->tag_name = 'style';
$o_95->spec_name = 'head > style[amp-boilerplate] - old variant';
$o_95->mandatory_alternatives = 'head > style[amp-boilerplate]';
$o_95->unique = true;
$o_95->mandatory_parent = 'head';
$o_95->spec_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_96 = new CdataSpec();
$o_96->cdata_regex = 'body ?{opacity: ?0}';
$o_95->cdata = $o_96;
$o_95->deprecation = 'head > style[amp-boilerplate]';
$o_95->deprecation_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_0->tags[] = $o_95;
$o_97 = new TagSpec();
$o_97->tag_name = 'style';
$o_97->spec_name = 'noscript > style[amp-boilerplate] - old variant';
$o_97->mandatory_alternatives = 'noscript > style[amp-boilerplate]';
$o_97->unique = true;
$o_97->mandatory_parent = 'noscript';
$o_97->spec_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_98 = new CdataSpec();
$o_98->cdata_regex = 'body ?{opacity: ?1}';
$o_97->cdata = $o_98;
$o_97->deprecation = 'noscript > style[amp-boilerplate]';
$o_97->deprecation_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_0->tags[] = $o_97;
$o_99 = new TagSpec();
$o_99->tag_name = 'style';
$o_99->spec_name = 'head > style[amp-boilerplate]';
$o_99->mandatory_alternatives = 'head > style[amp-boilerplate]';
$o_99->unique = true;
$o_99->mandatory_parent = 'head';
$o_100 = new AttrSpec();
$o_100->name = 'amp-boilerplate';
$o_100->mandatory = true;
$o_100->value = '';
$o_100->dispatch_key = true;
$o_99->attrs[] = $o_100;
$o_99->spec_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_101 = new CdataSpec();
$o_101->cdata_regex = '\\s*body{-webkit-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;-moz-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;-ms-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both}@-webkit-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}\\s*';
$o_99->cdata = $o_101;
$o_99->also_requires_tag = ['noscript > style[amp-boilerplate]'];
$o_0->tags[] = $o_99;
$o_102 = new TagSpec();
$o_102->tag_name = 'style';
$o_102->spec_name = 'noscript > style[amp-boilerplate]';
$o_102->mandatory_alternatives = 'noscript > style[amp-boilerplate]';
$o_102->unique = true;
$o_102->mandatory_parent = 'noscript';
$o_103 = new AttrSpec();
$o_103->name = 'amp-boilerplate';
$o_103->mandatory = true;
$o_103->value = '';
$o_103->dispatch_key = true;
$o_102->attrs[] = $o_103;
$o_102->spec_url = 'https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-boilerplate.md';
$o_104 = new CdataSpec();
$o_104->cdata_regex = '\\s*body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}\\s*';
$o_102->cdata = $o_104;
$o_102->also_requires_tag = ['head > style[amp-boilerplate]'];
$o_0->tags[] = $o_102;
$o_105 = new TagSpec();
$o_105->tag_name = 'body';
$o_105->mandatory = true;
$o_105->unique = true;
$o_105->mandatory_parent = 'html';
$o_105->spec_url = 'https://www.ampproject.org/docs/reference/spec.html#required-markup';
$o_0->tags[] = $o_105;
$o_106 = new TagSpec();
$o_106->tag_name = 'article';
$o_0->tags[] = $o_106;
$o_107 = new TagSpec();
$o_107->tag_name = 'section';
$o_107->disallowed_ancestor = ['amp-accordion'];
$o_0->tags[] = $o_107;
$o_108 = new TagSpec();
$o_108->tag_name = 'nav';
$o_0->tags[] = $o_108;
$o_109 = new TagSpec();
$o_109->tag_name = 'aside';
$o_0->tags[] = $o_109;
$o_110 = new TagSpec();
$o_110->tag_name = 'h1';
$o_111 = new AttrSpec();
$o_111->name = 'align';
$o_110->attrs[] = $o_111;
$o_0->tags[] = $o_110;
$o_112 = new TagSpec();
$o_112->tag_name = 'h2';
$o_113 = new AttrSpec();
$o_113->name = 'align';
$o_112->attrs[] = $o_113;
$o_0->tags[] = $o_112;
$o_114 = new TagSpec();
$o_114->tag_name = 'h3';
$o_115 = new AttrSpec();
$o_115->name = 'align';
$o_114->attrs[] = $o_115;
$o_0->tags[] = $o_114;
$o_116 = new TagSpec();
$o_116->tag_name = 'h4';
$o_117 = new AttrSpec();
$o_117->name = 'align';
$o_116->attrs[] = $o_117;
$o_0->tags[] = $o_116;
$o_118 = new TagSpec();
$o_118->tag_name = 'h5';
$o_119 = new AttrSpec();
$o_119->name = 'align';
$o_118->attrs[] = $o_119;
$o_0->tags[] = $o_118;
$o_120 = new TagSpec();
$o_120->tag_name = 'h6';
$o_121 = new AttrSpec();
$o_121->name = 'align';
$o_120->attrs[] = $o_121;
$o_0->tags[] = $o_120;
$o_122 = new TagSpec();
$o_122->tag_name = 'header';
$o_0->tags[] = $o_122;
$o_123 = new TagSpec();
$o_123->tag_name = 'footer';
$o_0->tags[] = $o_123;
$o_124 = new TagSpec();
$o_124->tag_name = 'address';
$o_0->tags[] = $o_124;
$o_125 = new TagSpec();
$o_125->tag_name = 'p';
$o_126 = new AttrSpec();
$o_126->name = 'align';
$o_125->attrs[] = $o_126;
$o_0->tags[] = $o_125;
$o_127 = new TagSpec();
$o_127->tag_name = 'hr';
$o_0->tags[] = $o_127;
$o_128 = new TagSpec();
$o_128->tag_name = 'pre';
$o_0->tags[] = $o_128;
$o_129 = new TagSpec();
$o_129->tag_name = 'blockquote';
$o_130 = new AttrSpec();
$o_130->name = 'align';
$o_129->attrs[] = $o_130;
$o_129->attr_lists = ['cite-attr'];
$o_0->tags[] = $o_129;
$o_131 = new TagSpec();
$o_131->tag_name = 'ol';
$o_132 = new AttrSpec();
$o_132->name = 'reversed';
$o_132->value = '';
$o_131->attrs[] = $o_132;
$o_133 = new AttrSpec();
$o_133->name = 'start';
$o_133->value_regex = '[0-9]*';
$o_131->attrs[] = $o_133;
$o_134 = new AttrSpec();
$o_134->name = 'type';
$o_134->value_regex = '[1AaIi]';
$o_131->attrs[] = $o_134;
$o_0->tags[] = $o_131;
$o_135 = new TagSpec();
$o_135->tag_name = 'ul';
$o_0->tags[] = $o_135;
$o_136 = new TagSpec();
$o_136->tag_name = 'li';
$o_137 = new AttrSpec();
$o_137->name = 'value';
$o_137->value_regex = '[0-9]*';
$o_136->attrs[] = $o_137;
$o_0->tags[] = $o_136;
$o_138 = new TagSpec();
$o_138->tag_name = 'dl';
$o_0->tags[] = $o_138;
$o_139 = new TagSpec();
$o_139->tag_name = 'dt';
$o_0->tags[] = $o_139;
$o_140 = new TagSpec();
$o_140->tag_name = 'dd';
$o_0->tags[] = $o_140;
$o_141 = new TagSpec();
$o_141->tag_name = 'figure';
$o_0->tags[] = $o_141;
$o_142 = new TagSpec();
$o_142->tag_name = 'figcaption';
$o_0->tags[] = $o_142;
$o_143 = new TagSpec();
$o_143->tag_name = 'div';
$o_144 = new AttrSpec();
$o_144->name = 'align';
$o_143->attrs[] = $o_144;
$o_0->tags[] = $o_143;
$o_145 = new TagSpec();
$o_145->tag_name = 'main';
$o_0->tags[] = $o_145;
$o_146 = new TagSpec();
$o_146->tag_name = 'a';
$o_147 = new AttrSpec();
$o_147->name = 'href';
$o_148 = new UrlSpec();
$o_148->allowed_protocol = ['ftp', 'http', 'https', 'mailto', 'fb-messenger', 'sms', 'tel', 'viber', 'whatsapp'];
$o_148->allow_relative = true;
$o_147->value_url = $o_148;
$o_146->attrs[] = $o_147;
$o_149 = new AttrSpec();
$o_149->name = 'hreflang';
$o_146->attrs[] = $o_149;
$o_150 = new AttrSpec();
$o_150->name = 'rel';
$o_150->blacklisted_value_regex = '(^|\\s)(canonical|components|dns-prefetch|import|manifest|preconnect|prefetch|preload|prerender|serviceworker|stylesheet|subresource|)(\\s|$)';
$o_146->attrs[] = $o_150;
$o_151 = new AttrSpec();
$o_151->name = 'role';
$o_151->implicit = true;
$o_146->attrs[] = $o_151;
$o_152 = new AttrSpec();
$o_152->name = 'tabindex';
$o_152->implicit = true;
$o_146->attrs[] = $o_152;
$o_153 = new AttrSpec();
$o_153->name = 'target';
$o_153->value_regex = '(_blank|_self)';
$o_146->attrs[] = $o_153;
$o_154 = new AttrSpec();
$o_154->name = 'download';
$o_146->attrs[] = $o_154;
$o_155 = new AttrSpec();
$o_155->name = 'media';
$o_146->attrs[] = $o_155;
$o_156 = new AttrSpec();
$o_156->name = 'type';
$o_156->value = 'text/html';
$o_146->attrs[] = $o_156;
$o_157 = new AttrSpec();
$o_157->name = 'border';
$o_146->attrs[] = $o_157;
$o_158 = new AttrSpec();
$o_158->name = 'name';
$o_146->attrs[] = $o_158;
$o_0->tags[] = $o_146;
$o_159 = new TagSpec();
$o_159->tag_name = 'em';
$o_0->tags[] = $o_159;
$o_160 = new TagSpec();
$o_160->tag_name = 'strong';
$o_0->tags[] = $o_160;
$o_161 = new TagSpec();
$o_161->tag_name = 'small';
$o_0->tags[] = $o_161;
$o_162 = new TagSpec();
$o_162->tag_name = 's';
$o_0->tags[] = $o_162;
$o_163 = new TagSpec();
$o_163->tag_name = 'cite';
$o_0->tags[] = $o_163;
$o_164 = new TagSpec();
$o_164->tag_name = 'q';
$o_164->attr_lists = ['cite-attr'];
$o_0->tags[] = $o_164;
$o_165 = new TagSpec();
$o_165->tag_name = 'dfn';
$o_0->tags[] = $o_165;
$o_166 = new TagSpec();
$o_166->tag_name = 'abbr';
$o_0->tags[] = $o_166;
$o_167 = new TagSpec();
$o_167->tag_name = 'data';
$o_0->tags[] = $o_167;
$o_168 = new TagSpec();
$o_168->tag_name = 'time';
$o_169 = new AttrSpec();
$o_169->name = 'datetime';
$o_168->attrs[] = $o_169;
$o_0->tags[] = $o_168;
$o_170 = new TagSpec();
$o_170->tag_name = 'code';
$o_0->tags[] = $o_170;
$o_171 = new TagSpec();
$o_171->tag_name = 'var';
$o_0->tags[] = $o_171;
$o_172 = new TagSpec();
$o_172->tag_name = 'samp';
$o_0->tags[] = $o_172;