-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodules-transpect.github.io.html
executable file
·1363 lines (1272 loc) · 105 KB
/
modules-transpect.github.io.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
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" xml:base="../modules-transpect.github.io.html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>transpect.github.io</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="theme-color" content="#FF9800" />
<link rel="apple-touch-icon-precomposed" href="icons/apple-touch-icon-152x152.png" />
<meta name="msapplication-TileImage" content="icons/mstile-144x144.png" />
<link rel="icon" href="icons/favicon-32x32.png" sizes="32x32" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="css/prism.css" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="css/materialize.min.css" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="css/le-tex.css" />
</head>
<body id="modules-transpect.github.io">
<header>
<div class="container"><a href="#" data-activates="tr-nav" class="button-collapse top-nav circle hide-on-large-only"><i class="mdi-navigation-menu"></i></a></div>
<ul id="tr-nav" class="side-nav fixed" style="width:260px">
<li class="logo"><a id="logo-container" href="#" class="brand-logo"><object id="front-page-logo" type="image/svg+xml" data="icons/logo-transpect.svg">Your browser does not support SVG</object></a></li>
<li class="naventry-1st"><a href="index.html">About</a></li>
<li class="naventry-1st"><a href="getting-started.html">Getting Started</a></li>
<li class="active no-padding">
<ul class="collapsible collapsible-accordion">
<li class="active naventry-1st" id="d42574e418"><a class="active collapsible-header">Modules</a><div style="display:block" class="collapsible-body">
<ul>
<li class="naventry-2nd"><a href="modules-CoCoTeX.html">CoCoTeX</a></li>
<li class="naventry-2nd"><a href="modules-ace-daisy.html">ace-daisy</a></li>
<li class="naventry-2nd"><a href="modules-basex-svn-api.html">basex-svn-api</a></li>
<li class="naventry-2nd"><a href="modules-bib-parser.html">bib-parser</a></li>
<li class="naventry-2nd"><a href="modules-bits2hub.html">bits2hub</a></li>
<li class="naventry-2nd"><a href="modules-calabash-distro.html">calabash-distro</a></li>
<li class="naventry-2nd"><a href="modules-calabash-frontend.html">calabash-frontend</a></li>
<li class="naventry-2nd"><a href="modules-cascade.html">cascade</a></li>
<li class="naventry-2nd"><a href="modules-control.html">control</a></li>
<li class="naventry-2nd"><a href="modules-control-backend.html">control-backend</a></li>
<li class="naventry-2nd"><a href="modules-crossref.html">crossref</a></li>
<li class="naventry-2nd"><a href="modules-css-tools.html">css-tools</a></li>
<li class="naventry-2nd"><a href="modules-docx2hub.html">docx2hub</a></li>
<li class="naventry-2nd"><a href="modules-docx2hub-frontend.html">docx2hub-frontend</a></li>
<li class="naventry-2nd"><a href="modules-docx2jats-demo.html">docx2jats-demo</a></li>
<li class="naventry-2nd"><a href="modules-docx2tex.html">docx2tex</a></li>
<li class="naventry-2nd"><a href="modules-docx_modify-lib.html">docx_modify-lib</a></li>
<li class="naventry-2nd"><a href="modules-epub-font-subsetter.html">epub-font-subsetter</a></li>
<li class="naventry-2nd"><a href="modules-epub2epub.html">epub2epub</a></li>
<li class="naventry-2nd"><a href="modules-epub2hub-lib.html">epub2hub-lib</a></li>
<li class="naventry-2nd"><a href="modules-epubcheck-extension.html">epubcheck-extension</a></li>
<li class="naventry-2nd"><a href="modules-epubcheck-idpf.html">epubcheck-idpf</a></li>
<li class="naventry-2nd"><a href="modules-epubcheck-transpect.html">epubcheck-transpect</a></li>
<li class="naventry-2nd"><a href="modules-epubtools.html">epubtools</a></li>
<li class="naventry-2nd"><a href="modules-epubtools-frontend.html">epubtools-frontend</a></li>
<li class="naventry-2nd"><a href="modules-evolve-hub.html">evolve-hub</a></li>
<li class="naventry-2nd"><a href="modules-font-obfuscate-extension.html">font-obfuscate-extension</a></li>
<li class="naventry-2nd"><a href="modules-fontmaps.html">fontmaps</a></li>
<li class="naventry-2nd"><a href="modules-github-api.html">github-api</a></li>
<li class="naventry-2nd"><a href="modules-html2hub.html">html2hub</a></li>
<li class="naventry-2nd"><a href="modules-html2xlsx.html">html2xlsx</a></li>
<li class="naventry-2nd"><a href="modules-htmlreports.html">htmlreports</a></li>
<li class="naventry-2nd"><a href="modules-htmltables.html">htmltables</a></li>
<li class="naventry-2nd"><a href="modules-htmltemplates.html">htmltemplates</a></li>
<li class="naventry-2nd"><a href="modules-hub2bits.html">hub2bits</a></li>
<li class="naventry-2nd"><a href="modules-hub2dbk.html">hub2dbk</a></li>
<li class="naventry-2nd"><a href="modules-hub2docx-frontend.html">hub2docx-frontend</a></li>
<li class="naventry-2nd"><a href="modules-hub2docx-lib.html">hub2docx-lib</a></li>
<li class="naventry-2nd"><a href="modules-hub2html.html">hub2html</a></li>
<li class="naventry-2nd"><a href="modules-hub2tei.html">hub2tei</a></li>
<li class="naventry-2nd"><a href="modules-idml2xml.html">idml2xml</a></li>
<li class="naventry-2nd"><a href="modules-idml2xml-frontend.html">idml2xml-frontend</a></li>
<li class="naventry-2nd"><a href="modules-idml_docx-to-docbook_epub-demo.html">idml_docx-to-docbook_epub-demo</a></li>
<li class="naventry-2nd"><a href="modules-idmlvalidation.html">idmlvalidation</a></li>
<li class="naventry-2nd"><a href="modules-image-props-extension.html">image-props-extension</a></li>
<li class="naventry-2nd"><a href="modules-image-transform-extension.html">image-transform-extension</a></li>
<li class="naventry-2nd"><a href="modules-jats2html.html">jats2html</a></li>
<li class="naventry-2nd"><a href="modules-javascript-extension.html">javascript-extension</a></li>
<li class="naventry-2nd"><a href="modules-jing-trang-patch.html">jing-trang-patch</a></li>
<li class="naventry-2nd"><a href="modules-kindlegen-amzn.html">kindlegen-amzn</a></li>
<li class="naventry-2nd"><a href="modules-latex-math-images.html">latex-math-images</a></li>
<li class="naventry-2nd"><a href="modules-logo.html">logo</a></li>
<li class="naventry-2nd"><a href="modules-map-style-names.html">map-style-names</a></li>
<li class="naventry-2nd"><a href="modules-markdown2hub.html">markdown2hub</a></li>
<li class="naventry-2nd"><a href="modules-mathtype-extension.html">mathtype-extension</a></li>
<li class="naventry-2nd"><a href="modules-mml-normalize.html">mml-normalize</a></li>
<li class="naventry-2nd"><a href="modules-mml2tex.html">mml2tex</a></li>
<li class="naventry-2nd"><a href="modules-nlm-stylechecker.html">nlm-stylechecker</a></li>
<li class="naventry-2nd"><a href="modules-officeopenxml-validation.html">officeopenxml-validation</a></li>
<li class="naventry-2nd"><a href="modules-pdf2fxl.html">pdf2fxl</a></li>
<li class="naventry-2nd"><a href="modules-proj-eval.html">proj-eval</a></li>
<li class="naventry-2nd"><a href="modules-pygmentize-xpl.html">pygmentize-xpl</a></li>
<li class="naventry-2nd"><a href="modules-rng-extension.html">rng-extension</a></li>
<li class="naventry-2nd"><a href="modules-schema-bits.html">schema-bits</a></li>
<li class="naventry-2nd"><a href="modules-schema-html.html">schema-html</a></li>
<li class="naventry-2nd"><a href="modules-schema-jats.html">schema-jats</a></li>
<li class="naventry-2nd"><a href="modules-schema-onix.html">schema-onix</a></li>
<li class="naventry-2nd"><a href="modules-schematron.html">schematron</a></li>
<li class="naventry-2nd"><a href="modules-sdox2hub.html">sdox2hub</a></li>
<li class="naventry-2nd"><a href="modules-semex.html">semex</a></li>
<li class="naventry-2nd"><a href="modules-split-docx.html">split-docx</a></li>
<li class="naventry-2nd"><a href="modules-stylemapper-frontend.html">stylemapper-frontend</a></li>
<li class="naventry-2nd"><a href="modules-stylemapper-lib.html">stylemapper-lib</a></li>
<li class="naventry-2nd"><a href="modules-svn-extension.html">svn-extension</a></li>
<li class="naventry-2nd"><a href="modules-tei2bits.html">tei2bits</a></li>
<li class="naventry-2nd"><a href="modules-tei2html.html">tei2html</a></li>
<li class="naventry-2nd"><a href="modules-tei2hub.html">tei2hub</a></li>
<li class="naventry-2nd"><a href="modules-tokenized-to-tree.html">tokenized-to-tree</a></li>
<li class="active naventry-2nd"><a href="modules-transpect.github.io.html">transpect.github.io</a></li>
<li class="naventry-2nd"><a href="modules-transpectdoc.html">transpectdoc</a></li>
<li class="naventry-2nd"><a href="modules-unwrap-mml.html">unwrap-mml</a></li>
<li class="naventry-2nd"><a href="modules-unzip-extension.html">unzip-extension</a></li>
<li class="naventry-2nd"><a href="modules-upload-webcomponent.html">upload-webcomponent</a></li>
<li class="naventry-2nd"><a href="modules-use-css-decorator-classes.html">use-css-decorator-classes</a></li>
<li class="naventry-2nd"><a href="modules-xerif.html">xerif</a></li>
<li class="naventry-2nd"><a href="modules-xerif-demo.html">xerif-demo</a></li>
<li class="naventry-2nd"><a href="modules-xerif-latex.html">xerif-latex</a></li>
<li class="naventry-2nd"><a href="modules-xlsx2html-frontend.html">xlsx2html-frontend</a></li>
<li class="naventry-2nd"><a href="modules-xlsx2html-lib.html">xlsx2html-lib</a></li>
<li class="naventry-2nd"><a href="modules-xml2idml.html">xml2idml</a></li>
<li class="naventry-2nd"><a href="modules-xml2tex.html">xml2tex</a></li>
<li class="naventry-2nd"><a href="modules-xproc-util.html">xproc-util</a></li>
<li class="naventry-2nd"><a href="modules-xproc3kit.html">xproc3kit</a></li>
<li class="naventry-2nd"><a href="modules-xslt-util.html">xslt-util</a></li>
</ul>
</div>
</li>
</ul>
</li>
<li class="naventry-1st"><a href="styleguide.html">Styleguide</a></li>
<li class="naventry-1st"><a href="tutorial.html">Tutorials</a></li>
</ul>
</header>
<main>
<div class="section orange" id="index-banner">
<div class="container">
<h1 id="tr-title" class="light header center-on-small-only white-text">transpect.github.io</h1>
<h4 id="tr-subtitle" class="light orange-text text-lighten-4 center-on-small-only">transpect github.io page</h4>
</div>
</div>
<div class="container">
<div class="row">
<div class="col s12 m9 l10" id="tr-content">
<div class="card">
<div class="card-content"><span class="card-title">Repository</span><table class="informaltable">
<tbody>
<tr>
<td>Git URL</td>
<td><code class="language-markup">https://github.com/transpect/transpect.github.io.git</code></td>
</tr>
<tr>
<td>SVN URL</td>
<td><code class="language-markup">https://github.com/transpect/transpect.github.io</code></td>
</tr>
<tr>
<td>Base URI</td>
<td><code class="language-markup">http://transpect.io/website/</code></td>
</tr>
</tbody>
</table>
<p><a href="https://github.com/transpect/transpect.github.io" class="btn-flat orange lighten-4">Source ⬇</a></p>
</div>
</div>
<div id="tr-build-website" class="section scrollspy">
<h2 class="header">tr:build-website</h2>
<p>
Builds the framework reference hosted on transpect.io
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xpl/build.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:build-website xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="template" primary="false"/>
<p:option name="sync" select="'no'"/>
<p:option name="token"/>
</tr:build-website></code></pre>
</div>
<div id="tr-sync-with-github" class="section scrollspy">
<h2 class="header">tr:sync-with-github</h2>
<p>
This step use the GitHub API to request information
about repositories and XProc pipelines.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xpl/sync-with-github.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-github-api.html">github-api</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:sync-with-github xmlns:tr="http://transpect.io">
<p:output port="result"/>
<p:option name="token" required="false"/>
</tr:sync-with-github></code></pre>
</div>
<div id="tr-batch-rename-files" class="section scrollspy">
<h2 class="header">tr:batch-rename-files</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Renames file references in a XML document and its physical manifestations.
The fileref attributes are matched by a regex pattern. The filerefs are
replaced with the value of the replace option.</p>
<h6 xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Example: rename file extensions</h6>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><code class="xml">
<tr:batch-rename-files>
<p:with-option name="attribute-name" select="'fileref'"/>
<p:with-option name="regex-match" select="'^(.+)\.tif$'"/>
<p:with-option name="regex-replace" select="'$1.jpg'"/>
</tr:batch-rename-files>
</code></pre>
<h6 xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Example: replace whitespace</h6>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><code class="xml">
<tr:batch-rename-files>
<p:with-option name="attribute-name" select="'fileref'"/>
<p:with-option name="regex-match" select="'\s'"/>
<p:with-option name="regex-replace" select="''"/>
</tr:batch-rename-files>
</code></pre>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/batch-rename-files/xpl/batch-rename-files.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:batch-rename-files xmlns:tr="http://transpect.io">
<p:input port="source"/>
<p:output port="result" sequence="true" primary="true"/>
<p:output port="report" primary="false"/>
<p:option name="attribute-name" select="'fileref'"/>
<p:option name="regex-match" required="true"/>
<p:option name="regex-replace" required="true"/>
</tr:batch-rename-files></code></pre>
</div>
<div id="tr-copy-files" class="section scrollspy">
<h2 class="header">tr:copy-files</h2>
<p>The behavior can be partly overridden by using @hub:target-fileref attributes on the
same element
as the @fileref (or whatever $fileref-attribute-name-regex matches) attribute. If
@hub:target-fileref is a relative
URI, it will be resolved wrt $target-dir-uri. If it is an absolute URI, it will have
precedence over $target-dir-uri.
If @hub:target-fileref is present, the original @fileref attribute will not be changed.
Libraries such as hub2docx should prefer @hub:target-fileref in order to determine
the location.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/copy-files/xpl/copy-files.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:copy-files xmlns:tr="http://transpect.io">
<p:input port="source" sequence="false" primary="true"/>
<p:output port="result" sequence="true" primary="true"/>
<p:option name="retain-subpaths" required="false" select="'false'"/>
<p:option name="target-dir-uri" required="true"/>
<p:option name="change-uri" required="false" select="'yes'"/>
<p:option name="change-uri-new-subpath" required="false" select="'media'"/>
<p:option name="fileref-attribute-name-regex" required="false" select="'^fileref$'"/>
<p:option name="fileref-hosting-element-name-regex" required="false" select="'^(audiodata|imagedata|textdata|videodata)$'"/>
<p:option name="fileref-attribute-value-regex" required="false" select="'^.+$'"/>
<p:option name="fail-on-error" required="false" select="'false'"/>
<p:option name="debug" select="'yes'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="status-dir-uri" required="false" select="'debug/status?enabled=false'"/>
</tr:copy-files></code></pre>
</div>
<div id="tr-evolve-mml" class="section scrollspy">
<h2 class="header">tr:evolve-mml</h2>
<p>
This step converts mml to tex. (via https://github.com/transpect/mml2tex)
The mml2tex module must be available on URI http://transpect.io/mml2tex regardless
of the value of the option 'type'.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/evolve-mml/xpl/evolve-mml.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
<li>
<p><a href="modules-mml2tex.html">mml2tex</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:evolve-mml xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="conf" primary="false"/>
<p:input port="paths" sequence="true" primary="true"/>
<p:output port="result" primary="true"/>
<p:option name="output-dir" required="true"/>
<p:option name="type" required="false" select="'mml'"/>
<p:option name="outfile-prefix" required="false" select="'ltx-created-eq-'"/>
<p:option name="extension" required="false" select="'gif'"/>
<p:option name="fail-on-error" required="false" select="'no'"/>
<p:option name="preprocessing" required="false" select="'no'"/>
<p:option name="debug" required="false" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="texmap" select="'http://transpect.io/mml2tex/texmap/texmap.xml'"/>
<p:option name="texmap-upgreek" select="'http://transpect.io/mml2tex/texmap/texmap-upgreek.xml'"/>
<p:option name="context" required="false" select="false()"/>
<p:option name="display-equation-table-role" required="false" select="'equation-table'"/>
<p:option name="store-plain-tex" select="'false'"/>
<p:option name="set-math-style" select="'no'"/>
</tr:evolve-mml></code></pre>
</div>
<div id="tr-extract-cssa-rules" class="section scrollspy">
<h2 class="header">tr:extract-cssa-rules</h2>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/extract-cssa-rules/xpl/extract-cssa-rules.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:extract-cssa-rules xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="previous" sequence="true"/>
<p:output port="result" primary="true"/>
<p:option name="only-layout-type-and-name-attributes" select="'no'"/>
<p:option name="debug" required="false" select="'no'"/>
<p:option name="debug-dir-uri"/>
</tr:extract-cssa-rules></code></pre>
</div>
<div id="tr-extract-from-jar" class="section scrollspy">
<h2 class="header">tr:extract-from-jar</h2>
<p>
Extends the pxp:unzip step to extract files from a jar file.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/extract-from-jar/xpl/extract-from-jar.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:extract-from-jar xmlns:tr="http://transpect.io">
<p:output port="result"/>
<p:option name="debug" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="href" required="true"/>
<p:option name="dest-dir" required="true"/>
</tr:extract-from-jar></code></pre>
</div>
<div id="tr-escape-for-uri" class="section scrollspy">
<h2 class="header">tr:escape-for-uri</h2>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/file-uri/xpl/escape-for-uri.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:escape-for-uri xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:option name="path"/>
</tr:escape-for-uri></code></pre>
</div>
<div id="tr-file-uri" class="section scrollspy">
<h2 class="header">tr:file-uri</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step accepts either a file system path or a URL in its 'filename' option. It
will normalize them so that both a file
system path and a file: URL are available. If filename starts with http: or https:,
the file will be retrieved and stored
locally. Please note that this retrieval will not work for remote directories.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Its primary uses are</p>
<ul xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">
<li>giving users the liberty to either specify a URL or an OS-specific path for input
file parameters;</li>
<li>making XML catalog resolution available to any URI, not just when accessing resources
through catalog-enabled methods
such as <code>doc()</code>;</li>
<li>if, after optional catalog resolution, the 'filename' URI is still http:/https:, <code>p:http-request</code> will be
used to store the file locally.</li>
</ul>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Examples for 'filename' values</h5>
<ul xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">
<li><code>C:/temp/file.docx</code>,</li>
<li><code>c:\temp\file.docx</code>,</li>
<li><code>file:/C:/temp/file.docx</code>,</li>
<li><code>file:///C:/temp/file.docx</code>,</li>
<li><code>/tmp/file.docx</code>,</li>
<li><code>subdir/file.docx</code>,</li>
<li><code>https://github.com/me/myrepo/blob/master/file.docx?raw=true</code></li>
</ul>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Relative Paths</h5>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Relative paths will be resolved against the current working directory, which is better
than the static base uri most of the
time but which might not always be what the user wants. It is a good idea to absolutize
paths, as in
<code>$(readlink -f subdir/file.docx)</code> or <code>$(cygpath -ma subdir/file.docx)</code>.</p>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">XML Catalogs</h5>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">If a catalog is provided on the catalog port and an <a href="https://github.com/transpect/xslt-util/blob/master/xslt-based-catalog-resolver/">XSLT stylesheet for catalog resolution</a> is supplied on the
resolver port, http:/https: URIs will be catalog-resolved first, see below.</p>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Storage Location for HTTP Downloads</h5>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">It is possible to specify a temporary directory in the 'tmpdir' option. By default,
it will be the subdir 'tmp' of the
user’s home directory. The 'tmpdir' option accepts both a file: URL and an OS path,
thanks to this normalization step.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Please note that temporary files will not be deleted by this step.</p>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Unique File Names for HTTP Downloads</h5>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">If the option 'make-unique' is true (which it is by default), the files that are fetched
by <code>p:http-request</code>
will get a random string like <code>_0fa8d348</code> appended to their base name.</p>
<h5 xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Output format</h5>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">The output is a <code>c:result</code> element with the following attributes:</p>
<dl xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:pos="http://exproc.org/proposed/steps/os" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">
<dt><code>os-path</code></dt>
<dd>OS-specific path. This is always present except when there is <code>error-status</code></dd>
<dt><code>local-href</code></dt>
<dd>file: URI. This is always present except when there is <code>error-status</code></dd>
<dt><code>error-status</code></dt>
<dd>This may only happen if the 'filename' was an HTTP URI and if there was an error retrieving
the resource</dd>
<dt><code>href</code></dt>
<dd>The post catalog-resolution URI of the resource (if it is an HTTP URI)</dd>
<dt><code>orig-href</code></dt>
<dd>The pre catalog-resolution URI of the resource (if different from post catalog)</dd>
<dt><code>lastpath</code></dt>
<dd>For ordinary files, the non-directory part including suffix. For directories, the
last path component without trailing slash.
lastpath is URL-escaped, that is, it is taken from local-href.</dd>
<dt><code>lastpath-os</code></dt>
<dd>The same as <code>lastpath</code>, but without URL escaping.</dd>
</dl>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/file-uri/xpl/file-uri.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:file-uri xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="catalog"/>
<p:input port="resolver"/>
<p:output port="result" primary="true"/>
<p:option name="filename" required="true"/>
<p:option name="make-unique" required="false" select="'true'"/>
<p:option name="fetch-http" required="false" select="'true'"/>
<p:option name="check-http" required="false" select="'true'"/>
<p:option name="tmpdir" required="false" select="''"/>
<p:option name="use-filename-from-http-response" required="false" select="'no'"/>
</tr:file-uri></code></pre>
</div>
<div id="tr-unescape-uri" class="section scrollspy">
<h2 class="header">tr:unescape-uri</h2>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/file-uri/xpl/unescape-for-os-path.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:unescape-uri xmlns:tr="http://transpect.io">
<p:input port="source"/>
<p:output port="result" primary="true"/>
<p:option name="uri" select="''"/>
<p:option name="attribute-names" select="''"/>
</tr:unescape-uri></code></pre>
</div>
<div id="tr-ghostscript" class="section scrollspy">
<h2 class="header">tr:ghostscript</h2>
<p>
This is an XProc wrapper to convert PostScript to PDF
utilizing GhostScript, which needs to be installed on
your system.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/ghostscript/xpl/ghostscript.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:ghostscript xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:output port="report" sequence="true" primary="false"/>
<p:option name="href" required="true"/>
<p:option name="outdir" select="'converted'"/>
<p:option name="format" select="'pdf'"/>
<p:option name="options" select="'-sDEVICE=pdfwrite -dEPSCrop'"/>
<p:option name="install-path" select="''"/>
<p:option name="debug" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="fail-on-error" select="'true'"/>
</tr:ghostscript></code></pre>
</div>
<div id="tr-html-embed-resources" class="section scrollspy">
<h2 class="header">tr:html-embed-resources</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://transpect.io">This step tries to embed external resources such as images,
CSS and JavaScript as data URI, as XML or as plain text into the HTML document.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://transpect.io">Consider the example below.</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://transpect.io"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>
<div>
<img alt="a blue square" src="image.png" />
</div>
</body>
</html></pre>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://transpect.io">After processing the HTML, the image is embedded as data URI.</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://transpect.io"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>
<div>
<img alt="a blue square" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAMAAAC6sdbXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdp
bj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6
eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0
NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJo
dHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlw
dGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAv
IiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RS
ZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpD
cmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNl
SUQ9InhtcC5paWQ6NjExNUU3Q0RFNkQ1MTFFNUE4MThFMjY3QjgwODYwQ0UiIHhtcE1NOkRvY3Vt
ZW50SUQ9InhtcC5kaWQ6NjExNUU3Q0VFNkQ1MTFFNUE4MThFMjY3QjgwODYwQ0UiPiA8eG1wTU06
RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTE1RTdDQkU2RDUxMUU1QTgx
OEUyNjdCODA4NjBDRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2MTE1RTdDQ0U2RDUxMUU1
QTgxOEUyNjdCODA4NjBDRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1w
bWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjJf70IAAAAGUExURQCe4AAAAB0uYYYAAAAOSURBVHja
YmDABwACDAAAHgABzCCyiwAAAABJRU5ErkJggg==
" />
</div>
</body>
</html></pre>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/html-embed-resources/xpl/html-embed-resources.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:html-embed-resources xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="catalog"/>
<p:output port="result" primary="true"/>
<p:option name="exclude" select="''"/>
<p:option name="include-class-only" select="''"/>
<p:option name="exclude-by-fileext" select="''"/>
<p:option name="max-base64-encoded-size-kb" select="1000"/>
<p:option name="unavailable-resource-message" select="'no'"/>
<p:option name="debug" select="'no'"/>
<p:option name="fail-on-error" select="'true'"/>
</tr:html-embed-resources></code></pre>
</div>
<div id="tr-get-data-uri" class="section scrollspy">
<h2 class="header">tr:get-data-uri</h2>
<p>
This step performs a simple p:http-request and
checks whether the result exceeds the limit
of the base64 encoded size. If this check fails,
the original fileref markup is reproduced.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/html-embed-resources/xpl/html-embed-resources.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:get-data-uri xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:input port="fileref" primary="false"/>
<p:input port="file-uri" primary="false"/>
<p:output port="result"/>
<p:option name="max-base64-encoded-size-kb" select="'1000'"/>
</tr:get-data-uri></code></pre>
</div>
<div id="tr-load-html5" class="section scrollspy">
<h2 class="header">tr:load-html5</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Uses validator.nu that is bundled with Calabash to parse HTML5 (both HTML and XML
serializations) files.
The files must have a single top-level element. They don’t need to have <code>html</code> as their top-level
element though. <code>body</code>, <code>section</code> etc. are also acceptable.</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/html5/xpl/load-html5.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:load-html5 xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:option name="file" required="true"/>
<p:option name="debug" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
</tr:load-html5></code></pre>
</div>
<div id="tr-imagemagick" class="section scrollspy">
<h2 class="header">tr:imagemagick</h2>
<p>
This is an XProc wrapper for ImageMagick. The ImageMagick executable
needs to be installed on your system.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/imagemagick/xpl/imagemagick.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:imagemagick xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:output port="report" sequence="true" primary="false"/>
<p:option name="href" required="true"/>
<p:option name="outdir" select="'converted'"/>
<p:option name="format" select="'jpg'"/>
<p:option name="imagemagick-options" select="''"/>
<p:option name="imagemagick-path" select="''"/>
<p:option name="prefix" select="''"/>
<p:option name="debug" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="fail-on-error" select="'false'"/>
</tr:imagemagick></code></pre>
</div>
<div id="tr-insert-srcpaths" class="section scrollspy">
<h2 class="header">tr:insert-srcpaths</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step inserts the XPath location of any element as attribute.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Consider this example:</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><root>
<element>Text</element>
</root></pre>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">After applying the step, each element includes a <code>srcpath</code>
attribute containing its XPath location.</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><root srcpath="/root">
<element srcpath="/root/element">Text</element>
</root></pre>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/insert-srcpaths/xpl/insert-srcpaths.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:insert-srcpaths xmlns:tr="http://transpect.io">
<p:input port="source"/>
<p:output port="result"/>
<p:option name="schematron-like-paths" select="'no'"/>
<p:option name="exclude-elements" select="''"/>
<p:option name="exclude-descendants" select="'yes'"/>
<p:option name="prepend" select="''"/>
</tr:insert-srcpaths></code></pre>
</div>
<div id="tr-load-data" class="section scrollspy">
<h2 class="header">tr:load-data</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step loads a file via http-request</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/load/xpl/load-data.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:load-data xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:option name="href" required="true"/>
<p:option name="content-type-override" select="''"/>
<p:option name="encoding" select="'base64'"/>
<p:option name="fail-on-error" select="'false'"/>
</tr:load-data></code></pre>
</div>
<div id="tr-load-html" class="section scrollspy">
<h2 class="header">tr:load-html</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step implements TagSoup to load even not well-formed HTML files. To use TagSoup
with
Calabash, you must include the TagSoup JAR file in your Java classpath and use a Calabash
configuration file.</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">
<code>
<cc:xproc-config xmlns:cc="http://xmlcalabash.com/ns/configuration" xmlns:tr="http://transpect.io">
<cc:html-parser value="tagsoup"/>
</cc:xproc-config>
</code>
</pre>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/load/xpl/load-html.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:load-html xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:option name="href" required="true"/>
<p:option name="fail-on-error" select="'false'"/>
</tr:load-html></code></pre>
</div>
<div id="tr-load-sources" class="section scrollspy">
<h2 class="header">tr:load-sources</h2>
<p>Documents identified by their base URIs should be selected from the documents on the
source port.
The selected documents are then passed to the result port. If there is no matching
document on the source port
for a given URI, the document should instead be loaded from the location specified
by the base URI.</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/load/xpl/load-sources.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:load-sources xmlns:tr="http://transpect.io">
<p:input port="source" sequence="true" primary="true"/>
<p:output port="result" sequence="true"/>
<p:option name="uris"/>
</tr:load-sources></code></pre>
</div>
<div id="tr-load" class="section scrollspy">
<h2 class="header">tr:load</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Replacement for
<c:body>p:load</c:body>. Uses the file-uri util to load any file
without using resolve-uri or other inconveniend ways. A relative
file (param href) will be loaded relative to the current working directory. Please
note, there is no input port. The document is loaded via <code>href</code> option.</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/load/xpl/load.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:load xmlns:tr="http://transpect.io">
<p:output port="result" primary="true"/>
<p:option name="href" required="true"/>
<p:option name="dtd-validate" select="'false'"/>
<p:option name="fail-on-error" select="'yes'"/>
</tr:load></code></pre>
</div>
<div id="tr-merge-hub" class="section scrollspy">
<h2 class="header">tr:merge-hub</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dbk="http://docbook.org/ns/docbook" xmlns:css="http://www.w3.org/1996/css" xmlns:tr="http://transpect.io" xmlns:csstmp="http://transpect.io/csstmp" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step expects a sequence of Hub files and merges them to one single file.</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/merge-hub/xpl/merge-hub.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:merge-hub xmlns:tr="http://transpect.io">
<p:input port="source" sequence="true" primary="true"/>
<p:output port="result" primary="true"/>
<p:output port="report"/>
<p:option name="debug" required="false" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="move-dir-components-to-srcpath" required="false" select="0"/>
<p:option name="space-separated-docVar-merge" required="false" select="''"/>
</tr:merge-hub></code></pre>
</div>
<div id="tr-params2text" class="section scrollspy">
<h2 class="header">tr:params2text</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Converts a <c:param-set> into text (CSV or whitespace separated).</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/params2text/xpl/params2text.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:params2text xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:output port="result" primary="true"/>
<p:option name="mode" select="'one-line-as-comment'"/>
<p:option name="include" select="'*'"/>
<p:option name="exclude" select="'-'"/>
<p:option name="separator" select="' '"/>
<p:option name="debug" required="false" select="'no'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
</tr:params2text></code></pre>
</div>
<div id="tr-pdf-info" class="section scrollspy">
<h2 class="header">tr:pdf-info</h2>
<p>
An XProc wrapper for Poppler's pdfinfo. This step
needs Poppler to be installed on the system.
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/pdf-info/xpl/pdf-info.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xproc-util transpect.github.io.html">xproc-util transpect.github.io</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:pdf-info xmlns:tr="http://transpect.io">
<p:output port="result" sequence="true"/>
<p:option name="file" required="true"/>
<p:option name="debug" select="'yes'"/>
<p:option name="debug-dir-uri" select="'debug'"/>
<p:option name="status-dir-uri" select="concat($debug-dir-uri, '/status')"/>
</tr:pdf-info></code></pre>
</div>
<div id="tr-re-attach-out-of-doc-PIs" class="section scrollspy">
<h2 class="header">tr:re-attach-out-of-doc-PIs</h2>
<p>This should be the penultimate step before writing back the result document.</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/re-attach-out-of-doc-PIs/xpl/re-attach-out-of-doc-PIs.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>
</li>
</ul>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:re-attach-out-of-doc-PIs xmlns:tr="http://transpect.io">
<p:input port="source" primary="true"/>
<p:output port="result" sequence="true" primary="true"/>
<p:option name="file-uri"/>
<p:option name="separator" select="'
'"/>
</tr:re-attach-out-of-doc-PIs></code></pre>
</div>
<div id="tr-recursive-directory-list" class="section scrollspy">
<h2 class="header">tr:recursive-directory-list</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Copied from <a href="http://xproc.org/library/">http://xproc.org/library/recursive-directory-list.xpl</a></p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Copyright situation unclear.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Changed the namespace prefix from <code>l</code> to <code>tr</code> (and the namespaces accordingly).</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Prepended a <code>cxf:info</code> step because the step would fail sometimes with Calabash 1.1.4 even if there was
a try/catch around it.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:cxf="http://xmlcalabash.com/ns/extensions/fileutils" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">In addition, in order to deal with a similar error, replaced <code>p:value-available()</code> with default values (empty strings) for include-filter and exclude-filter.</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/recursive-directory-list/xpl/recursive-directory-list.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:recursive-directory-list xmlns:tr="http://transpect.io">
<p:output port="result"/>
<p:option name="path" required="true"/>
<p:option name="include-filter" select="''"/>
<p:option name="exclude-filter" select="''"/>
<p:option name="depth" select="-1"/>
</tr:recursive-directory-list></code></pre>
</div>
<div id="tr-remove-ns-decl-and-xml-base" class="section scrollspy">
<h2 class="header">tr:remove-ns-decl-and-xml-base</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">The purpose of this identity transformation is to remove all namespace declarations.
The step prevents that XProc writes all prefixes declared in the pipeline are written
into the output.</p>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/remove-ns-decl-and-xml-base/xpl/remove-ns-decl-and-xml-base.xpl"/></code></pre>
<h4>Synopsis</h4>
<pre><code class="language-markup"><tr:remove-ns-decl-and-xml-base xmlns:tr="http://transpect.io">
<p:input port="source"/>
<p:output port="result"/>
</tr:remove-ns-decl-and-xml-base></code></pre>
</div>
<div id="tr-resolve-params" class="section scrollspy">
<h2 class="header">tr:resolve-params</h2>
<p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step takes a c:param-set document as input. Parameters which follow the syntax
<code><b>${name}</b></code> are resolved with matching parameters from this document. For
example the parameter <code>${isbn}</code> will be replaced with the <code>@value</code>
of a <code>c:param</code> element which contains a matching <code>@name</code> attribute.</p>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">Given this input document:</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><code><c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
<param name="isbn" value="(97[89]){1}\d{9}"/>
<param name="epub-filename" value="<b>{$isbn}</b>\.epub"/>
</c:param-set></code></pre>
<p xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink">This step would resolve the isbn parameter in <code>c:param[@name eq 'epub-filename']</code>
and generates this output:</p>
<pre xmlns:p="http://www.w3.org/ns/xproc" xmlns:tr="http://transpect.io" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:j="http://marklogic.com/json" xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:xlink="http://www.w3.org/1999/xlink"><code><c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
<param name="isbn" value="(97[89]){1}\d{9}"/>
<param name="epub-filename" value="<b>(97[89]){1}\d{9}</b>\.epub"/>
</c:param-set></code></pre>
</p>
<h4>Import</h4>
<pre><code class="language-markup"><p:import href="http://transpect.io/website/xproc-util/resolve-params/xpl/resolve-params.xpl"/></code></pre>
<h4>Dependencies</h4>
<ul>
<li>
<p><a href="modules-xslt-util.html">xslt-util</a></p>