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

Update medline xsd schema to include mathml and other stuff #6350

Closed
wants to merge 6 commits into from

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Apr 25, 2020

Fixes #4273

I managed to generate the xsd form the main dtd and the additonal dtds

Currently jaxb/xjc fails due to some duplicate property in the mathml files.

I don't quite understand how to fix this, it must be somehow annoated with some other jaxb tags

Something like this, but I have no idea where exactly to place it. If I try to place it directly under the reported lines it is invalid.

        <xs:annotation>
                <xs:appinfo>
                    <jxb:property name="multiscriptExpr"/>
                </xs:appinfo>
            </xs:annotation>

https://javaee.github.io/jaxb-v2/doc/user-guide/ch03.html

Some related info:
https://cumbers.wordpress.com/2009/09/02/property-value-is-already-defined-use-to-resolve-this-conflict/
highsource/jsonix-schema-compiler#83

[ant:xjc] [ERROR] Eigenschaft "MultiScriptExpression" ist bereits definiert. Verwenden Sie &lt;jaxb:property> zur L▒sung dieses Konflikts.
[ant:xjc]   Zeile 1687 von /jabref/src/main/resources/xjc/medline/mathml3-presentation.xsd
[ant:xjc]
[ant:xjc] [ERROR] Das folgende Verzeichnis ist f▒r den obigen Fehler relevant
[ant:xjc]   Zeile 1690 von /jabref/src/main/resources/xjc/medline/mathml3-presentation.xsd
[ant:xjc]
  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@koppor
Copy link
Member

koppor commented Apr 26, 2020

Could you please provide more details what you generated how? I think, pointing to the PubMed XML examples is helpful to follow the intention here.

Generating XML Schema from example seems to be a work-around for non-existing XML Schema files. This is like generationg JSON Schema for JSON files not under own control. Or specifyng required packages meassures for received packages (and no power on the producer).

In case this causes much effort, I would propose to rewrite the Medline importer using the StAX technology (https://www.baeldung.com/java-stax). We could mob on that.

Minor note: In another project, I found following plugin great: https://github.com/edeandrea/xjc-generation-gradle-plugin

<!-- ================================================================= -->
<xs:simpleType name="iso.language.codes">
<xs:restriction base="xs:token">
<xs:enumeration value="AF"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the medline.xsd was regenerated? These codes do not exist in the new file. -- Think, there has to be another way to achieve the goal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commited an old version. I managed to recreate the xsd now from the dtd and a bunch of other required dtds and adjusting the headers. However, the orginal error regarding the mathml remains.

We already use our own xjc plugin which does also execute the ant task.

@Siedlerchr Siedlerchr closed this Jul 21, 2020
@koppor koppor deleted the medline branch August 2, 2020 19:14
koppor pushed a commit that referenced this pull request Jan 1, 2023
43566f2 Update molecular-oncology.csl (#6354)
38f2b5f Update san-francisco-estuary-and-watershed-science.csl (#6350)
724cb12 Update australasian-journal-of-philosophy.csl (#6344)
df6af86 Fix webpage in-text citation for council-of-science-editors-author-date.csl (#6318)
6900b58 Add month to magazine for Bluebook
e0a8148 Update cambridge-university-press-author-date-cambridge-a.csl (#6345)
0823448 Add space & comma before pp (#6343)
ff38cd2 Update american-journal-of-respiratory-and-critical-care-medicine.csl (#6341)
8727dfb Update early-music-history.csl (#6323)
1154354 Update boletin-de-pediatria.csl (#6310)
f25438e Update pravnik.csl (#6309)
db7a4ae Update zoological-journal-of-the-linnean-society.csl (#6304)
6c043a7 Create polygraphia.csl (#6307)
255e00c Create intellect-newgen-books.csl (#6308)
323629f Update historical-materialism.csl (#6300)
f62b70d Create european-review-of-international-studies.csl (#6301)
dff2698 Update ucl-university-college-harvard.csl (#6298)
0ce09c9 Update sciences-po-ecole-doctorale-note-french.csl (#6290)
bdd53ec Update sciences-po-ecole-doctorale-author-date.csl (#6291)
efde4d4 Create journal-of-law-medicine-ethics.csl (#6296)
7539b2c Create theses-de-sorbonne-universite.csl (#6295)
905f25a Update biochemical-society-transactions.csl (#6292)
a76a3f5 Update smithsonian-institution-scholarly-press author-date and note (#6294)
e6b6c6c Create exploration-of-targeted-anti-tumor-therapy.csl (#6276)
024c9c8 Create nys-nydanske-studier.csl (#6331)
d9ac8e1 Update vox-sanguinis.csl (#6327)
9a98e92 Remove DOI from Genetics & Molecular Biology

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 43566f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MathML support when importing PubMed
2 participants