From 307b2a42f57fcefa03728185abafcbe9965ca078 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sun, 4 Dec 2016 13:39:29 -0600 Subject: [PATCH 01/16] Consolidate indentation and normalize other whitespace --- nlm-jats-crossref.xslt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index e190ebe..783af34 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -3,17 +3,17 @@ - + @@ -27,7 +27,7 @@ - http://www.crossref.org/schema/4.3.1 + http://www.crossref.org/schema/4.3.1 http://www.crossref.org/schema/deposit/crossref4.3.1.xsd @@ -485,7 +485,7 @@ - + @@ -518,7 +518,7 @@ - + @@ -551,4 +551,4 @@ - \ No newline at end of file + From 0c661c664ee5b2fc3819a3a35cab7cecc8d6b2e7 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sun, 4 Dec 2016 13:45:23 -0600 Subject: [PATCH 02/16] Remove XSLT 2.0 dependency --- nlm-jats-crossref.xslt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 783af34..9d617c3 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -1,8 +1,9 @@ + - - - +19700101 +000000 From 487b35a57a18d8b9fa37312af0563a400d7f5f0e Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sat, 17 Dec 2016 14:40:34 -0600 Subject: [PATCH 03/16] Reformat with 'xmllint --format' --- nlm-jats-crossref.xslt | 1073 +++++++++++++++++++--------------------- 1 file changed, 518 insertions(+), 555 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 9d617c3..6475812 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -1,555 +1,518 @@ - - - - - - - - - -19700101 -000000 - - - - - - - - - - - http://www.crossref.org/schema/4.3.1 - http://www.crossref.org/schema/deposit/crossref4.3.1.xsd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No article-id has been entered by user - - - - - - - - - - - - - - Publisher's Name not found in the input file - - - - - TBD - - - - - - - - Publisher's name not found in the input file - - - - - - - - - - - - - - - - - - - - - - - - Journal full title is not available in the Input file - - - - - - - - - - - - - - - - ISSN is not available in the Input file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <xsl:apply-templates select="article-title"/> - - - - - - - - - - - - - - - - - - - - DOI entry is not available in the Input/Meta file(s) - - - - - - - - - - - - - No Resource entry has been entered by the user - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - key - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + 19700101 + 000000 + + + + + + + + + + http://www.crossref.org/schema/4.3.1 + http://www.crossref.org/schema/deposit/crossref4.3.1.xsd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No article-id has been entered by user + + + + + + + + + + + + + + Publisher's Name not found in the input file + + + + + TBD + + + + + + + + Publisher's name not found in the input file + + + + + + + + + + + + + + + + + + + + + + + Journal full title is not available in the Input file + + + + + + + + + + + + + + + + ISSN is not available in the Input file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:apply-templates select="article-title"/> + + + + + + + + + + + + + + + + + + + + DOI entry is not available in the Input/Meta file(s) + + + + + + + + + + + + + No Resource entry has been entered by the user + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + key + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 658e37d41d28f94fc130023408d27d51543e243f Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sat, 17 Dec 2016 14:52:23 -0600 Subject: [PATCH 04/16] Pull in contentful changes from NLM.JATS2Crossref.v3.1.xsl - Reformatted with xmllint --format to minimize diff - Operator spacing removed to minimize diff - Preserved XSL 2.0->1.0 downgrade and simplifications Full path to newer XSL: http://www.crossref.org/help/NLM.JATS2Crossref.v3.1.xsl --- nlm-jats-crossref.xslt | 169 ++++++++++++++++++++++++++++++----------- 1 file changed, 123 insertions(+), 46 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 6475812..f3a991e 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -1,8 +1,15 @@ - - - - + + + + + 19700101 000000 @@ -14,9 +21,7 @@ - - http://www.crossref.org/schema/4.3.1 - http://www.crossref.org/schema/deposit/crossref4.3.1.xsd + @@ -79,7 +84,7 @@ - + @@ -88,9 +93,11 @@ Publisher's Name not found in the input file - + - TBD + + + @@ -119,9 +126,15 @@ + + + + + - Journal full title is not available in the Input file + Journal full title is not available in the + Input file @@ -137,7 +150,8 @@ - ISSN is not available in the Input file + ISSN is not available in the Input + file @@ -151,7 +165,7 @@ - + @@ -171,7 +185,7 @@ - + @@ -222,6 +236,23 @@ + + + + + + + + + + + + + + + + + @@ -255,6 +286,9 @@ + + + @@ -265,13 +299,11 @@ - DOI entry is not available in the Input/Meta file(s) + DOI entry is not available in the + Input/Meta file(s) - - - @@ -290,30 +322,56 @@ - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + - + @@ -331,6 +389,13 @@ + + + + + + + @@ -357,10 +422,8 @@ - - - - + + @@ -376,13 +439,17 @@ - - + + + + + + @@ -401,6 +468,14 @@ + + + + + + @@ -414,14 +489,16 @@ key + + - + - + From 7be5dee85508096141423563a5bed671e3265e9e Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sat, 17 Dec 2016 15:19:20 -0600 Subject: [PATCH 05/16] Clean up and parameterize latest JATS->Crossref XSLT - Simplify deprecated (and verbose!) @pub-type handling - Make timestamp and email into xsl:param's - Add xlink namespace to root to avoid superfluous declarations in children --- nlm-jats-crossref.xslt | 116 +++++++++-------------------------------- 1 file changed, 24 insertions(+), 92 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index f3a991e..1ddc7f7 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -11,17 +11,15 @@ - 19700101 - 000000 - - + 19700101000000 + labs-notifications@crossref.org - + @@ -81,7 +79,7 @@ - + @@ -94,9 +92,8 @@ - - + @@ -165,94 +162,29 @@ - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -484,7 +416,7 @@ - + key From 351875ef26bfa9e03fc9b97065986c483d9c6e89 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Sun, 12 Mar 2017 18:52:33 -0500 Subject: [PATCH 06/16] Fix typos, formatting, and outdated links --- README.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e91b1be..dfdf413 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,29 @@ ## What is this? -This repository contains an XSLT file that will translate [NISO NLM or JATS](http://jats.nlm.nih.gov/versions.html) -to [CrossRef Deposit XML](http://help.crossref.org/deposit_schema). +This repository contains an XSLT file that will translate [NISO NLM or JATS](https://jats.nlm.nih.gov/versions.html) +to [CrossRef Deposit XML](https://support.crossref.org/hc/en-us/articles/215577783-Creating-content-registration-XML). + ## How do I use this? -Either use CrossRef's [Web Deposit Form](http://www.crossref.org/webDeposit/) to deposit NISO NLM or JATS manually -or build the XSLT into a CrossRef deposit process using JAXP or your favourite language's XML and XSLT processing library. +Either use CrossRef's [Web Deposit Form](https://www.crossref.org/webDeposit/) to deposit NISO NLM or JATS manually +or build the XSLT into a CrossRef deposit process using JAXP or your favorite language's XML and XSLT processing library. + +A command line XSLT processor can be used for diagnostic and experimental purposes: -A commandline XSLT processor can be used for diagnositc and experimental purposes: +- [Xalan Java](http://xml.apache.org/xalan-j/commandline.html) +- [xsltproc](http://xmlsoft.org/XSLT/xsltproc.html) -- http://xml.apache.org/xalan-j/commandline.html -- http://xmlsoft.org/XSLT/xsltproc.html ## Supported NLM / JATS Versions -Currently the following NLM and JATS [versions](http://jats.nlm.nih.gov/versions.html) are supported: +Currently the following NLM and JATS [versions](https://jats.nlm.nih.gov/versions.html) are supported: -| Version | Notes | -|----------|---------| -| [NLM 2.3](http://dtd.nlm.nih.gov/2.3/) | | -| [NLM 3.0](http://dtd.nlm.nih.gov/3.0/) | | +| Version | Notes | +|------------------------------------------|---------| +| [NLM 2.3](http://dtd.nlm.nih.gov/2.3/) | | +| [NLM 3.0](http://dtd.nlm.nih.gov/3.0/) | | | [JATS 1.0](http://jats.nlm.nih.gov/1.0/) | | @@ -34,6 +36,7 @@ Currently the following NLM and JATS [versions](http://jats.nlm.nih.gov/versions ### Identifiers + ## Contributing CrossRef welcomes contributions to enhance this XSLT. Please make a pull request to contribute. From 48fa64700e6ec5ead5ecb49496fa927d813a6f08 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 12 Apr 2017 01:30:42 -0500 Subject: [PATCH 07/16] Retrofit another unnecessary XSLT 2.0 dependency --- nlm-jats-crossref.xslt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 1ddc7f7..b4033d5 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -13,6 +13,7 @@ 19700101000000 labs-notifications@crossref.org + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -461,7 +462,7 @@ - + @@ -494,7 +495,7 @@ - + From d0f171ff36d0595498f6e6fba71e6093af14d16b Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 12 Apr 2017 01:33:46 -0500 Subject: [PATCH 08/16] Unmix tabs & spaces (remove tabs) --- nlm-jats-crossref.xslt | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index b4033d5..6c924e9 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -131,8 +131,7 @@ - Journal full title is not available in the - Input file + Journal full title is not available in the Input file @@ -148,8 +147,7 @@ - ISSN is not available in the Input - file + ISSN is not available in the Input file @@ -232,8 +230,7 @@ - DOI entry is not available in the - Input/Meta file(s) + DOI entry is not available in the Input/Meta file(s) @@ -266,11 +263,13 @@ - + @@ -281,11 +280,13 @@ - + @@ -404,9 +405,10 @@ - + From 4dc23cfc7eebf26bec882ff35caeeeacf349c33f Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Tue, 18 Jul 2017 14:54:16 -0500 Subject: [PATCH 09/16] Remove obvious comments (section dividers) and wrap long lines --- nlm-jats-crossref.xslt | 88 ++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 6c924e9..d28b066 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -9,25 +9,33 @@ - 8/5/2014 (PDF) shortened timestamp value to match web deposit value --> - + 19700101000000 labs-notifications@crossref.org abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ - - - + - + - + @@ -44,9 +52,7 @@ - - - + @@ -108,9 +114,7 @@ - - - + @@ -157,17 +161,13 @@ - - - + - - - + @@ -185,9 +185,7 @@ - - - + @@ -200,9 +198,7 @@ - - - + @@ -214,13 +210,15 @@ - - + + - + @@ -248,9 +246,7 @@ - - - + @@ -358,9 +354,7 @@ - - - + @@ -374,9 +368,7 @@ - - - + @@ -401,18 +393,14 @@ - - - + - - - + @@ -428,12 +416,15 @@ - + - + @@ -445,7 +436,7 @@ - + @@ -473,7 +464,10 @@ - + @@ -483,7 +477,7 @@ - + From d8fac63d2569c01c6f87d36443eb383fd3c84df3 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 19 Jul 2017 11:10:13 -0500 Subject: [PATCH 10/16] Make citations more flexible; use more match, less if/when/choose --- nlm-jats-crossref.xslt | 416 +++++++++++++++++------------------------ 1 file changed, 175 insertions(+), 241 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index d28b066..f0c0b4b 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -10,7 +10,7 @@ --> @@ -20,180 +20,119 @@ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - No article-id has been entered by user - - + - - - - - - Publisher's Name not found in the input file - - + - - - - - - Publisher's name not found in the input file - - + - - - + + + + - - - - - - - - - + + - - - - - Journal full title is not available in the Input file - - - - - - - - - - - - - - - - ISSN is not available in the Input file - - - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + - + - + @@ -247,6 +186,12 @@ + + + + + + @@ -266,11 +211,7 @@ --> - - - - - + @@ -401,15 +342,15 @@ --> + + - - - key + @@ -417,108 +358,101 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , - - - - - + + + + , + From 8810b56f9eb599d7157672b1d6413699bd964ae9 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Tue, 1 Aug 2017 13:01:46 -0500 Subject: [PATCH 11/16] Add link to current official download on CrossRef support pages --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dfdf413..35c039d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ This repository contains an XSLT file that will translate [NISO NLM or JATS](https://jats.nlm.nih.gov/versions.html) to [CrossRef Deposit XML](https://support.crossref.org/hc/en-us/articles/215577783-Creating-content-registration-XML). +See for the current official XSLT stylesheet. + ## How do I use this? From c420ff3dc378548649742d28897b896775a69484 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Tue, 19 Dec 2017 01:14:17 -0600 Subject: [PATCH 12/16] Update schemaLocation URI hint --- nlm-jats-crossref.xslt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index f0c0b4b..01fc3c2 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -30,7 +30,7 @@ xmlns:fr="http://www.crossref.org/fundref.xsd" version="4.4.0" xsi:schemaLocation="http://www.crossref.org/schema/4.4.0 - http://www.crossref.org/schema/deposit/crossref4.4.0.xsd"> + https://www.crossref.org/schema/crossref4.4.0.xsd"> From c50dc431a560d1d1141866a7d33b6e1e015f331e Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Tue, 19 Dec 2017 01:14:36 -0600 Subject: [PATCH 13/16] Add link to raw file in README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index dfdf413..455d6a3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ This repository contains an XSLT file that will translate [NISO NLM or JATS](https://jats.nlm.nih.gov/versions.html) to [CrossRef Deposit XML](https://support.crossref.org/hc/en-us/articles/215577783-Creating-content-registration-XML). +Direct links to content: +* `nlm-jats-crossref.xslt`: + - [GitHub Raw (HTTPS)](https://raw.githubusercontent.com/semprag/jats-crossref-xslt/master/nlm-jats-crossref.xslt) + ## How do I use this? From 465366e306169dc7cd6abe404e028eea77ec1210 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 16 May 2018 18:22:31 -0500 Subject: [PATCH 14/16] Rewrite preamble and change log --- nlm-jats-crossref.xslt | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index 01fc3c2..f3d6528 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -1,14 +1,19 @@ - - - - Date: Wed, 16 May 2018 18:37:43 -0500 Subject: [PATCH 15/16] Update 'direct link' target in README --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e5e7d6..37e8c1f 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,8 @@ to [CrossRef Deposit XML](https://support.crossref.org/hc/en-us/articles/2155777 See for the current official XSLT stylesheet. -Direct links to content: -* `nlm-jats-crossref.xslt`: - - [GitHub Raw (HTTPS)](https://raw.githubusercontent.com/semprag/jats-crossref-xslt/master/nlm-jats-crossref.xslt) +Direct link to current version of stylesheet: +[`nlm-jats-crossref.xslt`](http://info.semprag.org/jats-crossref-xslt/nlm-jats-crossref.xslt) ## How do I use this? From a3fc6eafb8ac0aef50fd077fc3e8f1574726f341 Mon Sep 17 00:00:00 2001 From: Kai von Fintel Date: Fri, 27 Sep 2019 12:02:13 -0400 Subject: [PATCH 16/16] =?UTF-8?q?Edited=20doi=5Fbatch=20field=20based=20on?= =?UTF-8?q?=20crossref=E2=80=99s=20rec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The validator at https://www.crossref.org/02publishers/parser.html complained about the format of the doi_batch field. The amended version is based on the model at https://support.crossref.org/hc/en-us/articles/213123706-Journals-and-journal-articles --- nlm-jats-crossref.xslt | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/nlm-jats-crossref.xslt b/nlm-jats-crossref.xslt index f3d6528..837c148 100644 --- a/nlm-jats-crossref.xslt +++ b/nlm-jats-crossref.xslt @@ -4,6 +4,7 @@ Originally created by Aptara, Technology Group Revised by CrossRef to accomodate NISO JATS 1.0 Improved by Christopher Brown to be compatible with XSLT 1.0 and latest schema Change log: +* 2019-09-27 edited doi_batch field based on crossref's rec (KvF) * 2017-07-19 implement support for structured citations (CHB) * 2017-07-19 update to crossref4.4.0.xsd (CHB) * 2016-12-17 merged with updated NLM.JATS2Crossref.v3.1.xsl from Crossref (CHB) @@ -30,12 +31,9 @@ Change log: + http://www.crossref.org/schemas/crossref4.4.0.xsd"> @@ -210,11 +208,11 @@ Change log: @@ -223,11 +221,11 @@ Change log: @@ -342,8 +340,8 @@ Change log: