CrossRef XML Validation Problem ojs 3.1.0

This is my XML generated for 1 article

 <?xml version="1.0" encoding="utf-8"?>
<doi_batch xmlns="http://www.crossref.org/schema/4.3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" xmlns:ai="http://www.crossref.org/AccessIndicators.xsd" version="4.3.6" xsi:schemaLocation="http://www.crossref.org/schema/4.3.6 https://www.crossref.org/schemas/crossref4.3.6.xsd">
  <head>
<doi_batch_id>_1512474860</doi_batch_id>
<timestamp>1512474860</timestamp>
<depositor>
  <depositor_name>Biomedical Research and Therapy</depositor_name>
  <email_address>managingeditor@bmrat.org</email_address>
</depositor>
<registrant>BioMedPress (BMP)</registrant>
  </head>
  <body>
<journal>
  <journal_metadata>
    <full_title>Journal of Medical Research and Innovation</full_title>
    <abbrev_title>J Med Res Innov</abbrev_title>
    <issn media_type="electronic">2456-8139</issn>
  </journal_metadata>
  <journal_issue>
    <publication_date media_type="online">
      <month>01</month>
      <day>01</day>
      <year>2018</year>
    </publication_date>
    <journal_volume>
      <volume>2</volume>
    </journal_volume>
    <issue>1</issue>
  </journal_issue>
  <journal_article xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" xmlns:ai="http://www.crossref.org/AccessIndicators.xsd" publication_type="full_text" metadata_distribution_opts="any">
    <titles>
      <title>ACE Alzheimer’s: The Role of Vitamin A, C and E (ACE) in Oxidative Stress induced Alzheimer’s Disease</title>
    </titles>
    <contributors>
      <person_name contributor_role="author" sequence="first">
        <given_name>Varshil</given_name>
        <surname>Mehta</surname>
        <ORCID>http://orcid.org/0000-0001-5804-9948</ORCID>
      </person_name>
      <person_name contributor_role="author" sequence="first">
        <given_name>Nimit</given_name>
        <surname>Desai</surname>
      </person_name>
      <person_name contributor_role="author" sequence="first">
        <given_name>Arshi</given_name>
        <surname>Perwez</surname>
      </person_name>
      <person_name contributor_role="author" sequence="first">
        <given_name>Dipali</given_name>
        <surname>Nemade</surname>
      </person_name>
      <person_name contributor_role="author" sequence="first">
        <given_name>Sameer</given_name>
        <surname>Dawoodi</surname>
      </person_name>
      <person_name contributor_role="author" sequence="first">
        <given_name>Sojib Bin</given_name>
        <surname>Zaman</surname>
      </person_name>
    </contributors>
    <jats:abstract xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1">
      <jats:p>Alzheimer's disease (AD), a chronic neurodegenerative disease which is known to progress gradually and has now become a substantial health concern through-out the world. Clinically, cognitive declination and progressive dementia are the main characteristics of AD while pathologically; Aß plaques and tau-neurofibrils are the hallmarks. The present literature search has suggested that oxidative stress is one of the most vital risk factor which can potentially lead to the development of AD.&#13;
Oxidative stress is known to produce the Reactive Oxygen Species (ROS) which has a potential to increase in the structural and functional abnormalities in the glial cells of the brain and which could further lead to a cognitive decline and subsequently, dementia. Hence, in order to curb this oxidative stress in the glial cells, antioxidants have been proved to be of great help according to the literature search done in PubMed, Google Scholar and Scopus. We included Meta-Analysis, Systemic Reviews and Original studies. Vitamins A, C, and E are an example of antioxidants that can be used as adjuvants in the treatment of AD.&#13;
This article focuses on the contemporary literature search and presents forward the evidence-based banes of using Vitamin A, C, and E as an adjuvant therapy for preventing and treating AD.&#13;
Keywords: Vitamin A, Vitamin C, Vitamin E, Antioxidants, Alzheimers disease, Adjuvant therapy</jats:p>
    </jats:abstract>
    <publication_date media_type="online">
      <month>10</month>
      <day>03</day>
      <year>2017</year>
    </publication_date>
    <pages>
      <first_page>e000086</first_page>
    </pages>
    <ai:program xmlns:ai="http://www.crossref.org/AccessIndicators.xsd" name="AccessIndicators">
      <ai:license_ref>http://creativecommons.org/licenses/by-nc/4.0</ai:license_ref>
    </ai:program>
    <doi_data>
      <doi>10.15419/jmri.86</doi>
      <resource>https://jmri.org.in/jmri/article/view/e000086</resource>
      <collection property="crawler-based">
        <item crawler="iParadigms">
          <resource>https://jmri.org.in/jmri/article/download/e000086/113</resource>
        </item>
      </collection>
      <collection property="crawler-based">
        <item crawler="iParadigms">
          <resource>https://jmri.org.in/jmri/article/download/e000086/114</resource>
        </item>
      </collection>
      <collection property="text-mining">
        <item>
          <resource mime_type="application/xml">https://jmri.org.in/jmri/article/download/e000086/113</resource>
        </item>
        <item>
          <resource mime_type="application/pdf">https://jmri.org.in/jmri/article/download/e000086/114</resource>
        </item>
      </collection>
    </doi_data>
  </journal_article>
