-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgetting-started.html
executable file
·328 lines (318 loc) · 25.2 KB
/
getting-started.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
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" xml:base="../getting-started.html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Getting Started</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>
<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="active naventry-1st"><a href="getting-started.html">Getting Started</a></li>
<li class="no-padding">
<ul class="collapsible collapsible-accordion">
<li class="naventry-1st" id="d42574e418"><a class="collapsible-header">Modules</a><div 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="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">Getting Started</h1>
<h4 id="tr-subtitle" class="light orange-text text-lighten-4 center-on-small-only">Learn how to use transpect</h4>
</div>
</div>
<div class="container">
<div class="row">
<div class="col s12 m9 l10" id="tr-content">
<div id="gs-prerequisites" class="section scrollspy">
<h2 class="header">Prerequisites</h2>
<p>There are no further prerequisites as are required to run XProc. If you are not familiar
with XProc 1.0, we
suggest to work yourself through Roger L. Costello’s <a href="http://www.xfront.com/xproc/">➼ XProc
tutorial</a> first. We're planning to move transpect to XProc 3.0 soon, so you could skip version
1.0 and read
our Martin Kraetke's <a href="https://xporc.net/xproc-tutorial/">➼ XProc 3.0 tutorial</a> as well.</p>
<div class="col s12 m6">
<h5>XML Calabash</h5>
<p>We recommend to use our pre-configured XML Calabash for running transpect’s XProc
pipelines. It includes
convenient frontend scripts and extensions steps which are essential to some modules.</p>
</div>
<div class="col s12 m6">
<h5>Java</h5>
<p>XML Calabash needs Java 1.7 and later to run. We noticed some odd behaviour while
running XML Calabash
with a JVMs other than Oracle. If you get memory issues, consider to install the 64-bit
version.</p>
</div>
</div>
<div id="gs-project-setup" class="section scrollspy">
<h2 class="header">Project Setup</h2>
<h4>Install XML Calabash</h4>
<p>We recommend to use Git or SVN to checkout Calabash to take care that all dependencies
are met. The calabash directory
should be placed at the top-level of your project directory.</p>
<pre><code class="language-code">MyProject/
|--calabash/
| |--calabash.sh
| |--calabash.bat</code></pre>
<pre><code class="language-git">git clone --recursive https://github.com/transpect/calabash-frontend calabash</code></pre>
<div class="card">
<div class="card-content">
<span class="card-title">Optional: checkout XML Calabash with SVN</span>
<p>The SVN client of GitHub doesn't support SVN externals, so we have to get each module
separately.</p>
<pre><code class="language-svn">svn co https://github.com/transpect/calabash-frontend/trunk calabash
svn co https://github.com/transpect/calabash-distro/trunk calabash/distro</code></pre>
<p>Some transpect modules depend on certain XML Calabash extensions, so you may want
to get them, too.</p>
<pre><code class="language-svn">svn co https://github.com/transpect/unzip-extension/trunk calabash/extensions/transpect/unzip-extension
svn co https://github.com/transpect/rng-extension/trunk calabash/extensions/transpect/rng-extension
svn co https://github.com/transpect/image-props-extension/trunk calabash/extensions/transpect/image-props-extension
svn co https://github.com/transpect/image-transform-extension/trunk calabash/extensions/transpect/image-transform-extension</code></pre>
</div>
</div>
<h4>Checkout the transpect modules</h4>
<p>First, we have to checkout the modules with Git or SVN. For example, we want to get
<a href="modules-docx2hub.html#docx2hub-convert">docx2hub:convert</a>,
which converts Microsoft Word to <a href="https://github.com/le-tex/Hub">➼ Hub XML</a>. The docx2hub module depends on <a href="modules-xproc-util.html#modules-xproc-util">xproc-util</a> and <a href="modules-xslt-util.html#modules-xslt-util">xslt-util</a>.
</p>
<pre><code class="language-git">git clone https://github.com/transpect/docx2hub
git clone https://github.com/transpect/htmlreports
git clone https://github.com/transpect/xslt-util
git clone https://github.com/transpect/xproc-util</code></pre>
<div class="card">
<div class="card-content">
<span class="card-title">Optional: checkout modules with SVN</span>
<pre><code class="language-git">svn co https://github.com/transpect/docx2hub/trunk docx2hub
svn co https://github.com/transpect/htmlreports/trunk htmlreports
svn co https://github.com/transpect/xslt-util/trunk xslt-util
svn co https://github.com/transpect/xproc-util/trunk xproc-util</code></pre>
</div>
</div>
<p>After we cloned XML Calabash and the transpect modules, our project directory should
look like this.</p>
<pre><code class="language-code">MyProject/
|--calabash/
|--docx2hub/
|--htmlreports/
|--xproc-util/
|--xslt-util/</code></pre>
<h4>Create an XML Catalog</h4>
<p>Transpect uses canonical import URIs to import other modules. To resolve this URIs,
our XML Calabash
looks after an XML catalog in the project directory. Starting from the project dir,
the path is usually <code class="language-filename">xmlcatalog/catalog.xml</code>.
So you have to create the directory <code class="language-filename">xmlcatalog</code> and create a file named <code class="language-filename">catalog.xml</code> in this directory.</p>
<pre><code class="language-code">MyProject/
|--xmlcatalog/
| |--catalog.xml</code></pre>
<p>The XML catalog of the project is used to include the catalogs of the transpect modules.
Therefore the <code class="language-code">nextCatalog</code> element is used
to connect the module catalogs. Edit the <code class="language-filename">catalog.xml</code> and add the following lines.</p>
<pre><code class="language-markup"><?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<nextCatalog catalog="../docx2hub/xmlcatalog/catalog.xml"/>
<nextCatalog catalog="../htmlreports/xmlcatalog/catalog.xml"/>
<nextCatalog catalog="../xproc-util/xmlcatalog/catalog.xml"/>
<nextCatalog catalog="../xslt-util/xmlcatalog/catalog.xml"/>
</catalog></code></pre>
</div>
<div id="gs-run-the-pipeline" class="section scrollspy">
<h2 class="header">Run the pipeline</h2>
<h4>Command line</h4>
<p>After we are included transpect in our project, we can run the <a href="modules-docx2hub.html#docx2hub-convert">docx2hub:convert</a> pipeline to convert a Microsoft
Word DOCX file to <a href="https://github.com/le-tex/Hub">➼ Hub XML</a>. Users of Linux, Mac OS X or Cygwin can use
a convenient Bash script:</p>
<pre>./calabash/calabash.sh -o result=MyXMLfile.xml docx2hub/xpl/docx2hub.xpl docx=MyWordfile.docx</pre>
<p>There exists also a Batch file for Windows users:</p>
<pre>.\calabash\calabash.bat -o result=MyXMLfile.xml .\docx2hub\xpl\docx2hub.xpl docx=MyWordfile.docx</pre>
<h4 id="gs-include-in-your-pipeline">Include in your pipeline</h4>
<p>You can import and use transpect modules in your own XProc pipelines. Therefore, you
need to declare the namespace and
add the <code class="language-code">p:import</code> statement of the XProc step you want to use. Here is a simple XProc pipeline which
implements
<a href="modules-docx2hub.html#docx2hub-convert">docx2hub:convert</a>.
</p>
<pre><code class="language-markup"><?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:docx2hub="http://transpect.io/docx2hub"
version="1.0">
<p:output port="result"/>
<p:option name="docx"/>
<p:import href="http://transpect.io/docx2hub/xpl/docx2hub.xpl"/>
<docx2hub:convert name="docx2hub">
<p:with-option name="docx" select="$docx"/>
</docx2hub:convert>
</p:declare-step></code></pre>
</div>
<div id="gs-learn-more" class="section scrollspy">
<h2 class="header">Learn more?</h2>
<p>If you want to get a deeper insight into the transpect framework, we would recommend
to read our <a href="tutorial.html#tutorial-docx-jats-epub">Tutorials</a>.</p>
</div>
</div>
<div class="col hide-on-small-only m3 l2">
<div class="toc-wrapper pin-top" style="top: 0px;">
<div style="height: 1px;">
<ul id="tr-toc" class="table-of-contents">
<li><a href="#gs-prerequisites" class="active">Prerequisites</a></li>
<li><a href="#gs-project-setup">Project Setup</a></li>
<li><a href="#gs-run-the-pipeline">Run the pipeline</a></li>
<li><a href="#gs-learn-more">Learn more?</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</main>
<footer class="page-footer grey">
<div class="container">
<div class="row">
<div id="tr-footer-1" class="col s12 m6 l4">
<h5 class="white-text">GitHub</h5>
<p class="white-text">Checkout the transpect repositories on GitHub and use transpect in your project.
Give us feedback, create issues and make pull requests.</p>
<p><a target="_blank" href="https://github.com/transpect" class="btn red">GitHub</a></p>
</div>
<div id="tr-footer-2" class="col s12 m6 l4">
<h5 class="white-text">Twitter</h5>
<p class="white-text">News from le-tex’ XML machine room. Mostly related to
XSLT/XPath 2+, XProc, Relax NG, Schematron, and our
open-source framework transpect.
</p>
<p><a target="_blank" href="https://twitter.com/intent/user?screen_name=letexml" class="btn red">Follow @letexml</a></p>
</div>
<div id="tr-footer-3" class="col s12 m6 l4"><a target="_blank" href="http://www.le-tex.de"><object id="letex-logo" type="image/svg+xml" data="icons/logo-le-tex.svg">Your browser does not support SVG</object></a></div>
</div>
</div>
<div class="footer-copyright grey darken-1">
<div class="container">
<div class="row">
<div id="tr-footer-copyright-1" class="col s12 m6 l6">
<p class="white-text left">le-tex publishing services GmbH, <span class="current-year">2025</span></p>
</div>
<div id="tr-footer-copyright-2" class="col s12 m6 l6">
<p>
<a class="white-text right" href="http://www.le-tex.de">http://www.le-tex.de</a>
<a rel="me" href="https://fosstodon.org/@letexml" aria-label="Mastodon"></a>
</p>
</div>
</div>
</div>
</div>
</footer><script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script><script type="text/javascript" src="js/prism.js"></script><script type="text/javascript" src="js/materialize.min.js"></script><script src="js/init.js"></script></body>
</html>