-
Notifications
You must be signed in to change notification settings - Fork 34
/
userguide.html
executable file
·1150 lines (1142 loc) · 73.5 KB
/
userguide.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
<!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.: Users' Guide for the NISO JATS 1.0 Preview Stylesheets</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">Users' Guide for the NISO JATS 1.0 Preview Stylesheets</h1>
<div class="document-title-notes metadata-group">
<p class="metadata-entry"><span class="generated">Alternative title (<span class="data">running-head</span>): </span>NISO JATS 1.0 Preview Stylesheets: Users'
Guide
</p>
</div>
</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="d2e18">
<!-- 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="d2e24">
<!-- named anchor --></a><h2 class="main-title">Introduction</h2>
<p id="d2e27">The NISO JATS 1.0 Preview Stylesheets package includes stylesheets that produce formatted
previews of documents encoded in XML using the NISO JATS (Journal Article Tag Suite)
vocabulary. Previews in both HTML and PDF format (via XSL-FO) are supported. Most
generic
Journal Publishing structures are supported, subject to the assumptions and limitations
described in this document.
</p>
<p id="d2e29">The primary purpose of the stylesheets is to support version 1.0 of the Publishing
("blue")
tag set of NISO JATS, but they will also work on data valid to the related tag sets
JATS 1.0
Authoring ("orange") and NLM Journal Publishing ("blue") or Authoring ("orange") versions
2.3 and 3.0.
</p>
<p id="d2e31">The documentation included in this package, namely this <i>Users' Guide</i>, the
<i>Quick Start Guide</i>, and the <i>Technical Documentation</i>, can
serve as examples of the tagging style supported; they are all encoded in NISO JATS
Publishing XML, with HTML and PDF presentation versions generated using the preview
stylesheets.
</p>
<p id="d2e42">Assuming the user already has valid JATS (Publishing) 1.0 data, the most important
consideration regarding application of these stylesheets regards the format of bibliographic
citation information in the input and the bibliographic format desired for those citations
in the output. Citations tagged using <tt>mixed-citation</tt> and provided
with appropriate punctuation in the input (called here "formatted citations") are
handled
correctly by the stylesheets in this package. Citations tagged without punctuation,
using
<tt>element-citation</tt> ("unformatted citations") can also be handled:
this distribution includes stylesheets which format such citations in the user's choice
of
two formats: NLM/Pubmed, and APA.
</p>
<p id="d2e50">In addition, this package also demonstrates how pre- and post-processing steps connected
together in pipelines may achieve other processing goals, both preview and production.
These
include processing OASIS (CALS) tables and handling tagging intended to optimize outputs
for
different media (such as web and print).
</p>
<p id="d2e52">For a more precise description of the technical dependencies of these stylesheets,
along
with documentation of alternative ways to deploy and apply them and of how to extend
and
modify them, users should consult the <i>Technical Documentation</i>. That
document also includes a fuller specification of the formatted and unformatted citation
formats supported by this package.
</p>
<div class="section"><a id="d2e57">
<!-- named anchor --></a><h3 class="section-title">Copyright and disclaimer information for JATS preview software</h3>
<p id="d2e60">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="d2e62">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="d2e65">We request only that the NLM is cited as the source of the work.</p>
<p id="d2e67">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="d2e69">
<!-- named anchor --></a><h2 class="main-title">Getting started</h2>
<p id="d2e72">To select which stylesheet to use, you will first need to determine the following:
<div class="list"><a id="d2e74">
<!-- named anchor --></a><ol style="list-style-type: decimal">
<li>
<p id="d2e76">If you have unformatted citations in your input, do you want the output to be in
NLM/Pubmed format or APA format? (These are the only formats these stylesheets can
produce from unformatted citations in the input.)
</p>
<p id="d2e78">If all the citations in the input are formatted, you can use either the NLM/Pubmed
or
the APA stylesheets and pipelines mentioned below.
</p>
<p id="d2e80">If you have no citations or if your citations contain only simple inline tagging with
punctuation,<a href="#d2e82"><span class="generated">[1]</span></a> you can forego citation formatting altogether.
</p>
</li>
<li>
<p id="d2e90">Do you want HTML (with CSS), or PDF?</p>
</li>
<li>
<p id="d2e93">Which of the following methods do you prefer to use for processing the input?
<div class="list"><a id="d2e95">
<!-- named anchor --></a><ul>
<li>
<p id="d2e97">An XProc (XML Pipelining) processor such as XML Calabash?</p>
<p id="d2e99">If using XProc, you will select a pipeline specification from the
<tt>shells/xproc</tt> subdirectory.
</p>
</li>
<li>
<p id="d2e105">A copy of Saxon that supports the necessary extension functions?<a href="#saxon-versions"><span class="generated">[2]</span></a></p>
<p id="d2e110">If using Saxon, you will select a shell stylesheet from the
<tt>shells/saxon</tt> subdirectory.
</p>
</li>
<li>
<p id="d2e116">A different XSLT processor?</p>
<p id="d2e118">Only the Saxon pipelines require Saxon; the stylesheets themselves will work in
any conformant XSLT processor. Many of the stylesheets are in XSLT 1.0 and will
work in a 1.0 processor (or 2.0) processor; some require XSLT 2.0.<a href="#d2e120"><span class="generated">[3]</span></a> You can run pipelines either "by hand" (run several stylesheets each on
the results of the previous one) or using a custom-built pipelining method
(shell or batch script, Java Ant, <tt>make</tt>, etc.). If you
don't need to run a pipeline, you can also run XSLT 1.0 stylesheets (such as the
HTML Preview stylesheet) in a web browser that supports XSLT 1.0.
</p>
</li>
</ul>
</div>
</p>
</li>
<li>
<p id="d2e131">To make HTML:</p>
<div class="list"><a id="d2e133">
<!-- named anchor --></a><ul>
<li>
<p id="d2e135">If NLM/Pubmed style should be used to render unformatted citations in the input,
you will use <tt>shells/xproc/jats-PMCcit-html.xpl</tt> or
<tt>shells/saxon/jats-PMCcit-html.xsl</tt>.
</p>
<p id="d2e143">If you are running without Saxon or XProc, you will first apply
<tt>xslt/citations-prep/jats-PMCcit.xsl</tt> to your input, and
then apply <tt>xslt/main/jats-html.xsl</tt> to the output of the
first transformation.
</p>
</li>
<li>
<p id="d2e152">If APA style should be used for unformatted citations in the input, you will use
<tt>shells/xproc/jats-APAcit-html.xpl</tt> or
<tt>shells/saxon/jats-APAcit-html.xsl</tt>. Since the APA citation
style transformation requires XSLT 2.0, you will need an XSLT 2.0 processor to run
it without Saxon or XProc.
</p>
</li>
<li>
<p id="d2e161">If all citations in the input are formatted, you can use either the NLM/Pubmed or
the APA pipeline; if they use only simple inline tagging, you can use
<tt>xslt/main/jats-html.xsl</tt> without pipelining.<a href="#simple-citation"><span class="generated">[4]</span></a></p>
</li>
</ul>
</div>
</li>
<li>
<p id="d2e173">To make PDF:</p>
<div class="list"><a id="d2e175">
<!-- named anchor --></a><ul>
<li>
<p id="d2e177">To generate NLM/Pubmed style citations from unformatted citations in the input,
XProc users will use
<tt>shells/xproc/jats-PMCcit-xslfo.xpl</tt>.
</p>
<p id="d2e182">Saxon users will use
<tt>shells/saxon/jats-PMCcit-xslfo.xsl</tt>.
</p>
<p id="d2e187">XSLT 1.0 users will use
<tt>xslt/citations-prep/jats-PMCcit.xsl</tt> followed by
<tt>xslt/main/jats-xslfo.xsl</tt>.
</p>
</li>
<li>
<p id="d2e196">To generate APA-style citations from unformatted citations in the input, XProc
users will use <tt>shells/xproc/jats-APAcit-xslfo.xpl</tt>.
</p>
<p id="d2e201">Saxon users will use
<tt>shells/saxon/jats-APAcit-xslfo.xsl</tt>.
</p>
<p id="d2e206">XSLT 2.0 users will use
<tt>xslt/citations-prep/jats-APAcit.xsl</tt> followed by
<tt>xslt/main/jats-xslfo.xsl</tt>.
</p>
<p id="d2e214">XSLT 1.0 users cannot produce APA-style citations automatically, since the first
of these stylesheets relies on XSLT 2.0.
</p>
</li>
<li>
<p id="d2e217">If all citations in the input are formatted, either of the the NLM or the APA
pipelines can be used, or <tt>xslt/main/jats-xslfo.xsl</tt> alone
can be used if they are formatted with simple inline tagging.<a href="#simple-citation"><span class="generated">[4]</span></a></p>
</li>
</ul>
</div>
</li>
</ol>
</div>Then:
<div class="list"><a id="d2e224">
<!-- named anchor --></a><ol style="list-style-type: decimal">
<li>
<p id="d2e226">Apply the stylesheet(s) or pipeline to a valid Journal Publishing 3.0 document, or
a
subdirectory of such documents, using the tool of your choice.
</p>
<p id="d2e228">When you run your pipeline, messages may be echoed to your console reporting on
progress. Do not be concerned by warning messages stating that you are running an
XSLT
1.0 stylesheet with a 2.0 processor. These stylesheets will run in XSLT "backward
compatibility mode", and have been designed to work properly with either 1.0 or 2.0
processors.
</p>
</li>
<li>
<p id="d2e231">When the result format is HTML, copy <tt>jats-preview.css</tt> to the
file system next to the result file(s).
</p>
</li>
<li>
<p id="d2e237">When the result format is XSL-FO, run the result file in an XSL-FO formatter,
according to its instructions.
</p>
<p id="d2e239">Many XSL-FO formatters allow running an XSLT transformation directly to apply a
stylesheet to a document. If you wish to do this and you are using one of the shell
stylesheets provided, see to it that your formatter invokes the correct processor
(such as Saxon or an XProc engine) as its XSLT component.
</p>
</li>
</ol>
</div>
</p>
</div>
<div class="section"><a id="d2e241">
<!-- named anchor --></a><h2 class="main-title">Advanced options</h2>
<p id="d2e244">In addition to the straightforward application of formatting to Journal Publishing
content
using either of the supported bibliographic citation styles, this suite of stylesheets
supports a number of advanced options. While these can be used "out of the box", they
are
also included as demonstrations of how processes may be further tailored and customized
to
meet local requirements.
</p>
<p id="d2e246">In order to learn more, see the section on <a href="#special-purpose">Special-purpose
stylesheets</a> below, along with the <i>Technical Documentation</i>.
</p>
</div>
<div class="section"><a id="citations-sec">
<!-- named anchor --></a><h2 class="main-title">Assumptions made by the preview processing</h2>
<p id="d2e257">These stylesheets are designed to handle a broad range of inputs, generally requiring
only
that input data be XML valid to the NLM/NCBI Journal Publishing 3.0 DTD. Inevitably,
however, there are limitations in their handling of of variant patterns of tagging
and of
structures that are valid but unlikely and/or poorly controlled by a schema.
</p>
<p id="d2e259">Caution: while these stylesheets do their best to handle "normal" input, <i>they
should not be taken as an indicator of a norm</i>. "Variant" here does not
necessarily mean "incorrect", and where local practice has evolved to meet particular
local
processing requirements, these stylesheets may <i>and should</i> be altered or
extended to accommodate local practice and requirements.
</p>
<p id="d2e267">The remainder of this section outlines the main limitations of the stylesheets and
the
major assumptions they make about their input, grouping the entries into sections
on <a href="#limits">known limitations</a>; <a href="#autonumbering">autonumbering, labels,
and cross-references</a>; and <a href="#citations">citations</a>.
</p>
<div class="section"><a id="limits">
<!-- named anchor --></a><h3 class="section-title">Known limitations of these stylesheets</h3>
<p id="d2e281">Users should keep in mind that any and all of these behaviors and limitations (as
well as
those not described) can be addressed directly in customizations of these stylesheets;
they are not inherent in XSLT (although sometimes the target format, HTML or XSL-FO,
presents challenges), but only a result of the design requirement that the Preview
stylesheets address the broadest possible set of "reasonable" approaches to tagging
NISO
JATS, without privileging any in particular.
</p>
<div class="section"><a id="d2e283">
<!-- named anchor --></a><h4 class="subsection-title">Running page headers</h4>
<p id="d2e286">The PDF preview stylesheet generates running headers using the main article title
(<tt>article-title</tt> inside
<tt>article-meta/title-group</tt>). If the main article title is too
long, an alternative title can be provided for the page header; if available, an
<tt>alt-title</tt> with <tt>alt-title-type</tt> of
'running-head' will be used.
</p>
</div>
<div class="section"><a id="d2e300">
<!-- named anchor --></a><h4 class="subsection-title">Super- and subscripting limitations</h4>
<p id="d2e303">On <tt>sub</tt> and <tt>sup</tt> elements the
<tt>arrange</tt> attribute is not supported in either preview. All
instances will be treated as <tt>arrange='stagger'</tt>.
</p>
</div>
<div class="section"><a id="d2e317">
<!-- named anchor --></a><h4 class="subsection-title">Addresses</h4>
<p id="d2e320">The document model allows addresses (the <tt>address</tt> element) both
as structured elements and within inline content such as paragraphs.
</p>
<p id="d2e325">Address elements inside <tt>aff</tt> (affiliation) are always formatted
in line.
</p>
<p id="d2e330">If the address contains no <tt>address-line</tt> elements
<i>and</i> it appears in paragraph content (that is, directly within
<tt>p</tt>, <tt>license-p</tt>,
<tt>collab</tt>, <tt>named-content</tt> and
<tt>styled-content</tt> elements), then it is formatted in line.
</p>
<p id="d2e354">Otherwise, the address is formatted as blocks broken into separate lines, one for
each
element in the address.
</p>
</div>
<div class="section"><a id="d2e356">
<!-- named anchor --></a><h4 class="subsection-title">Sub-articles</h4>
<p id="d2e359">The HTML preview stylesheet includes code for handling sub-articles, including the
elements <tt>sub-article</tt> and <tt>response</tt>. Because
the Journal Publishing tag set allows a wide range of ways to deploy and manage such
content, particularly with respect to metadata and ancillary materials such as
references and footnotes, these features have not been fully tested. If you have
<tt>sub-article</tt> or <tt>response</tt> content,
extending one or both stylesheets in view of your particular tagging patterns and
requirements will probably be necessary.
</p>
</div>
<div class="section"><a id="d2e373">
<!-- named anchor --></a><h4 class="subsection-title">Section metadata</h4>
<p id="d2e376">The same thing is true of section-level metadata (<tt>sec-meta</tt>),
particularly with respect to the <tt>contrib-group</tt> element inside
<tt>sec-meta</tt>.
</p>
<p id="d2e387">Also, within <tt>sec-meta</tt> in the PDF preview, only simple keywords
(<tt>kwd</tt>) within <tt>kwd-group</tt> will be rendered;
<tt>compound-kwd</tt> is ignored by these stylesheets.
</p>
<p id="d2e401">Test the stylesheets against your content and be prepared to amend the stylesheets,
if
necessary.
</p>
</div>
<div class="section"><a id="d2e403">
<!-- named anchor --></a><h4 class="subsection-title">Special characters</h4>
<p id="d2e406">These stylesheets do not support the <tt>private-char</tt>,
<tt>glyph-data</tt>, or <tt>glyph-ref</tt> elements.
</p>
</div>
<div class="section"><a id="d2e417">
<!-- named anchor --></a><h4 class="subsection-title">Graphics</h4>
<p id="d2e420">Graphics are not resized in the HTML preview, but displayed at native resolution;
this
may result in disproportionately large images when the images have been made large
to
give them higher resolution. In the PDF preview, images will be scaled down (as
necessary) to fit in available space.
</p>
<p id="d2e422">In the HTML preview, graphics are expected to be located as given in the source data
relative to the HTML <i>result</i> file. So, if source data has a graphic with
<tt>xlink:href='snapshots/babypic.jpg'</tt>, the result file will link
to 'snapshots/babypic.jpg'. If graphic files are maintained relative to the source
data,
they should either be copied to the same location relative to the result, or else
an
absolute path to the graphic should be given as the value, or (most simply) the HTML
result file should be placed next to the XML source file, in order to ensure that
graphics will be visible in the browser.
</p>
<p id="d2e430">In the PDF preview, a runtime parameter, <tt>base-dir</tt>, must be given
to identify the directory relative to which graphics are located. If the XSL process
is
initiated using one of the provided XSLT 2.0 shell stylesheets, this parameter will
be
provided automatically as the base directory of the source file, so graphics should
be
located relative to the source data. If no parameter is given, then either graphics
must
be designated with absolute path names, or else they must be located relative to the
<i>stylesheet</i>.
</p>
<p id="d2e438">Alternative text provided as <tt>alt-text</tt> on graphics is not
rendered in the PDF preview.
</p>
</div>
<div class="section"><a id="d2e443">
<!-- named anchor --></a><h4 class="subsection-title">Styled content and the HTML <tt>style</tt> attribute
</h4>
<p id="d2e449">The Journal Publishing document model makes provision for styling content directly
by
using CSS styles, either associated with table elements (HTML table elements in this
model) or as the value given the <tt>style</tt> attribute of the
<tt>styled-content</tt> inline element.
</p>
<p id="d2e457">When this appears, the HTML preview stylesheet will simply pass the values through.
Results will depend on the level of CSS conformance in the browser and in the CSS
values
passed through to the output.
</p>
<p id="d2e459">In the PDF preview, <tt>width</tt> and
<tt>vertical-align</tt> values associated with tables are mapped to
formatting in the result. On any element with the <tt>style</tt>
attribute, values of the following properties are mapped: <tt>color</tt>;
<tt>background-color</tt>; <tt>font-size</tt>;
<tt>font-weight</tt>; <tt>font-style</tt>;
<tt>font-family</tt>; <tt>text-decoration</tt>. Note that
incorrect CSS values may result in errors when XSL-FO stylesheet results are
formatted.
</p>
<p id="d2e492">Note in particular that CSS properties related to borders are not supported in the
PDF
preview. For table cell borders, some bordering behavior can be specified using
attributes on the <tt>table</tt> element.
</p>
</div>
<div class="section"><a id="d2e497">
<!-- named anchor --></a><h4 class="subsection-title">Floating objects and the <tt>position</tt> attribute
</h4>
<p id="d2e504">In the parlance of document markup, "floating" can refer to two distinct things. If
a
rendering application is trusted, at runtime, to determine (and presumably optimize)
the
precise position on the page of an object, this object is said to "float". A figure,
for
example, may be allowed to float, while a graphic appearing in a paragraph is not
(it is
anchored to its place in the flow of text); similarly a boxed text may be allowed
to
float, or it may be anchored, depending on whether its exact placement on the page
is
important to its meaning. But the term is also used to refer to objects (such as figures
and tables) that are encoded in the source data -- but not necessarily rendered --
apart
from the flow of the text, typically by gathering them into a group at the end of
the
document. Such "floating" objects may be displayed there, or moved by the application
to
fixed (anchored) positions, or allowed to "float" in the first sense.
</p>
<p id="d2e506">The first feature in JATS tagging is controlled through the use of
<tt>position</tt> attributes on objects that may be placed in this way
by the formatter. These elements include <tt>boxed-text</tt>,
<tt>chem-struct-wrap</tt>, <tt>fig</tt>,
<tt>fig-group</tt>, <tt>graphic</tt>,
<tt>media</tt>, <tt>preformat</tt>,
<tt>supplementary-material</tt>, <tt>table-wrap</tt>,
<tt>table-wrap-group</tt>. The second feature is supported by means of
the <tt>floats-group</tt> element, where such objects may be gathered.
</p>
<p id="d2e546">Note that <tt>position='float'</tt> may be assigned to any of these
objects irrespective of whether it is gathered into <tt>floats-group</tt>.
Similarly, it is possible (although not ordinary) for an object to be placed inside
<tt>floats-group</tt>, and not in the body of the document, without
assigning it <tt>position='float'</tt>.
</p>
<p id="d2e560">Note also that by default, on all these objects, <tt>position</tt> is
assigned a value of 'float' by the Journal Publishing DTD. If the attribute is not
set
in the data, the formatting stylesheets assume the value 'float', both out of respect
for the semantics specified by the formal document model, and in order to prevent
different formatting when the DTD is used from when it is not.
</p>
<p id="d2e565">Any object assigned <tt>position='float'</tt> will be allowed to float on
the page. Exceptions to this rule include the following:
<div class="list"><a id="d2e570">
<!-- named anchor --></a><ul>
<li>
<p id="d2e572">No object, even one set to float, will float if it appears inside another object
set to float. Note again that objects are set to float implicitly, unless position
is set to 'anchor' or 'margin'.
</p>
</li>
<li>
<p id="d2e575"><tt>graphic</tt> and <tt>media</tt> will not float
when they appear inside any of the other elements that could float, even if they
don't in fact float. (For example: a <tt>graphic</tt> inside a
<tt>fig</tt> will not float, even if its
<tt>position</tt> is set to float and even if the
<tt>fig</tt> does not float.)
</p>
</li>
<li>
<p id="d2e595"><tt>fig</tt> will not float inside <tt>fig-group</tt>
(though the <tt>fig-group</tt> may float).
</p>
</li>
<li>
<p id="d2e606"><tt>table-wrap</tt> will not float inside
<tt>table-wrap-group</tt> (though the group as a whole may
float).
</p>
</li>
<li>
<p id="d2e614"><tt>preformat</tt> will not float inside
<tt>bio</tt>, <tt>boxed-text</tt>,
<tt>chem-struct</tt>, <tt>chem-struct-wrap</tt>,
<tt>disp-formula</tt>, <tt>disp-quote</tt>,
<tt>fig</tt>, <tt>glossary</tt>,
<tt>supplementary-material</tt>,
<tt>disp-formula</tt>, or <tt>table-wrap</tt>. Note,
however, that like other floatable objects, <tt>preformat</tt> will
ordinarily float unless its position says not to!
</p>
</li>
</ul>
</div>
</p>
<p id="d2e656">Also, the value 'margin' is not supported; objects with
<tt>position='margin'</tt> will act as if they have
<tt>position='anchor'</tt>.
</p>
<p id="d2e664">In the HTML preview, floating an object will not move it on the page; it will only
allow text to flow around it.
</p>
<p id="d2e666">In the PDF preview, objects with <tt>position='float'</tt> will be
positioned on the page by the formatting engine, typically at the top of the same
page
where the object would appear if its <tt>position</tt> were 'anchor'. The
exact placement will depend on the formatting engine.
</p>
<p id="d2e674">Note that when a float group is large (e.g. a table with footnotes provided both in
table form and as a graphic), it may not all fit on a single page.
</p>
<p id="d2e677">Where floating is not wanted, the easiest solution is to set
<tt>position</tt> to 'anchor' on the element.
</p>
</div>
<div class="section"><a id="d2e683">
<!-- named anchor --></a><h4 class="subsection-title">Gathering objects in <tt>floats-group</tt></h4>
<p id="d2e688">Just like objects elsewhere, the placement of objects tagged inside
<tt>floats-group</tt> is determined by their
<tt>position</tt> attribute. The difference is that when assigned
<tt>position='float'</tt> (and remember this is the value by default),
in the PDF preview the object is formatted near its first cross-reference. Otherwise,
and when no such cross-reference appears in the document, it is formatted at the end
of
the document.
</p>
<p id="d2e699">The HTML preview stylesheet displays all objects inside
<tt>floats-group</tt> at the end of the document. (In this case,
however, cross-references are also hyperlinked.)
</p>
<p id="d2e704">When articles should be formatted with a "Figures" or "Tables" section at the end,
an
<tt>app</tt> or <tt>sec</tt> should be used for this
purpose, and the objects anchored in place. The preview stylesheets assume that
<tt>floats-group</tt> is specifically for collecting objects that are
intended to be formatted elsewhere.
</p>
</div>
<div class="section"><a id="d2e715">
<!-- named anchor --></a><h4 class="subsection-title">Correct numbering of floating objects</h4>
<p id="d2e718">As described below, the preview stylesheets do not provide automated numbering for
floating objects (distinguished, as a class, from footnotes, which may also "float").
In
systems where the stylesheet is extended to provide autonumbering, rules will need
to be
formulated and followed to govern where floating objects are encoded, whether and
where
they are cross-referenced, and the relation between settings of
<tt>position</tt> and appearance (and order) inside
<tt>floats-group</tt>, with appropriate enforcement of these
constraints. Otherwise it can be expected that their numbers will not always be properly
sequenced.
</p>
</div>
<div class="section"><a id="d2e726">
<!-- named anchor --></a><h4 class="subsection-title">Setting <tt>orientation</tt></h4>
<p id="d2e731">A number of objects also have an <tt>orientation</tt> attribute, which is
intended to allow specifying that they should be rotated in display, by setting its
value to 'landscape'.
</p>
<p id="d2e736">The HTML preview stylesheet does not support orientation. The PDF stylesheet does
rotate the object; however, it assigns (somewhat arbitrarily) a width (i.e., a
<i>vertical</i> spacing for an object formatted in landscape) of 6 inches
for tables and 4 inches for other objects. While this will almost never be optimal,
it
is the best that can be accomplished without particular formatting specifications
for
each object, and it is enough to show that the orientation is set. Users may wish
to
adjust the stylesheet to meet local needs for positioning and sizing tables and
figures.
</p>
</div>
<div class="section"><a id="d2e741">
<!-- named anchor --></a><h4 class="subsection-title">Sizing tables</h4>
<p id="d2e744">In HTML, tables are sized dynamically or according to attributes given on the table
element.
</p>
<p id="d2e746">In the PDF preview, by default, tables are formatted at column width. If the
<tt>width</tt> attribute on a table is set to "100%" and
<tt>orientation</tt> is "portrait" (the default), the entire
<tt>table-group</tt> it appears in will be formatted at page width.
</p>
</div>
<div class="section"><a id="d2e757">
<!-- named anchor --></a><h4 class="subsection-title">Footnotes</h4>
<p id="d2e760">The Journal Publishing model supports either of two general approaches to encoding
footnotes in valid data. The <tt>fn</tt> element may be used in line where
a reference to a footnote (generally the first or only reference) should appear, with
the footnote content moved in rendering (typically to the bottom of the page). Or
footnotes may be encoded together in a structured grouping, the
<tt>fn-group</tt> element, and footnote references in the text are
encoded with <tt>xref</tt> elements, like any other cross-reference. The
latter style of encoding is said in the Journal Publishing documentation to be
appropriate for "end notes" as opposed to footnotes as such.
<tt>fn-group</tt> is permitted in a number of places, including within
the article back matter and in several other locations where footnotes are commonly
grouped in journal articles.
</p>
<p id="d2e774">These stylesheets will support either approach to encoding footnotes. In the HTML
preview output, all footnotes encoded inline are grouped together in a section called
"Notes" appearing at the end of the document. In the PDF, footnotes encoded inline
are
formatted at the foot of the page. In both cases, footnotes grouped in
<tt>fn-group</tt> or in <tt>author-notes</tt> appear
collected together where the <tt>fn-group</tt> or
<tt>author-notes</tt> appears. This will usually be inside the back
matter, but it can also occur in other places such as in the front matter,
<tt>boxed-text</tt> or <tt>table-wrap-foot</tt>.
</p>
<p id="d2e795">Note that the two approaches (loose <tt>fn</tt> elements and
<tt>fn</tt> within <tt>fn-group</tt>) may be combined, but
this is inadvisable unless footnotes are numbered in the data, since it may result
in
two distinct sets of footnote numbering. It is best to encode footnotes all one way
or
all the other. Generally, if you use <tt>fn</tt> elements within mixed
content, do not also use <tt>fn-group</tt>. If you use
<tt>fn-group</tt>, use it for all footnotes and use
<tt>xref</tt> to provide references to them.
</p>
<p id="d2e819">Additionally, in the PDF preview, errors will result if inline footnotes appear inside
floating objects (such as boxed text or figures). This is because the XSL-FO formatter
cannot position both a footnote and a floating object together (since when a footnote
is
moved to appear on the same page as a float, the page layout determining where the
float
can be placed may also be thrown off). This restriction means, in effect, that if
you
have footnotes in your floating objects, you must locate the footnotes inside an
<tt>fn-group</tt>, and reference them with <tt>xref</tt>,
rather than using <tt>fn</tt> elements inline.
</p>
<p id="d2e830">For discussion of footnote numbering, see <a href="#autonumbering">below</a>.
</p>
</div>
</div>
<div class="section"><a id="autonumbering">
<!-- named anchor --></a><h3 class="section-title">Autonumbering, labels, and cross-references</h3>
<p id="d2e838">Except for two element types, <tt>ref</tt> (reference) and
<tt>fn</tt> (footnote), these preview stylesheets do not generate numbered
labels automatically.<a href="#d2e846"><span class="generated">[5]</span></a> If figures, tables and similar structures such as statements, supplementary
material, etc. are to be labelled, they must be labelled in the data. Labels provided
in
the data (<tt>label</tt> elements) are displayed with the elements they
label; the same label content also appears in cross-references that point to those
elements when a cross-reference element (<tt>xref</tt> element) is given as
empty. (When an <tt>xref</tt> element has text content, it is used as the
text of the cross-reference, irrespective of whether a label appears with its target.)
</p>
<p id="d2e863">This approach is meant to be as transparent and easy to understand as possible: rather
than assume any autolabeling method and format, it assumes that when labels are wanted
on
content, they will be provided explicitly in the source data, and that when a
cross-reference is made to an object, it will either have content of its own (which
can
serve as anchoring text), or its target will have an explicit label that can be used
unaltered as the text in the cross-reference.
</p>
<p id="d2e865">There are two exceptions to this principle: numbering is provided for footnotes
(<tt>fn</tt> elements) and for references (<tt>ref</tt>
elements) when they do not have explicit labels, as these elements' primary purpose
is
their systematic cross-referencing, and in most instances they will not function without
labels. In both cases, explicit labels (<tt>label</tt> elements or, in the
case of footnotes, <tt>symbol</tt> attributes) will override autogenerated
labels, allowing for projects to control these values in their data when necessary.
</p>
<p id="d2e879">In all cases, to ensure legible and transparent output, warning messages may be generated
for unlabelled elements where labels are needed (due to an empty cross-reference pointing
to the element). This is described further below.
</p>
<p id="d2e881">When generated for footnotes and references, automated numbers are assigned based
on the
order of their appearance in the document, not of first references to them. (Nor are
<tt>ref</tt> elements sorted to reflect their order of first reference.)
Accordingly, in the PDF output, since footnotes are placed based on the location of
the
<tt>fn</tt> element in the document, a cross-reference can be made to a
footnote that will appear on a different page. This also means that if footnote A
appears
before footnote B in the document, a reference to footnote B will appear out of sequence
if it appears before footnote A does. The easiest ways to avoid both these problems
are
(a) to use footnotes as endnotes (group them in <tt>fn-group</tt> in the
back matter) and confirm that they are placed in order of first reference; or (b)
use
inline footnotes consistently (resulting in actual footnotes in the PDF) and make
sure
that in every case, an <tt>fn</tt> element appears <i>before</i>
any other (second or subsequent) reference to the same footnote.
</p>
<p id="d2e898">These stylesheets do not accommodate a practice of redundant tagging, whereby a footnote
encoded inline is also provided with an <tt>xref</tt> (cross-reference)
element to that footnote. If an <tt>fn</tt> element is used in line, a
reference will appear for it. Cross-references to footnotes should be used only for
end
notes (<tt>fn</tt> elements in <tt>fn-group</tt>) or in cases
where more than one reference is made to a single footnote.
</p>
<div class="section"><a id="d2e912">
<!-- named anchor --></a><h4 class="subsection-title">Summary of best practice respecting cross-references and labels</h4>
<p id="d2e915">In working with these stylesheets, the simplest approach to using labels and ensuring
that cross-references are clear is to follow an "all or nothing" rule:
<div class="list"><a id="d2e917">
<!-- named anchor --></a><ul>
<li>
<p id="d2e919">As described above, <i>either</i> all footnotes
(<tt>fn</tt> elements) should be enclosed in
<tt>fn-group</tt> elements (effectively, to present as endnotes),
in order of first reference, <i>or else</i> all footnotes should be
placed inline at their point of first reference.
</p>
<p id="d2e933">Avoid using (empty) <tt>xref</tt> elements to refer to footnotes
that have not yet appeared, unless the footnote is inside
<tt>fn-group</tt>, as this will result in numbering out of
sequence.
</p>
<p id="d2e941">Of course, such forward references are not a problem and need not be avoided if
footnotes are labelled in the source data, or if <tt>xref</tt>
elements have data content; in that case, of course, it is an editorial task to
maintain correct referencing and numbering.
</p>
</li>
<li>
<p id="d2e947"><i>Either</i> label all footnotes explicitly in the source data (using
<tt>label</tt> elements or <tt>symbol</tt>
attributes), <i>or else</i> let the system number all of them.
</p>
</li>
<li>
<p id="d2e961">Similarly, <i>either</i> no reference elements
(<tt>ref</tt>), whether they are cross-referenced or not, should
be given <tt>label</tt> elements, <i>or else</i> all of
them should.
</p>
</li>
<li>
<p id="d2e976"><i>Either</i> every object type (such as figures or tables) that is
cross-referenced should be given <tt>label</tt> elements
consistently and throughout, <i>or else</i> cross-references
(<tt>xref</tt> elements) should never be empty.
</p>
</li>
</ul>
</div>
</p>
<p id="d2e989">As described in the <i>Technical Documentation</i>, the stylesheet logic
regarding generating labels and/or automatic numbering can be modified in the
stylesheets.
</p>
</div>
<div class="section"><a id="d2e994">
<!-- named anchor --></a><h4 class="subsection-title">Warning messages for missing labels</h4>
<p id="d2e997">The logic outlined above is fairly simple (apart from the complications of footnotes
and references), but an error condition may still arise (even in a valid document)
if an
object has no <tt>label</tt> element, and a cross-reference
(<tt>xref</tt>) pointing to it has no content of its own. When this
happens, a warning message will be generated in place of a label, both with the object
and wherever it is cross-referenced. A summary view of all such warning messages is
also
provided in a special section entitled <b>Process Warnings</b> at the end of the
document.
</p>
<p id="d2e1008">This error can be corrected (1) by providing the targeted object with a
<tt>label</tt> element (or alternatively, for a footnote, a
<tt>symbol</tt> attribute), (2) by providing its cross-reference(s) with
content, or (3) by doing both.
</p>
<p id="d2e1016">When there are no such errors, the <b>Process Warnings</b> section does not
appear.
</p>
</div>
<div class="section"><a id="d2e1021">
<!-- named anchor --></a><h4 class="subsection-title">Other limitations on <tt>xref</tt> elements
</h4>
<p id="d2e1027">The current implementation of the preview stylesheets does not support cross-references
to more than one target using a single <tt>xref</tt> element. Although
according to the DTD, an <tt>IDREFS</tt> value is allowed on
<tt>xref/@rid</tt>, only a single <tt>IDREF</tt> will
work.
</p>
<p id="d2e1041">In other
words,<pre class="preformat"><xref rid="fig1">See Figure 1</xref></pre>will
generate a cross-reference in the output,
but<pre class="preformat"><xref rid="fig1 fig2">See Figures 1 and 2</xref></pre>will
not work correctly (it will attempt to link to an object identified as "fig1 fig2").</p>
</div>
</div>
<div class="section"><a id="citations">
<!-- named anchor --></a><h3 class="section-title">Citations</h3>
<p id="d2e1052">Journal Publishing XML may tag bibliographic citations in any of several ways. One
of
those ways uses the <tt>element-citation</tt> element, which assumes that
rendering of citations, including punctuation, is provided by a stylesheet. Stylesheets
in
this package are capable of rendering <tt>element-citation</tt> into two
different bibliographic formats.<a href="#d2e1060"><span class="generated">[6]</span></a></p>
<div class="list"><a id="d2e1066">
<!-- named anchor --></a><ul>
<li>
<p id="d2e1068"><b>NLM/Pubmed format</b>. The stylesheet provided here is a modified version of
a transformation used internally at NCBI.
</p>
</li>
<li>
<p id="d2e1073"><b>APA-like format</b>. A stylesheet for generating common citation styles
conforming to APA guidelines is also provided. We call this format "APA-like" in order
to stress that results may not correspond precisely either to local rules regarding
details of APA format or in some cases to APA's own guidelines.
</p>
</li>
</ul>
</div>
<p id="d2e1077">If your citations follow neither practice, or when your citations do not format properly
due to special cases, you have two alternatives:
</p>
<div class="list"><a id="d2e1079">
<!-- named anchor --></a><ul>
<li>
<p id="d2e1081">Instead of <tt>element-citation</tt> in bibliographies or reference
lists, use <tt>mixed-citation</tt> with explicit formatting. This
element allows citations to be formatted and punctuated directly in the XML data.
Neither preprocessing stylesheet will override any punctuation within
<tt>mixed-citation</tt> elements.
</p>
<p id="d2e1092">Even if all citations are given as punctuated <tt>mixed-citation</tt>
elements, however, it is still necessary to run one or another citations preprocessor.
This is because they may still contain elements with formatting consequences, which
the preview stylesheets have no rules to handle. The only citations that are safe
to
run through the preview stylesheets without any preprocessing whatsoever conform to
a
profile of <tt>mixed-citation</tt> that includes only elements whose
formatting consequences are inherent in their semantics,<a href="#d2e1100"><span class="generated">[7]</span></a> and will not vary from one citation formatting style to another. See the
<i>Technical Documentation</i> on the "Simple citation" element profile
for more details.
</p>
</li>
<li>
<p id="d2e1114">Extend or modify one of the provided citation processors, or develop your own
citation preprocessor implementing your own rules for formatting citations.
</p>
</li>
</ul>
</div>
<p id="d2e1116">If you have no citations, you can run the stylesheets for either format.</p>
</div>
</div>
<div class="section"><a id="special-purpose">
<!-- named anchor --></a><h2 class="main-title">Special-purpose transformations</h2>
<p id="d2e1121">There are four types of resources included in this package:
<div class="list"><a id="d2e1123">
<!-- named anchor --></a><ul>
<li>
<p id="d2e1125">The main preview stylesheets (found in the <tt>main</tt>
subdirectory);
</p>
</li>
<li>
<p id="d2e1131">Various ancillary stylesheets for pre- or post-processing data in support of special
operations (in the <tt>prep</tt>, <tt>citations-prep</tt>,
<tt>oasis-tables</tt> and <tt>post</tt>
subdirectories);
</p>
</li>
<li>
<p id="d2e1146">XProc pipelines that implement more comprehensive transformations by connecting two
or more of these stylesheets in sequence. These can efficiently execute a sequence
of
transformations without writing interim results to the file system.
</p>
</li>
<li>
<p id="d2e1149">"Shell" or "wrapper" stylesheets used to the same effect, by relying on extended
functionality in the Saxon processor (for those who have a recent version of
Saxon<a href="#saxon-versions"><span class="generated">[2]</span></a> and do not wish to use XProc).
</p>
</li>
</ul>
</div>Users wanting a simple approach can acquire an XProc processor, or a recent version
of Saxon, identify the pipeline or shell stylesheet that performs the necessary tasks,
and
apply it to their data.
</p>
<p id="d2e1154">All of the stylesheets can also be run on their own, and several of them work also
in XSLT
1.0 engines. Due to limitations of the main preview stylesheets, especially limitations
in
their handling of citations (which cannot be handled generically), this is recommended
only
when citation formatting is otherwise accounted for.
</p>
<p id="d2e1156">Publishers and content creators are free to experiment. The structure of this distribution
is intended to provide for extensions, in the form either of new processing steps
(such as a
preprocessor for a new citation format) or modifications to existing steps. Or projects
may
wish to "unbundle" the processes and apply the stylesheets by different means altogether.
The <i>Technical Documentation</i> describes these alternatives in more
detail.
</p>
<p id="d2e1161">Top-level pipelines included in this package are as follows (each available in two
forms,
XProc and extended XSLT 2.0):
<div class="def-list"><a id="d2e1163">
<!-- named anchor --></a><div class="def-list table">
<div class="def-item row" id="d2e1164">
<div class="def-term cell" id="d2e1165">
<p>
<tt>jats-PMCcit-html</tt>
</p>
</div>
<div class="def-def cell" id="d2e1170">
<p class="first" id="d2e1171">Generates HTML results with formatting of NLM/Pubmed citations supported.</p>
</div>
</div>
<div class="def-item row" id="d2e1173">
<div class="def-term cell" id="d2e1174">
<p>
<tt>jats-APAcit-html</tt>
</p>
</div>
<div class="def-def cell" id="d2e1179">
<p class="first" id="d2e1180">Generates HTML results with formatting of APA citations supported.</p>
</div>
</div>
<div class="def-item row" id="d2e1182">
<div class="def-term cell" id="d2e1183">
<p>
<tt>jats-PMCcit-xslfo</tt>
</p>
</div>
<div class="def-def cell" id="d2e1188">
<p class="first" id="d2e1189">Generates XSL-FO results for PDF production, with formatting of NLM/Pubmed