ncbi / JATSPreviewStylesheets

JATS Preview Stylesheets
51 stars 34 forks source link

Does it support articles from PMC ? #11

Open unoexperto opened 8 years ago

unoexperto commented 8 years ago

Does it support articles from PMC ? I tested it on article element from this call

http://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&metadataPrefix=pmc&identifier=oai:pubmedcentral.nih.gov:4544069

after running xsltproc jats-html.xsl sample.xml >a.html I get HTML with one blob of text from XML with all tags removed.

jeffbeckncbi commented 8 years ago

The JATS Preview Stylesheets were written as a starting point for rendering JATS XML in HTML.

The XML that you are getting from http://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&metadataPrefix=pmc&identifier=oai:pubmedcentral.nih.gov:4544069 is an OAI response. It is not a JATS document.

However, it looks like it contains a JATS XML document (or possibly and NLM 3.0 document) between

and

Jeff

From: Ruslan notifications@github.com<mailto:notifications@github.com> Reply-To: ncbi/JATSPreviewStylesheets reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday, October 6, 2015 at 1:12 PM To: ncbi/JATSPreviewStylesheets JATSPreviewStylesheets@noreply.github.com<mailto:JATSPreviewStylesheets@noreply.github.com> Subject: [JATSPreviewStylesheets] Does it support articles from PMC ? (#11)

Does it support articles from PMC ? I tested it on article element from this call

http://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&metadataPrefix=pmc&identifier=oai:pubmedcentral.nih.gov:4544069

after running xsltproc jats-html.xsl sample.xml >a.html I get HTML with one blob of text from XML with all tags removed.

— Reply to this email directly or view it on GitHubhttps://github.com/ncbi/JATSPreviewStylesheets/issues/11.

unoexperto commented 8 years ago

Thank you, Jeff. As I mentioned in my original message it I tested it with article element, not with XML returned by API.

Klortho commented 8 years ago

Looks like our OAI service is adding a default namespace on the article content, of xmlns="http://dtd.nlm.nih.gov/2.0/xsd/archivearticle. That's a bug in our service. If you strip that out, you'll get better HTML. I'll report this bug.

unoexperto commented 8 years ago

That helped! Awesome! Resulting HTML doesn't have correct IMG tags but I'll go through documentation more. Thanks!

unoexperto commented 8 years ago

Have you guys had a chance to fix this bug ? I still see it in following document

http://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&metadataPrefix=pmc&identifier=oai:pubmedcentral.nih.gov:4554963

unoexperto commented 6 years ago

@Klortho @jeffbeckncbi Hey guys! How is it going ? :)