</journal>
  </body>
</doi_batch>
<h1>DB Error: MySQL server has gone away</h1>

I am getting this error:

<?xml version="1.0" encoding="UTF-8"?> 
<doi_batch_diagnostic status="completed" sp="ds4.crossref.org"> 
<submission_id>1417991554</submission_id> 
<batch_id>_1512457035</batch_id> 
<record_diagnostic status="Failure" msg_id="29"> 
<doi /> 
<msg>Deposited XML is not well-formed or does not validate: Error on line 1: Content is not allowed in prolog.: Error on line 1: Content is not allowed in prolog.</msg> 
</record_diagnostic> 
<batch_data> 
<record_count>1</record_count> 
<success_count>0</success_count> 
<warning_count>0</warning_count> 
<failure_count>1</failure_count> 
</batch_data> 
</doi_batch_diagnostic>

What is the problem here?

1 Like

Grossly, it looks ok.
But i have one extra line in my <doi_batch tag i.e

xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" 

I don’t know whether it is necessary.

Regards,

This is what i gt when i check with Crossref XML Parser Metadata quality check

File: crossref-20171205-112337-a.xml

[Fatal Error] :1:1: Content is not allowed in prolog.
error: A Parse error occurred - Content is not allowed in prolog.

@bozana @asmecher @astevens @ajnyga @NateWr Any idea about this problem?

it is suggesting that you have something, some content, before the actual xml starts. Of course I can not see anything in the example you sent.

Are you exporting XML from OJS and using the Crossref form to import that or are you using the CrossRef API from OJS and get that error inside OJS?

I am just exporting XML from OJS and asking some one else to upload it from my behalf.

Looking at that closer there is actually an empty line break before “<?xml version="1.0" encoding="utf-8"?>”. What happens if you remove that? Or could there be a byte order mark in the beginning?

No, there is nothing. No bytes or no lines before the xml begins. https://drive.google.com/open?id=15wM1lc6005xm2t6yxJ93VxFiyDsXmHJ0 is the link to direct file. I have not edited it.

You have “<h1>DB Error: MySQL server has gone away</h1>” in the end?

1 Like

I removed that and tried but I got this:

File: crossref-20171205-112337-a.xml

[Fatal Error] :1:1: Content is not allowed in prolog.
error: A Parse error occurred - Content is not allowed in prolog.

Ok, so I copied the data to a file (minus the row mentioned above), saved it as an xml file and tested it here: crossref.org : metadata quality check and got no errors.

The file is here: https://drive.google.com/file/d/109i3bjzWjifD4InBmcMD7jLVQ1XQlGo6/view?usp=sharing

Do you get the same error with that file as well?

No it worked. Why do I get an error then?

Inused notepad to remove that line. Is that the problem? Does notepad add byts before the xml docunent? What should i use to edit it then?

it could be that something is added when you use notepad.

On Mac I use Sublime Text and on Windows I use Notepad++.

It could be that notepad ads BOM in the beginning? In the two editors mentioned you can always select UTF8 without BOM, which is probably the default setting.

1 Like

I use Notepad ++ and Geany. The both editors never added changes that cause errors.

Thanks

Notepad++ worked like a charm. Thanks guys

1 Like