I get these errors when trying to submit or load an XML file
Opening and ending tag mismatch: p line 246 and body
Opening and ending tag mismatch: body line 3 and html
Premature end of data in tag html line 2
Failed to parse the XML resource 'http://www.crossref.org/schema/deposit/crossref4.3.6.xsd'.
The XML, which is printed in the bottom, is valid, I checked it with CrossRef.
I especially do not understand the line 246 part while there are not that many lines?
[Fri Feb 03 17:35:00 2017] [error] [client 192.168.175.24] PHP Warning: htmlspecialchars(): charset `UTF=8’ not supported, assuming utf-8 in public_html/plugins/importexport/crossref/filter/IssueCrossrefXmlFilter.inc.php on line 113, referer: /management/importexport/plugin/CrossRefExportPlugin
[Fri Feb 03 17:35:01 2017] [error] [client 192.168.175.24] PHP Warning: DOMDocument::schemaValidate(): Invalid Schema in /public_html/lib/pkp/classes/xslt/XMLTypeDescription.inc.php on line 126, referer: /management/importexport/plugin/CrossRefExportPlugin
[Fri Feb 03 17:35:01 2017] [error] [client 192.168.175.24] ojs2: Valittuja kohteita ei voitu muuntaa., referer: management/importexport/plugin/CrossRefExportPlugin
Hmm… there also seem to be a problem when validating against a remote schema, because non of them works at the moment (mEDRA, DataCite, Crossref) i.e. they all have the same validation error
ok, commenting line 126 of course solves this and everything works after that.
I know way too little about the way the schema validation works to start solving that. Thank you in advance.
Ah, for testing reasons I disabled allow_url_fopen in php.ini which led to not working remote (‘http://…’) schemas… With allow_url_fopen = On everything works fine and just the Crossref URL change has to be fixed…
So having allow_url_fopen = Off in config.inc.php will cause the validation to break? I think it is off by default so this is something that should be instructed for DOI users?
hmmm… no, this setting is ignored by schemaValidate function – it only matters if it is enabled in the php.ini.
I am not sure if there is any other possibility, except to disable validation in case this setting is “Off”.
And in any case the users should be somehow instructed…
I don’t understand where did you add allow_url_fopen = On, but it is probably so, that your server php.ini does not allow it i.e. contains allow_url_fopen = Off so that the validation against a remotes schema is not possible. The validation function ignores the setting in the OJS config.inc.php.
You could either try to enable fopen on your server, or you could disable validation, export the XML and upload it manually in the Crossref portal.
UPDATE filter_groups SET output_type = 'xml::schema(http://data.crossref.org/schemas/crossref4.3.6.xsd)' WHERE output_type = 'xml::schema(http://www.crossref.org/schema/deposit/crossref4.3.6.xsd)'