forked from MizarSystem/MML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmiz.xml
9134 lines (8918 loc) · 338 KB
/
miz.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
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
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file is now automatically produced from the files in the MHTML directory. -->
<!-- Its only reason is to have just one big .xsl file in the Mizar distro. -->
<!-- So any changes should be done to the MHTML files, running 'make miz.xsl' afterwards. -->
<!-- The main stylesheet mhtml_main.xsl can be used instead miz.xsl, -->
<!-- provided the included .xsl files are available in the same directory -->
<xsl:stylesheet version="1.0" extension-element-prefixes="dc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<!-- $Revision: 1.8 $ -->
<!-- -->
<!-- File: mhtml_main.xsltxt - html-ization of Mizar XML, main file -->
<!-- -->
<!-- Author: Josef Urban -->
<!-- -->
<!-- License: GPL (GNU GENERAL PUBLIC LICENSE) -->
<!-- XSLTXT (https://xsltxt.dev.java.net/) stylesheet taking -->
<!-- XML terms, formulas and types to less verbose format. -->
<!-- To produce standard XSLT from this do e.g.: -->
<!-- java -jar xsltxt.jar toXSL miz.xsltxt | sed -e 's/<!\-\- *\(<\/*xsl:document.*\) *\-\->/\1/g' >miz.xsl -->
<!-- (the sed hack is there because xsl:document is not yet supported by xsltxtx) -->
<!-- Then e.g.: xsltproc miz.xsl ordinal2.pre >ordinal2.pre1 -->
<!-- TODO: number B vars in fraenkel - done since 1.72 -->
<!-- handle F and H parenthesis as K parenthesis -->
<!-- article numbering in Ref? -->
<!-- absolute definiens numbers for thesisExpansions? - done -->
<!-- do not display BlockThesis for Proof? - done, should but should be optional for Now -->
<!-- add @nr to canceled -->
<!-- Constructor should know its serial number! - needed in defs -->
<!-- possibly also article? -->
<!-- change globally 'G' to 'L' for types? -> then change the -->
<!-- hacks here and in emacs.el -->
<!-- display definiens? - done -->
<!-- NOTES: constructor disambiguation is done using the absolute numbers -->
<!-- (attribute 'nr' and 'aid' of the Constructor element. -->
<!-- This info for Constructors not defined in the article is -->
<!-- taken from the .atr file (see variable $constrs) -->
<!-- -->
<!-- File: params.xsltxt - html-ization of Mizar XML, top-level parameters -->
<!-- -->
<!-- Author: Josef Urban -->
<!-- -->
<!-- License: GPL (GNU GENERAL PUBLIC LICENSE) -->
<!-- The following are user-customizable -->
<!-- mmlquery address -->
<xsl:param name="mmlq">
<xsl:text>http://merak.pb.bialystok.pl/mmlquery/fillin.php?entry=</xsl:text>
</xsl:param>
<!-- #mmlq= {"";} -->
<!-- linking methods: -->
<!-- "q" - query, everything is linked to mmlquery -->
<!-- "s" - self, everything is linked to these xml/html files -->
<!-- "m" - mizaring and mmlquery, current article's constructs are linked to self, -->
<!-- the rest is linked to mmlquery -->
<!-- "l" - local mizaring, current article's constructs are linked to self, -->
<!-- the rest to $MIZFILES/html -->
<xsl:param name="linking">
<xsl:text>l</xsl:text>
</xsl:param>
<!-- needed for local linking, document("") gives the sylesheet as a document -->
<xsl:param name="mizfiles">
<xsl:value-of select="string(/*/@mizfiles)"/>
</xsl:param>
<xsl:param name="mizhtml">
<xsl:value-of select="concat("file://",$mizfiles,"html/")"/>
</xsl:param>
<!-- extension for linking to other articles - either xml or html -->
<xsl:param name="ext">
<xsl:text>html</xsl:text>
</xsl:param>
<!-- extension for linking to other articles - either xml or html -->
<xsl:param name="selfext">
<xsl:choose>
<xsl:when test="$linking = "l"">
<xsl:text>xml</xsl:text>
</xsl:when>
<xsl:when test="$linking = "s"">
<xsl:value-of select="$ext"/>
</xsl:when>
<xsl:when test="$linking = "m"">
<xsl:text>xml</xsl:text>
</xsl:when>
<xsl:when test="$linking = "q"">
<xsl:text>html</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:param>
<!-- default target frame for links -->
<xsl:param name="default_target">
<xsl:choose>
<xsl:when test="$linking = "s"">
<xsl:text>_self</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>mmlquery</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<!-- put titles to links or not -->
<xsl:param name="titles">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- coloured output or not -->
<xsl:param name="colored">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- print identifiers (like in JFM) instead of normalized names -->
<xsl:variable name="print_identifiers">
<xsl:text>1</xsl:text>
</xsl:variable>
<!-- new brackets: trying to print brackets as mizar does - -->
<!-- when two or more arguments of a functor - now default -->
<xsl:param name="mizar_brackets">
<xsl:text>1</xsl:text>
</xsl:param>
<!-- no spaces around functor symbols -->
<xsl:param name="funcs_no_spaces">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- print label identifiers instead of normalized names -->
<!-- this is kept separate from $print_identifiers, because -->
<!-- it should be turned off for item generating -->
<xsl:variable name="print_lab_identifiers">
<xsl:text>1</xsl:text>
</xsl:variable>
<!-- print "for" in registrations - newly in version 1132 -->
<xsl:param name="regs_use_for">
<xsl:text>1</xsl:text>
</xsl:param>
<!-- tells whether relative or absolute names are shown -->
<xsl:param name="relnames">
<xsl:text>1</xsl:text>
</xsl:param>
<!-- link by (now also from) inferences to ATP solutions rendered by MMLQuery; experimental - off -->
<!-- 1 - static linking (to pre-generated html) -->
<!-- 2 - dynamic linking to MML Query (static dli sent to MMLQuery DLI-processor) -->
<!-- 3 - dynamic linking to the TPTP-processor CGI ($lbytptpcgi) -->
<xsl:param name="linkby">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- if non zero, add icons for atp exlpanation calls to theorems and proofs in the same way as to by's -->
<xsl:param name="linkarproofs">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- if > 0, call the mk_by_title function to create a title for by|from|; -->
<xsl:param name="by_titles">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- If 1, the target frame for by explanations is _self -->
<xsl:param name="linkbytoself">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- directory with by ATP solutions in HTML; each article in its own subdir -->
<xsl:param name="lbydir">
<xsl:text>_by/</xsl:text>
</xsl:param>
<!-- directory with by ATP solutions in DLI; each article in its own subdir -->
<!-- now whole url for the CGI script -->
<xsl:param name="lbydliurl">
<xsl:text>http://lipa.ms.mff.cuni.cz/~urban/xmlmml/html.930/_by_dli/</xsl:text>
</xsl:param>
<!-- URL of the DLI-processor CGI -->
<xsl:param name="lbydlicgi">
<xsl:text>http://mmlquery.mizar.org/cgi-bin/mmlquery/dli</xsl:text>
</xsl:param>
<!-- complete prefix of the DLI-processor CGI request -->
<xsl:variable name="lbydlicgipref">
<xsl:value-of select="concat($lbydlicgi,"?url=",$lbydliurl)"/>
</xsl:variable>
<!-- URL of the MizAR root dir -->
<!-- #ltptproot= { "http://octopi.mizar.org/~mptp/"; } -->
<xsl:param name="ltptproot">
<xsl:text>http://mws.cs.ru.nl/~mptp/</xsl:text>
</xsl:param>
<!-- URL of the TPTP-processor CGI -->
<xsl:param name="ltptpcgi">
<xsl:value-of select="concat($ltptproot,"cgi-bin/")"/>
</xsl:param>
<!-- URL of the showby CGI -->
<xsl:param name="lbytptpcgi">
<xsl:value-of select="concat($ltptpcgi,"showby.cgi")"/>
</xsl:param>
<!-- URL of the showtmpfile CGI -->
<xsl:param name="ltmpftptpcgi">
<xsl:value-of select="concat($ltptpcgi,"showtmpfile.cgi")"/>
</xsl:param>
<!-- tells if by action is fetched through AJAX; default is off -->
<xsl:param name="ajax_by">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- temporary dir with the tptp by files, needs to be passed as a param -->
<xsl:param name="lbytmpdir">
<xsl:text/>
</xsl:param>
<!-- additional params for lbytptpcgi, needs to be passed as a param -->
<xsl:param name="lbycgiparams">
<xsl:text/>
</xsl:param>
<!-- add links to tptp files for thms -->
<xsl:param name="thms_tptp_links">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- add editing, history, and possibly other links for wiki -->
<!-- the namespace for the scripts is taken from #ltptproot -->
<xsl:param name="wiki_links">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- add buttons for editing wiki sections -->
<xsl:param name="wiki_sections">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- domain name of the "wiki" server -->
<xsl:param name="lwikihost">
<xsl:text>mws.cs.ru.nl</xsl:text>
</xsl:param>
<!-- URL of the "wiki" server -->
<xsl:param name="lwikiserver">
<xsl:value-of select="concat("http://",$lwikihost)"/>
</xsl:param>
<!-- URL of the "mwiki" cgi, used for mwiki actions -->
<xsl:param name="lmwikicgi">
<xsl:value-of select="concat($lwikiserver,"/cgi-bin/mwiki/mwiki.cgi")"/>
</xsl:param>
<!-- name of the index page for wiki -->
<xsl:param name="lmwikiindex">
<xsl:text>00INDEX.html</xsl:text>
</xsl:param>
<!-- URL of the "wiki" raw cgi, showing the raw file -->
<xsl:param name="lrawcgi">
<xsl:value-of select="concat($lwikiserver,"/cgi-bin/mwiki/raw.cgi")"/>
</xsl:param>
<!-- URL of the "gitweb" cgi, showing git history -->
<xsl:param name="lgitwebcgi">
<xsl:value-of select="concat($lwikiserver,":1234/")"/>
</xsl:param>
<!-- name of the git repository (project) in which this page is contained - -->
<!-- used for gitweb history -->
<xsl:param name="lgitproject">
<xsl:text>mw1.git</xsl:text>
</xsl:param>
<!-- git clone address used for wiki cloning -->
<xsl:param name="lgitclone">
<xsl:value-of select="concat("git://",$lwikihost,"/git/", $lgitproject)"/>
</xsl:param>
<!-- http clone address used for wiki cloning -->
<xsl:param name="lhttpclone">
<xsl:value-of select="concat("http://",$lwikihost,"/git/", $lgitproject)"/>
</xsl:param>
<!-- tells if linkage of proof elements is done; default is off -->
<xsl:param name="proof_links">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- tells if linkage of constants is done; default is 0 (off), -->
<!-- 1 tells to only create the anchors, 2 tells to also link constants -->
<!-- ##TODO: 2 is implement incorrectly and should not be used now, -->
<!-- it should be done like privname (via the C key, not like now) -->
<xsl:param name="const_links">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- tells if proofs are fetched through AJAX; default is off -->
<!-- value 2 tells to produce the proofs, but not to insert the ajax calls, -->
<!-- and instead insert tags for easy regexp-based post-insertion of files -->
<!-- value 3 uses the ltmpftptpcgi to fetch the proof in the ajax request - like for by -->
<xsl:param name="ajax_proofs">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- the dir with proofs that are fetched through AJAX -->
<xsl:param name="ajax_proof_dir">
<xsl:text>proofs</xsl:text>
</xsl:param>
<!-- tells to display thesis after skeleton items -->
<xsl:param name="display_thesis">
<xsl:text>1</xsl:text>
</xsl:param>
<!-- tells if only selected items are generated to subdirs; default is off -->
<xsl:param name="generate_items">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- relevant only if $generate_items>0 -->
<!-- tells if proofs of selected items are generated to subdirs; default is off -->
<xsl:param name="generate_items_proofs">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- add IDV links and icons -->
<xsl:param name="idv">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- create header info from .hdr file -->
<xsl:param name="mk_header">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- include comment info from .cmt file -->
<xsl:param name="mk_comments">
<xsl:text>0</xsl:text>
</xsl:param>
<!-- Suppress the header and trailer of the final document. -->
<!-- Thus, you can insert the resulting document into a larger one. -->
<xsl:param name="body_only">
<xsl:text>0</xsl:text>
</xsl:param>
<xsl:variable name="lcletters">
<xsl:text>abcdefghijklmnopqrstuvwxyz</xsl:text>
</xsl:variable>
<xsl:variable name="ucletters">
<xsl:text>ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:text>
</xsl:variable>
<!-- name of current article (upper case) -->
<xsl:param name="aname">
<xsl:value-of select="string(/*/@aid)"/>
</xsl:param>
<!-- name of current article (lower case) -->
<xsl:param name="anamelc">
<xsl:value-of select="translate($aname, $ucletters, $lcletters)"/>
</xsl:param>
<!-- this needs to be set to 1 for processing MML files -->
<xsl:param name="mml">
<xsl:choose>
<xsl:when test="/Article">
<xsl:text>0</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>1</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<!-- nr. of clusters in Typ -->
<!-- this is set to 1 for processing MML files -->
<xsl:param name="cluster_nr">
<xsl:choose>
<xsl:when test="$mml = "0"">
<xsl:text>2</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>1</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<!-- whether we print all attributes (not just those with @pid) -->
<!-- this is set to 1 for processing MML files -->
<xsl:param name="print_all_attrs">
<xsl:value-of select="$mml"/>
</xsl:param>
<!-- .atr file with imported constructors -->
<xsl:param name="constrs">
<xsl:value-of select="concat($anamelc, '.atr')"/>
</xsl:param>
<!-- .eth file with imported theorems -->
<xsl:param name="thms">
<xsl:value-of select="concat($anamelc, '.eth')"/>
</xsl:param>
<!-- .esh file with imported schemes -->
<xsl:param name="schms">
<xsl:value-of select="concat($anamelc, '.esh')"/>
</xsl:param>
<!-- .eno file with imported patterns -->
<xsl:param name="patts">
<xsl:value-of select="concat($anamelc, '.eno')"/>
</xsl:param>
<!-- .frx file with all (both imported and article's) formats -->
<xsl:param name="formats">
<xsl:value-of select="concat($anamelc, '.frx')"/>
</xsl:param>
<!-- .dcx file with vocabulary -->
<xsl:param name="vocs">
<xsl:value-of select="concat($anamelc, '.dcx')"/>
</xsl:param>
<!-- .idx file with identifier names -->
<xsl:param name="ids">
<xsl:value-of select="concat($anamelc, '.idx')"/>
</xsl:param>
<!-- .dfs file with imported definientia -->
<xsl:param name="dfs">
<xsl:value-of select="concat($anamelc, '.dfs')"/>
</xsl:param>
<!-- .hdr file with header info (done by mkxmlhdr.pl) -->
<xsl:param name="hdr">
<xsl:value-of select="concat($anamelc, '.hdr')"/>
</xsl:param>
<!-- .cmt file with comments info (done by MizComments.pl) -->
<xsl:param name="cmt">
<xsl:value-of select="concat($anamelc, '.cmt')"/>
</xsl:param>
<xsl:param name="varcolor">
<xsl:text>Olive</xsl:text>
</xsl:param>
<xsl:param name="constcolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="locicolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="schpcolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="schfcolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="ppcolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="pfcolor">
<xsl:text>Maroon</xsl:text>
</xsl:param>
<xsl:param name="labcolor">
<xsl:text>Green</xsl:text>
</xsl:param>
<xsl:param name="commentcolor">
<xsl:text>firebrick</xsl:text>
</xsl:param>
<!-- use spans for brackets -->
<xsl:param name="parenspans">
<xsl:text>1</xsl:text>
</xsl:param>
<!-- number of parenthesis colors (see the stylesheet in the bottom) -->
<xsl:param name="pcolors_nr">
<xsl:text>6</xsl:text>
</xsl:param>
<!-- top level element instead of top-level document, which is hard to -->
<!-- know -->
<xsl:param name="top" select="/"/>
<!-- debugging message -->
<xsl:param name="dbgmsg">
<xsl:text>zzzzzzzzz</xsl:text>
</xsl:param>
<!-- relative nr of the first expandable mode -->
<!-- #first_exp = { `//Pattern[(@constrkind='M') and (@constrnr=0)][1]/@relnr`; } -->
<!-- symbols, should be overloaded with different (eg tex, mathml) presentations -->
<xsl:param name="for_s">
<xsl:text> for </xsl:text>
</xsl:param>
<xsl:param name="ex_s">
<xsl:text> ex </xsl:text>
</xsl:param>
<xsl:param name="not_s">
<xsl:text> not </xsl:text>
</xsl:param>
<xsl:param name="non_s">
<xsl:text> non </xsl:text>
</xsl:param>
<xsl:param name="and_s">
<xsl:text> & </xsl:text>
</xsl:param>
<xsl:param name="imp_s">
<xsl:text> implies </xsl:text>
</xsl:param>
<xsl:param name="equiv_s">
<xsl:text> iff </xsl:text>
</xsl:param>
<xsl:param name="or_s">
<xsl:text> or </xsl:text>
</xsl:param>
<xsl:param name="holds_s">
<xsl:text> holds </xsl:text>
</xsl:param>
<xsl:param name="being_s">
<xsl:text> being </xsl:text>
</xsl:param>
<xsl:param name="be_s">
<xsl:text> be </xsl:text>
</xsl:param>
<xsl:param name="st_s">
<xsl:text> st </xsl:text>
</xsl:param>
<xsl:param name="is_s">
<xsl:text> is </xsl:text>
</xsl:param>
<xsl:param name="dots_s">
<xsl:text> ... </xsl:text>
</xsl:param>
<xsl:param name="fraenkel_start">
<xsl:text> { </xsl:text>
</xsl:param>
<xsl:param name="fraenkel_end">
<xsl:text> } </xsl:text>
</xsl:param>
<xsl:param name="of_sel_s">
<xsl:text> of </xsl:text>
</xsl:param>
<xsl:param name="of_typ_s">
<xsl:text> of </xsl:text>
</xsl:param>
<xsl:param name="the_sel_s">
<xsl:text> the </xsl:text>
</xsl:param>
<xsl:param name="choice_s">
<xsl:text> the </xsl:text>
</xsl:param>
<xsl:param name="lbracket_s">
<xsl:text>(</xsl:text>
</xsl:param>
<xsl:param name="rbracket_s">
<xsl:text>)</xsl:text>
</xsl:param>
<!-- -->
<!-- File: keys.xsltxt - html-ization of Mizar XML, definition of keys (indexes) -->
<!-- -->
<!-- Author: Josef Urban -->
<!-- -->
<!-- License: GPL (GNU GENERAL PUBLIC LICENSE) -->
<!-- keys for fast constructor and reference lookup -->
<xsl:key name="M" match="Constructor[@kind='M']" use="@relnr"/>
<xsl:key name="L" match="Constructor[@kind='L']" use="@relnr"/>
<xsl:key name="V" match="Constructor[@kind='V']" use="@relnr"/>
<xsl:key name="R" match="Constructor[@kind='R']" use="@relnr"/>
<xsl:key name="K" match="Constructor[@kind='K']" use="@relnr"/>
<xsl:key name="U" match="Constructor[@kind='U']" use="@relnr"/>
<xsl:key name="G" match="Constructor[@kind='G']" use="@relnr"/>
<xsl:key name="T" match="/Theorems/Theorem[@kind='T']" use="concat(@articlenr,':',@nr)"/>
<xsl:key name="D" match="/Theorems/Theorem[@kind='D']" use="concat(@articlenr,':',@nr)"/>
<xsl:key name="S" match="/Schemes/Scheme" use="concat(@articlenr,':',@nr)"/>
<xsl:key name="DF" match="Definiens" use="@relnr"/>
<!-- patterns are slightly tricky, since a predicate pattern -->
<!-- may be linked to an attribute constructor; hence the -->
<!-- indexing is done according to @constrkind and not @kind -->
<!-- TODO: the attribute<->predicate change should propagate to usage -->
<!-- of "is" -->
<!-- Expandable modes have all @constrkind='M' and @constrnr=0, -->
<!-- they are indexed separately only on their @relnr (@pid) -->
<xsl:key name="P_M" match="Pattern[(@constrkind='M') and (@constrnr>0)]" use="@constrnr"/>
<xsl:key name="P_L" match="Pattern[@constrkind='L']" use="@constrnr"/>
<xsl:key name="P_V" match="Pattern[@constrkind='V']" use="@constrnr"/>
<xsl:key name="P_R" match="Pattern[@constrkind='R']" use="@constrnr"/>
<xsl:key name="P_K" match="Pattern[@constrkind='K']" use="@constrnr"/>
<xsl:key name="P_U" match="Pattern[@constrkind='U']" use="@constrnr"/>
<xsl:key name="P_G" match="Pattern[@constrkind='G']" use="@constrnr"/>
<xsl:key name="EXP" match="Pattern[(@constrkind='M') and (@constrnr=0)]" use="@relnr"/>
<xsl:key name="F" match="Format" use="@nr"/>
<xsl:key name="D_G" match="Symbol[@kind='G']" use="@nr"/>
<xsl:key name="D_K" match="Symbol[@kind='K']" use="@nr"/>
<xsl:key name="D_J" match="Symbol[@kind='J']" use="@nr"/>
<xsl:key name="D_L" match="Symbol[@kind='L']" use="@nr"/>
<xsl:key name="D_M" match="Symbol[@kind='M']" use="@nr"/>
<xsl:key name="D_O" match="Symbol[@kind='O']" use="@nr"/>
<xsl:key name="D_R" match="Symbol[@kind='R']" use="@nr"/>
<xsl:key name="D_U" match="Symbol[@kind='U']" use="@nr"/>
<xsl:key name="D_V" match="Symbol[@kind='V']" use="@nr"/>
<!-- identifiers -->
<xsl:key name="D_I" match="Symbol[@kind='I']" use="@nr"/>
<!-- keys for absolute linkage inside proofs; -->
<!-- requires preprocessing by addabsrefs, otherwise wrong results, -->
<!-- so commented now (could be uncommented using conditional include probably) -->
<!-- lookup for local constants -->
<xsl:key name="C" match="Let|Given|TakeAsVar|Consider|Set|Reconsider" use="@plevel"/>
<!-- lookup for propositions -->
<xsl:key name="E" match="Proposition|IterEquality|Now" use="concat(@nr,":",@plevel)"/>
<!-- lookup for scheme functors and predicates -->
<xsl:key name="f" match="SchemeFuncDecl" use="concat(@nr,":",@plevel)"/>
<xsl:key name="p" match="SchemePredDecl" use="concat(@nr,":",@plevel)"/>
<!-- lookup for private functors and predicates -->
<xsl:key name="pf" match="DefFunc" use="concat(@nr,":",@plevel)"/>
<xsl:key name="pp" match="DefPred" use="concat(@nr,":",@plevel)"/>
<!-- lookup for comments -->
<xsl:key name="CMT" match="Comment" use="@endline"/>
<!-- -->
<!-- File: print_simple.xsltxt - html-ization of Mizar XML, simple printing funcs -->
<!-- -->
<!-- Author: Josef Urban -->
<!-- -->
<!-- License: GPL (GNU GENERAL PUBLIC LICENSE) -->
<!-- pretty print variables and labels -->
<!-- ##TODO: link variables and consts to their introduction? -->
<!-- private - look up the name of id -->
<xsl:template name="get_vid_name">
<xsl:param name="vid"/>
<xsl:for-each select="document($ids, /)">
<xsl:for-each select="key('D_I', $vid)">
<xsl:value-of select="@name"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="pqvar">
<xsl:param name="nr"/>
<xsl:param name="vid"/>
<xsl:choose>
<xsl:when test="($print_identifiers > 0) and ($vid > 0)">
<xsl:variable name="nm">
<xsl:call-template name="get_vid_name">
<xsl:with-param name="vid" select="$vid"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$colored = "1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$varcolor"/>
</xsl:attribute>
<xsl:if test="$titles="1"">
<xsl:attribute name="title">
<xsl:value-of select="concat("b",$nr)"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$nm"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="pvar">
<xsl:with-param name="nr" select="$nr"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pvar">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$varcolor"/>
</xsl:attribute>
<xsl:text>b</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>b</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pconst">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$constcolor"/>
</xsl:attribute>
<xsl:text>c</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>c</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- #pl gives the optional proof level -->
<xsl:template name="ppconst">
<xsl:param name="nr"/>
<xsl:param name="vid"/>
<xsl:param name="pl"/>
<xsl:choose>
<xsl:when test="($print_identifiers > 0) and ($vid > 0)">
<xsl:variable name="ctarget">
<xsl:choose>
<xsl:when test="($const_links>0) and ($pl)">
<xsl:text>c</xsl:text>
<xsl:value-of select="$nr"/>
<xsl:call-template name="addp">
<xsl:with-param name="pl" select="$pl"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat("c",$nr)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="nm">
<xsl:call-template name="get_vid_name">
<xsl:with-param name="vid" select="$vid"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="($const_links=2)">
<xsl:element name="a">
<xsl:attribute name="class">
<xsl:text>txt</xsl:text>
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="concat("#",$ctarget)"/>
</xsl:attribute>
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$constcolor"/>
</xsl:attribute>
<xsl:if test="$titles="1"">
<xsl:attribute name="title">
<xsl:value-of select="$ctarget"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$nm"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$colored = "1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$constcolor"/>
</xsl:attribute>
<xsl:if test="$titles="1"">
<xsl:attribute name="title">
<xsl:value-of select="$ctarget"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$nm"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="pconst">
<xsl:with-param name="nr" select="$nr"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pploci">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="($print_identifiers > 0) and ($proof_links>0)">
<xsl:variable name="pl">
<xsl:call-template name="get_nearest_level">
<xsl:with-param name="el" select=".."/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="absconst">
<xsl:with-param name="nr" select="@nr"/>
<xsl:with-param name="pl" select="$pl"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="pconst">
<xsl:with-param name="nr" select="@nr"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="ploci">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$locicolor"/>
</xsl:attribute>
<xsl:text>a</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>a</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pschpvar">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$schpcolor"/>
</xsl:attribute>
<xsl:text>P</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>P</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pschfvar">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$schfcolor"/>
</xsl:attribute>
<xsl:text>F</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>F</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pppred">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$ppcolor"/>
</xsl:attribute>
<xsl:text>S</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>S</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="ppfunc">
<xsl:param name="nr"/>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$pfcolor"/>
</xsl:attribute>
<xsl:text>H</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>H</xsl:text>
<xsl:element name="sub">
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pplab">
<xsl:param name="nr"/>
<xsl:param name="vid"/>
<xsl:param name="txt"/>
<xsl:choose>
<xsl:when test="($print_lab_identifiers > 0) and ($vid > 0)">
<xsl:variable name="nm">
<xsl:call-template name="get_vid_name">
<xsl:with-param name="vid" select="$vid"/>
</xsl:call-template>
</xsl:variable>
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>lab</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$colored = "1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$labcolor"/>
</xsl:attribute>
<xsl:if test="$titles="1"">
<xsl:attribute name="title">
<xsl:value-of select="concat("E",$nr)"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$nm"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$txt">
<xsl:call-template name="plab1">
<xsl:with-param name="nr" select="$nr"/>
<xsl:with-param name="txt" select="$txt"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="plab">
<xsl:with-param name="nr" select="$nr"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="plab">
<xsl:param name="nr"/>
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>lab</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$labcolor"/>
</xsl:attribute>
<xsl:text>E</xsl:text>
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>E</xsl:text>
<xsl:value-of select="$nr"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
<xsl:template name="plab1">
<xsl:param name="nr"/>
<xsl:param name="txt"/>
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>lab</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$labcolor"/>
</xsl:attribute>
<xsl:value-of select="$txt"/>
<xsl:value-of select="$nr"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$txt"/>
<xsl:value-of select="$nr"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
<xsl:template name="pkeyword">
<xsl:param name="str"/>
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>kw</xsl:text>
</xsl:attribute>
<xsl:value-of select="$str"/>
</xsl:element>
</xsl:template>
<xsl:template name="pcomment0">
<xsl:param name="str"/>
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>comment</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$colored="1"">
<xsl:element name="font">
<xsl:attribute name="color">
<xsl:value-of select="$commentcolor"/>
</xsl:attribute>
<xsl:text>:: </xsl:text>
<xsl:value-of select="$str"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>:: </xsl:text>