-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix for issue 6199: EndNote .xml import to JabRef: PDF links are not imported corrected. #7667
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
Conversation
Siedlerchr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor code improvement, but otherwise looks good to me!
That will benefit a lot of users!
src/main/java/org/jabref/logic/importer/fileformat/EndnoteXmlImporter.java
Outdated
Show resolved
Hide resolved
| </xs:element> | ||
| <xs:element name="url"> | ||
| <xs:complexType> | ||
| <xs:complexType mixed="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, did not know about this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yah, it's funny. I just knew that when I was looking up some relevant docs yesterday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone know whether there is a globally updated "endnote.xsd"?
I am of the community believing that schema schecking is a good thing (json schema, xml schema, ...). (Side note: some say that even the schema should be sent along with the message: https://microservice-api-patterns.org/patterns/structure/elementStereotypes/MetadataElement#)
If a third party releases an schema for their data meaning that data produced by their software can be read in case it conforms to that schema, I would not try to change that schema.
Google lead me to https://forums.zotero.org/discussion/26493/endnote-xml-export-import - however, this his very outdated. Maybe, endnote.xsd is not maintained anymore and we can go ahead to create a fork?
I just wanted to double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean a globally standardized version of "endnote.xsd"?
I do not know much about it yet. But sending messages with its corresponding schema is indeed reasonable in order to parse the info correctedly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endnote only has a dtd not an xsd https://support.clarivate.com/Endnote/s/article/EndNote-XML-Document-Type-Definition?language=en_US
Seems like the xsd was somehow generated from an xml file. The xsd has been in JabRef since ages
1859970 to
82fd623
Compare
…imported correctly. (JabRef#6199)
82fd623 to
b1c3f75
Compare
I kind of messed up the previous commits. So I have incorporated your suggestion in the latest commit b1c3f75, please check. |
|
@Aloofwisdom please have a look at the checkstyle test. You can also see the comments from reviewdog when you look at the Files changed tab |
…abref into aloofwisdom-branch pull
I could pass the CheckStyle locally now. Please check again. |
|
Thanks a lot for your contribution! |
Fixes #6199
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)Summary of Issue 6199
When users import EndNote type xml to Jabref, it always assumes that urls are warped inside a style tag. However, some urls may not be wrapped in a style tag and as a result, Jabref cannot parses them.
Way to Fix
In the xsd file, I change the the complexType's attribute to
mix="true", so that it can accept both vanilla text and subelements. Then I will check whether a style tag exists: if it does, use the text inside it; otherwise, use vanilla text instead.