-
Notifications
You must be signed in to change notification settings - Fork 34
/
quickstart.html
executable file
·400 lines (398 loc) · 20.9 KB
/
quickstart.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
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mulberry Technologies, Inc.: NISO JATS 1.0 Preview Stylesheets: Quick Start Guide</title>
<link rel="stylesheet" type="text/css" href="jats-preview.css">
</head>
<body>
<div id="article1-front" class="front">
<div class="metadata two-column table">
<div class="row">
<div class="cell">
<h4 class="generated">Journal Information</h4>
<div class="metadata-group">
<p class="metadata-entry"><span class="generated">Journal ID: </span>N/A
</p>
<p class="metadata-entry"><span class="generated">ISSN: </span>N/A
</p>
</div>
</div>
<div class="cell">
<h4 class="generated">Article Information</h4>
<div class="metadata-group">
<p class="metadata-entry"><span class="generated">Publication date: </span>2012
</p>
</div>
</div>
</div>
</div>
<hr class="part-rule">
<div class="metadata centered">
<h1 class="document-title">NISO JATS 1.0 Preview Stylesheets: Quick Start Guide</h1>
</div>
<div class="metadata two-column table">
<div class="row">
<div class="cell" style="text-align: right">
<div class="metadata-group">
<p class="metadata-entry"><a id="d2e16">
<!-- named anchor --></a>Mulberry Technologies, Inc.
</p>
</div>
</div>
<div class="cell">
<div class="metadata-group"></div>
</div>
</div>
</div>
<hr class="part-rule">
</div>
<div id="article1-body" class="body">
<div class="section"><a id="d2e22">
<!-- named anchor --></a><h2 class="main-title">Introduction</h2>
<p id="d2e25">These stylesheets provide preview display of journal articles tagged using NISO JATS
version 1.0 (or any of several related tag sets). How you run them depends upon several
things:
</p>
<div class="list"><a id="d2e27">
<!-- named anchor --></a><ol style="list-style-type: decimal">
<li>
<p id="d2e29">How citations are tagged in your input. Are they provided with explicit punctuation
and
formatting? Or are they unformatted?
</p>
</li>
<li>
<p id="d2e32">What kind of output you want: HTML (with CSS) or PDF? If your citations are
unformatted, do you want the citations in the output to have APA-style punctuation
or
NLM/PubMed Central-style punctuation?
</p>
</li>
<li>
<p id="d2e35">What kind of computing environment you want to run the stylesheets in: You can run
these stylesheets with a standalone XSLT processor; with an XProc pipeline engine;
or
with Saxon PE or EE version 9.2 or later.
</p>
</li>
</ol>
</div>
<p id="d2e37">This document provides quick instructions on using the stylesheets in the most common
ways,
omitting some details for simplicity. It assumes that your input is in one of the
following
versions of the NLM / JATS vocabulary:
<div class="list"><a id="d2e39">
<!-- named anchor --></a><ul>
<li>
<p id="d2e41">NISO JATS (Journal article tag set) Publishing or Authoring, version 1.0.</p>
</li>
<li>
<p id="d2e44">NLM/NCBI Journal Publishing or Authoring, version 3.0.</p>
</li>
<li>
<p id="d2e47">NLM/NCBI Journal Publishing or Authoring, version 2.3.</p>
</li>
<li>
<p id="d2e50">An older variant of the NLM/NCBI DTD (your mileage may vary).</p>
</li>
</ul>
</div> It also assumes you know how to invoke your XSLT or XProc processor on particular
input and put the output where you want it to go.
</p>
<p id="d2e53">For the full story on the limitations of these stylesheets and the assumptions they
make
about the input, see the <i>Users' Guide</i>.
</p>
<p id="d2e58">For technical details, including a more precise description of technical dependencies,
alternative ways to deploy and apply the stylesheets, and how to extend and modify
them, see
the <i>Technical Documentation</i>. That document also includes a more precise
specification of the formatted and unformatted citation formats supported by this
package.
</p>
<div class="section"><a id="d2e63">
<!-- named anchor --></a><h3 class="section-title">Copyright and disclaimer information for JATS preveiw software</h3>
<p id="d2e66">The XSL stylesheets and other code (CSS, XProc, and Schematron) provided at the NCBITools/JATSPreviewStylesheets
github repository (<a target="xrefwindow" href="https://github.com/NCBITools/JATSPreviewStylesheets" id="d2e68">https://github.com/NCBITools/JATSPreviewStylesheets</a>) is work is in the public domain and may be reproduced, published or
otherwise used without the permission of the National Library of Medicine (NLM).
</p>
<p id="d2e71">We request only that the NLM is cited as the source of the work.</p>
<p id="d2e73">Although all reasonable efforts have been taken to ensure the accuracy and
reliability of the software and data, the NLM and the U.S. Government do
not and cannot warrant the performance or results that may be obtained by
using this software or data. The NLM and the U.S. Government disclaim all
warranties, express or implied, including warranties of performance,
merchantability or fitness for any particular purpose.
</p>
</div>
</div>
<div class="section"><a id="d2e75">
<!-- named anchor --></a><h2 class="main-title">Running the stylesheet</h2>
<div class="section"><a id="d2e78">
<!-- named anchor --></a><h3 class="section-title">Standalone XSLT users</h3>
<p id="d2e81">Some of the stylesheets in this distribution require XSLT 2.0, but most are in XSLT
1.0
and will work in any conformant XSLT processor. When running an XSLT 1.0 stylesheet
with
an XSLT 2.0 processor, it may give you warnings. Have no concern: They are designed
to
work correctly with either an XSLT 1.0 or XSLT 2.0 processor.
</p>
<p id="d2e83">If your input has unformatted citations, you will need to perform citation
pre-processing. If your citations are formatted, you can skip this step.
</p>
<p id="d2e85">Note also that in the latter case (when no pre-processing is required), you can use
an
XSLT 1.0 processor in your web browser to perform the transformation and display the
results dynamically. This scenario is described below as <a href="#example-1">Example
1</a>.
<div class="list"><a id="d2e90">
<!-- named anchor --></a><h4 class="block-title">Citation pre-processing</h4>
<ul>
<li>
<p id="d2e94">Produce a temporary document with citations formatted in NLM / Pub Med Central
style by running <tt>xslt/citations-prep/jats-PMCcit.xsl</tt>. This is
an XSLT 1.0 stylesheet.
</p>
</li>
<li>
<p id="d2e100">Alternatively, you may use a similar stylesheet for APA style,
<tt>xslt/citations-prep/jats-APAcit.xsl</tt>. This is an XSLT 2.0
stylesheet and requires a 2.0 processor.
</p>
</li>
</ul>
</div>
</p>
<p id="d2e105">Then, on the temporary file you just created, or on your source file if your citations
are already formatted:
</p>
<p id="d2e107"><b>For HTML output:</b>
<div class="list"><a id="d2e111">
<!-- named anchor --></a><ol style="list-style-type: decimal">
<li>
<p id="d2e113">Run <tt>xslt/main/jats-html.xsl</tt> on your input (or on the
temporary file, if you made one).
</p>
</li>
<li>
<p id="d2e119">Copy <tt>jats-preview.css</tt> to the file system next to the result
file(s).
</p>
</li>
</ol>
</div>
</p>
<p id="d2e124"><b>For PDF output:</b>
<div class="list"><a id="d2e128">
<!-- named anchor --></a><ol style="list-style-type: decimal">
<li>
<p id="d2e130">Run <tt>xslt/main/jats-xslfo.xsl</tt> on your input (or on the
temporary file, if you made one).
</p>
</li>
<li>
<p id="d2e136">Run an XSL-FO formatter on the XSLT output. These stylesheets have been tested
using AntennaHouse formatter, but they should work in any conformant XSL-FO
implementation.
</p>
</li>
</ol>
</div>
</p>
</div>
<div class="section"><a id="d2e138">
<!-- named anchor --></a><h3 class="section-title">XProc users</h3>
<p id="d2e141">Pipelines of stylesheets may also be run using an XProc engine that supports XSLT
2.0,
such as XML Calabash. (See the <i>Users' Guide</i> and the <i>Technical
Documentation</i> for more pipelines for specialized applications.)
</p>
<p id="d2e149">Run the appropriate pipeline from the following list:
<div class="list"><a id="d2e151">
<!-- named anchor --></a><ul>
<li>
<p id="d2e153"><b>For HTML output with PMC-style citations:</b> run
<tt>shells/xproc/jats-PMCcit-html.xpl</tt>.
</p>
</li>
<li>
<p id="d2e161"><b>For HTML output with APA-style citations:</b> run
<tt>shells/xproc/jats-APAcit-html.xpl</tt>.
</p>
</li>
<li>
<p id="d2e169"><b>For PDF output with PMC-style citations:</b> run
<tt>shells/xproc/jats-PMCcit-xslfo.xpl</tt>.
</p>
</li>
<li>
<p id="d2e177"><b>For PDF output with APA-style citations:</b> run
<tt>shells/xproc/jats-APAcit-xslfo.xpl</tt>.
</p>
</li>
</ul>
</div>
</p>
<p id="d2e184">If the input citations are already formatted, either the PMC or the APA pipelines
can be
run.
</p>
</div>
<div class="section"><a id="d2e186">
<!-- named anchor --></a><h3 class="section-title">Saxon PE/EE users</h3>
<p id="d2e189">Special "wrapper" stylesheets (or "shells") are provided for the convenience of Saxon
users; these wrappers call other stylesheets in the distribution in pipelines in order
to
run pre- or post-processes along with the main transformation. Since they use extended
XSLT functionality in a syntax defined by Saxon, they require Saxon PE or EE, version
9.2
or later. (Some older versions of Saxon also support the functionality.)
</p>
<p id="d2e191">In addition to those listed here, other wrapper stylesheets are given in the distribution
to demonstrate more specialized applications; see the <i>Users' Guide</i> and
the <i>Technical Documentation</i> for more details.
</p>
<p id="d2e199">Run the appropriate pipeline from the following list:
<div class="list"><a id="d2e201">
<!-- named anchor --></a><ul>
<li>
<p id="d2e203"><b>For HTML output with PMC-style citations:</b> run
<tt>shells/saxon/jats-PMCcit-html.xsl</tt>.
</p>
</li>
<li>
<p id="d2e211"><b>For HTML output with APA-style citations:</b> run
<tt>shells/saxon/jats-APAcit-html.xsl</tt>.
</p>
</li>
<li>
<p id="d2e219"><b>For PDF output with PMC-style citations:</b> run
<tt>shells/saxon/jats-PMCcit-xslfo.xsl</tt>.
</p>
</li>
<li>
<p id="d2e227"><b>For PDF output with APA-style citations:</b> run
<tt>shells/saxon/jats-APAcit-xslfo.xsl</tt>.
</p>
</li>
</ul>
</div>
</p>
<p id="d2e234">If the input citations are already formatted, either the PMC or the APA wrapper
stylesheets can be run.
</p>
</div>
</div>
<div class="section"><a id="d2e236">
<!-- named anchor --></a><h2 class="main-title">Examples</h2>
<div class="list"><a id="example-1">
<!-- named anchor --></a><h4 class="block-title">Example 1: HTML for display in a browser</h4>
<ol style="list-style-type: decimal">
<li>
<p id="d2e243">The user has no unformatted citations, and wishes to open the XML document to preview
directly in a web browser (such as Firefox, Safari, Chrome, Opera or Internet
Explorer)
</p>
</li>
<li>
<p id="d2e246">The appropriate stylesheet to use is <tt>main/jats-html.xsl</tt>. The
user copies this stylesheet to the directory containing the XML source file, along
with
the CSS stylesheet to be applied to the result,
<tt>jats-preview.css</tt></p>
</li>
<li>
<p id="d2e254">The user edits the XML file, inserting a processing instruction at the top of the
file
as
follows:<pre class="preformat"><?xml-stylesheet type="text/xsl" href="jats-html.xsl"?></pre></p>
</li>
<li>
<p id="d2e259">The user opens the XML file in the browser.</p>
</li>
</ol>
</div>
<div class="list"><a id="d2e261">
<!-- named anchor --></a><h4 class="block-title">Example 2: Saxon from the command line</h4>
<ol style="list-style-type: decimal">
<li>
<p id="d2e265">Again, HTML output is desired. The user has access to Saxon 9.4 PE, which supports
Saxon extension functions.
</p>
</li>
<li>
<p id="d2e268">The user determines that the data includes unformatted citations (using the
<tt>element-citation</tt> element), and wishes them to be formatted
according to APA guidelines.
</p>
</li>
<li>
<p id="d2e274">The appropriate stylesheet to use is
<tt>shells/saxon/jats-APAcit-html.xsl</tt>.
</p>
</li>
<li>
<p id="d2e280">The user invokes Saxon to apply
<tt>shells/saxon/jats-APAcit-html.xsl</tt> to the source document or
documents (as described in Saxon documentation at <a target="xrefwindow" href="http://www.saxonica.com/documentation/using-xsl/commandline.xml" id="d2e285">http://www.saxonica.com/documentation/using-xsl/commandline.xml</a>)
generating a result file or set of files in HTML format
</p>
</li>
<li>
<p id="d2e289">The user copies <tt>jats-preview.css</tt> into the subdirectory
containing the results
</p>
</li>
<li>
<p id="d2e295">HTML file output is now ready to be opened in a browser</p>
</li>
</ol>
</div>
<div class="list"><a id="d2e297">
<!-- named anchor --></a><h4 class="block-title">Example 3: An XProc pipeline followed by XSL-FO formatting to produce PDF</h4>
<ol style="list-style-type: decimal">
<li>
<p id="d2e301">This time, PDF output is desired. The user does not have Saxon, but is able to download
and install XML Calabash, an open-source XProc engine supporting XSLT 2.0 (available
at
<a target="xrefwindow" href="http://xmlcalabash.com/" id="d2e303">http://xmlcalabash.com/</a>).
</p>
</li>
<li>
<p id="d2e307">The user determines that the data includes unformatted citations (using the
<tt>element-citation</tt> element), and wishes them to be formatted
according to NLM/PMC guidelines.
</p>
</li>
<li>
<p id="d2e313">The appropriate pipeline file is
<tt>shells/xproc/jats-PMCcit-xslfo.xpl</tt>.
</p>
</li>
<li>
<p id="d2e319">Following the Calabash documentation, the user generates a result file or set of files
in XSL-FO format.
</p>
</li>
<li>
<p id="d2e322">The XSL-FO file may now be opened and processed by an XSL-FO engine such as
AntennaHouse.
</p>
</li>
</ol>
</div>
</div>
</div>
<div id="article1-footer" class="footer">
<hr class="part-rule">
<div class="branding">
<p>This display is generated from NISO JATS XML with <b>jats-html.xsl</b>. The XSLT engine is SAXON 9.3.0.4 from Saxonica.
</p>
</div>
</div>
</body>
</html>