transpect / jats2html

XProc library and XSLT stylesheets to convert JATS to HTML
BSD 2-Clause "Simplified" License
6 stars 5 forks source link

JATS-XML to HTML #1

Closed gbala2412 closed 2 years ago

gbala2412 commented 2 years ago

I am trying to convert a JATS-XML to HTML. While running the following command no error/output. Just the cursor blinking on the same line. Correct me what I am doing wrong.

command: ./calabash/calabash.sh -o result=output.html jats2html/xpl/jats2html.xpl file=input.xml

catalog.xml

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <nextCatalog catalog="../jats2html/xmlcatalog/catalog.xml"/>
  <nextCatalog catalog="../cascade/xmlcatalog/catalog.xml"/>
  <nextCatalog catalog="../xproc-util/xmlcatalog/catalog.xml"/>
</catalog>

Folders: calabash cascade xproc-util xmlcatalog

input.xml <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "jpdtd/journalpublishing.dtd"><article article-type="research-article" dtd-version="1.0" xml:lang="en" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><front><journal-meta><journal-id journal-id-type="pmc">emj</journal-id><journal-id journal-id-type="pubmed">EMJ</journal-id><journal-id journal-id-type="publisher">EMJ</journal-id><issn>59-8138</issn><publisher><publisher-name>EMJ</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="other">pg880</article-id><article-id pub-id-type="pmid">738</article-id><article-categories><subj-group><subject>Primary care</subject><subj-group><subject>190</subject><subject>10</subject><subject>218</subject><subject>219</subject><subject>355</subject><subject>357</subject></subj-group></subj-group></article-categories><title-group><article-title>Issues of length and context</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Freeman</surname><given-names>George</given-names></name><role>professor</role><xref ref-type="aff" rid="aff-a"/></contrib></contrib-group><aff id="aff-a">Technology and Medicine, London</aff><author-notes></author-notes><pub-date pub-type="pub" publication-format="print" iso-01-date="20120413"><day>13</day><month>4</month><year>2012</year></pub-date><volume>124</volume><issue>342</issue><fpage>180</fpage><lpage>282</lpage><history><date date-type="accepted" iso-8601-date="20130207"><day>7</day><month>2</month><year>2013</year></date></history></article-meta></front><body><p>We report on the outcome of extensive debate among a group of general practitioners with an interest in the process of care, with reference to the interim findings of the commissioned systematic review and our personal databases. The review identified 14 relevant papers.<boxed-text><sec><title>Summary points</title><p><list list-type="bullet"><list-item><p>Longer consultations are associated with a range of better patient outcomes</p></list-item><list-item><p>Modern consultations in general practice deal with patients with more serious and chronic conditions</p></list-item></list></p></sec></boxed-text></p></body><back><ack><p>We thank the other members of the working group: Susan Childs, Paul Freeling, Iona Heath, Marshall Marinker, and Bonnie Sibbald. We also thank Fenny Green of the Royal College of General Practitioners for administrative help.</p></ack><fn-group><fn><p>Competing interests: None declared.</p></fn></fn-group></back></article>

Thanks

gimsieke commented 2 years ago

You need to specify the input with -i source=input.xml. You should have been able to notice that by looking at jats2html.xpl.

Please note that unlike docx2tex, jats2html is not intended for out-of-the-box use. It needs to be configured, and the documentation, if there is any, is in the code.