wpoa / JATS-to-Mediawiki

A PubMed Central to MediaWiki converter
4 stars 1 forks source link

PMIDS and DOIs merged in id field in {{Citation}} template on Wikisource #25

Open Daniel-Mietchen opened 10 years ago

Daniel-Mietchen commented 10 years ago

I do not see the point of this id parameter, although it looks as if some thought has gone into it:

{{Citation
[..]
| doi = 10.1186/1471-2164-8-223
| pmid = 17620140
| id = 1762014010.1186/1471-2164-8-223
}}

Example from https://en.wikisource.org/w/index.php?title=Wikisource:WikiProject_Open_Access/Programmatic_import_from_PubMed_Central/Saudi_Arabian_Y-Chromosome_diversity_and_its_relationship_with_nearby_regions&oldid=4929277#cite_note-B42-37 .

I'd much rather have the PMCID signaled, for which there are provisions in https://github.com/wpoa/JATS-to-Mediawiki/blob/c2aa5d83ccd15f6992a9f610a982e1590a97e6e6/jats-to-mediawiki.xsl#L960 .

Daniel-Mietchen commented 10 years ago

Here's the code from https://github.com/wpoa/JATS-to-Mediawiki/blob/c2aa5d83ccd15f6992a9f610a982e1590a97e6e6/jats-to-mediawiki.xsl#L986 :

        <!-- default catch-all id -->
        <xsl:if test="pub-id[not(@pub-id-type='doi|pmcid|pmid')]">
            <xsl:text>| id = </xsl:text>
            <xsl:apply-templates select="pub-id"/>
            <xsl:text>&#xA;</xsl:text>
        </xsl:if>
wrought commented 10 years ago

If I read correctly, this code is saying that if there is some ID used in the XML that does not have the type specified as doi, pmcid, or pmid then to then pass this id to the template as a value for the | id = field. This means the concatenated DOI-PMID is stored in the source XML?

the {{Citation}} template on Wikisource does not have a pmcid field (it does have doi and pmid) and expects the id field to correspond to ISBN or other identifier.

Klortho commented 10 years ago

This means the concatenated DOI-PMID is stored in the source XML?

No way -- that wouldn't make any sense, and would definitely be an error.

the {{Citation}} template on Wikisource does not have a pmcid field

It looks like it does, but its name is pmc.

wrought commented 10 years ago

Hmm, then how is there a DOI-PMID concatenation taking place?

Indeed, the {{Cite journal}} template does have the pmcid field though.