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

DOI text nodes are doubled up #53

Closed
jnugent opened this issue Oct 29, 2024 · 1 comment
Closed

DOI text nodes are doubled up #53

jnugent opened this issue Oct 29, 2024 · 1 comment
Assignees

Comments

@jnugent
Copy link
Member

jnugent commented Oct 29, 2024

Seen in stable-3_3_0, probably also in 3.4 and main

If this line of code executes:

https://github.com/pkp/oaiJats/blob/stable-3_3_0/OAIMetadataFormat_JATS.inc.php#L341

The resulting OAI XML contains a doubled up doi with it being repeated twice in the node. Example:

<article-id pub-id-type="doi" >10.18357/kula.24710.18357/kula.247</article-id>

The DOI retrieved from the article here:

https://github.com/pkp/oaiJats/blob/stable-3_3_0/OAIMetadataFormat_JATS.inc.php#L339

is not doubled up. The $match->item(0) bit here is already returning a text node and the call to appendChild is adding another instance of the DOI to it. You can remedy this by changing this line to just

if ($match->length) $match->item(0)->appendChild();

and the original text node will be appended without the double DOI appearing.

@ewhanson ewhanson self-assigned this Oct 31, 2024
ewhanson added a commit that referenced this issue Nov 13, 2024
ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
@ewhanson
Copy link
Collaborator

PRs:

ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
ewhanson added a commit that referenced this issue Nov 13, 2024
ewhanson added a commit to ewhanson/oaiJats that referenced this issue Nov 13, 2024
ewhanson added a commit that referenced this issue Nov 13, 2024
ewhanson added a commit that referenced this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants