Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid types in CSL JSON items returned by DOI content negotiation #187

Closed
dhimmel opened this issue Feb 27, 2017 · 6 comments
Closed

Invalid types in CSL JSON items returned by DOI content negotiation #187

dhimmel opened this issue Feb 27, 2017 · 6 comments
Assignees
Labels

Comments

@dhimmel
Copy link

dhimmel commented Feb 27, 2017

Sorry if this issue is a bit off topic. @gbilder mentioned this repo on twitter.

DOI content negation that accepts application/vnd.citationstyles.csl+json produces item types that are not part of the CSL specification.

Specifically, I had to convert the following invalid types:

  • journal-article
  • book-chapter
  • posted-content
  • proceedings-article
@dhimmel dhimmel changed the title Invalid CSL JSON Items Invalid types in CSL JSON items returned by DOI content negotiation Feb 27, 2017
@dhimmel
Copy link
Author

dhimmel commented Feb 27, 2017

For example

curl --location --header "Accept: application/vnd.citationstyles.csl+json" https://doi.org/10.7717/peerj.705 |
  python -m json.tool

Produces

{
    "indexed": {
        "date-parts": [
            [
                2016,
                12,
                20
            ]
        ],
        "date-time": "2016-12-20T02:24:14Z",
        "timestamp": 1482200654778
    },
    "reference-count": 68,
    "publisher": "PeerJ",
    "content-domain": {
        "domain": [],
        "crossmark-restriction": false
    },
    "short-container-title": [],
    "cited-count": 0,
    "DOI": "10.7717/peerj.705",
    "type": "journal-article",
    "created": {
        "date-parts": [
            [
                2015,
                1,
                13
            ]
        ],
        "date-time": "2015-01-13T07:41:48Z",
        "timestamp": 1421134908000
    },
    "page": "e705",
    "source": "CrossRef",
    "title": "Lung cancer incidence decreases with elevation: evidence for oxygen as an inhaled carcinogen",
    "prefix": "http://id.crossref.org/prefix/10.7717",
    "volume": "3",
    "author": [
        {
            "given": "Kamen P.",
            "family": "Simeonov",
            "affiliation": [
                {
                    "name": "Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, USA"
                }
            ]
        },
        {
            "given": "Daniel S.",
            "family": "Himmelstein",
            "affiliation": [
                {
                    "name": "Biological & Medical Informatics, University of California, San Francisco, CA, USA"
                }
            ]
        }
    ],
    "member": "http://id.crossref.org/member/4443",
    "published-online": {
        "date-parts": [
            [
                2015,
                1,
                13
            ]
        ]
    },
    "container-title": "PeerJ",
    "original-title": [],
    "deposited": {
        "date-parts": [
            [
                2016,
                12,
                19
            ]
        ],
        "date-time": "2016-12-19T17:18:42Z",
        "timestamp": 1482167922000
    },
    "score": 1.0,
    "subtitle": [],
    "short-title": [],
    "issued": {
        "date-parts": [
            [
                2015,
                1,
                13
            ]
        ]
    },
    "alternative-id": [
        "10.7717/peerj.705"
    ],
    "URL": "http://dx.doi.org/10.7717/peerj.705",
    "ISSN": [
        "2167-8359"
    ],
    "citing-count": 68
}

Note the invalid "type": "journal-article".

@dhimmel
Copy link
Author

dhimmel commented Feb 27, 2017

Or for example, a bioRxiv preprint:

curl --silent --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1101/087619 |
  python -m json.tool |
  grep '"type":'

Returns "type": "posted-content",. I'm not sure what's the best CSL type to match posted-content.

dhimmel added a commit to dhimmel/deep-review that referenced this issue Apr 13, 2017
The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
dhimmel added a commit to greenelab/deep-review that referenced this issue Apr 13, 2017
The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
dhimmel added a commit to greenelab/deep-review that referenced this issue Apr 13, 2017
This build is based on
bc4b817.

This commit was created by the following Travis CI build and job:
https://travis-ci.org/greenelab/deep-review/builds/221717485
https://travis-ci.org/greenelab/deep-review/jobs/221717486

[ci skip]

The full commit message that triggered this build is copied below:

CSL: remove malformated event field

The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
dhimmel added a commit to greenelab/deep-review that referenced this issue Apr 13, 2017
This build is based on
bc4b817.

This commit was created by the following Travis CI build and job:
https://travis-ci.org/greenelab/deep-review/builds/221717485
https://travis-ci.org/greenelab/deep-review/jobs/221717486

[ci skip]

The full commit message that triggered this build is copied below:

CSL: remove malformated event field

The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
@dhimmel
Copy link
Author

dhimmel commented Jun 6, 2017

See also #43 (comment) by @aurimasv.

dhimmel added a commit to manubot/rootstock that referenced this issue Jun 29, 2017
The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
@kjw kjw added the bug label Jul 24, 2017
@dhimmel
Copy link
Author

dhimmel commented Jul 25, 2017

Thanks @kjw for the fix. And the reference to the commit that closes this issue is really helpful!

I'm currently getting an invalid CSL type for a DOI registered with DataCite. I reprorted that issue to datacite/datacite#182, since I'm assuming it's a DataCite issue rather than a Crossref issue.

@mfenner
Copy link

mfenner commented Jul 25, 2017

Yes, the DataCite content negotation uses different code. I will follow-up at datacite/datacite#182.

@larsgw
Copy link

larsgw commented Nov 18, 2021

This is not working anymore. https://doi.org/10.1101/2021.08.15.21262067 returns type: 'posted-content' and subtype: 'preprint'. Note that apart from the invalid type, the field for a "subtype" is actually genre, not subtype.

ploegieku added a commit to ploegieku/2023-functional-homology-paper that referenced this issue Aug 6, 2024
The event field of CSL data should be a string (https://git.io/vSSug).

Instead the event key returns an object as shown below:

```sh
curl --location \
  --header "Accept: application/vnd.citationstyles.csl+json" \
  https://doi.org/10.1109/icnn.1994.374637 \
  | python -m json.tool
```

```json
"event": {
    "name": "1994 IEEE International Conference on Neural Networks (ICNN'94)",
    "location": "Orlando, FL, USA",
    "acronym": "ICNN-94"
},
```

Related to CrossRef/rest-api-doc#187.
DOI content negotiation returns invalid CSL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants