Closed josuevalrob closed 6 years ago
some sort of libxml error, not sure. What is the value?
Just give it a random value (don't have any pdf file, I'm testing) but I got an error: I give it filesize="25" but editing the xml file. Warnings encountered:
I think is because there is not any file... i will upload one
I give it a file, with the size 1201 kb but it give me
1. Submission The provided filesize "1201" and the actual filesize "" do not match
The file is in the root, at the same level of convert.php and 2017.xml
this is the xml tag: `
`
did you change the setting here when you created the xml file: https://github.com/ajnyga/tsvConverter/blob/master/convert.php#L27
Now yes.
Warnings encountered:
The provided filesize "1201" and the actual filesize "" do not match
Do you have content between<embed encoding="base64"> </embed>
?
If you do not change the settings in the convert.php file, then you should create a subfolder called "files" and move the pdf-files there.
File path: files/1.pdf Excel: file2 fileLabel2 fileGenre2 fileLocale2 1.pdf Data set 1 Data Set en convert.php
// Location of full text files
$filesFolder = dirname(__FILE__) . "/files/";
All this give me:
<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" stage="proof" id="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<revision number="1" genre="Article Text" filename="2017-1-1-1.pdf" filesize="1201" filetype="" user_group_ref="Author" uploader="admin">
<name locale="en_US">2017-1-1-1.pdf</name>
<embed encoding="base64"> </embed>
</revision>
</submission_file>
I change it to::
<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" stage="proof" id="3" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<revision number="1" genre="Article Text" filename="3.pdf" filesize="603" filetype="" user_group_ref="Author" uploader="admin">
<name locale="en_US">3.pdf</name>
<embed encoding="base64"> </embed>
</revision>
</submission_file>
But the result still:
The provided filesize "1201" and the actual filesize "" do not match
Thanks for your time!
If you are adding more than one file per article, then did you change the setting here: https://github.com/ajnyga/tsvConverter/blob/master/convert.php#L21
Also, do you actually have an 2017-1-1-1.pdf file?
And thirdly, do you have actual content between <embed encoding="base64"> </embed>
in the xml file?
Sorry, i was working in the cell of pdf 2.
Now i have change to this:
file1 file Label1 fileGenre1 fileLocale1 file2 fileLabel2 fileGenre2 fileLocale2 1 PDF Article Text en 2 Data set 1 Data Set en
And the doc path is: files/1.pdf and files/2.pdf
This is the outpu:
<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" stage="proof" id="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<revision number="1" genre="Article Text" filename="1" filesize="" filetype="" user_group_ref="Author" uploader="admin">
<name locale="en_US">1</name>
<embed encoding="base64"> </embed>
</revision>
</submission_file>
And this is the error: Element '{http://pkp.sfu.ca}revision', attribute 'filesize': '' is not a valid value of the atomic type 'xs:int'.
After that i go and change the file size to 1201:
filesize="1202"
and this is the error:
Submission
The provided filesize "1201" and the actual filesize "" do not match
The filename is not 1 => should be 1.pdf?
Ok! it work!! now i have an other issue:
Errors occured:
Unknown uploader admin
see again the settings in the beginning of the convert.php file. You can define a username there. If you do not have an useraccount named "admin" then you can use any account name you happen to have. Of course using and admistrator account is a good idea.
Okey its working now! thanks you very much!!
You are welcome. Check the new release I did just 10 minutes ago. Details about the changes are in the readme file.
Element '{http://pkp.sfu.ca}revision', attribute 'filesize': '' is not a valid value of the atomic type 'xs:int'.
This is where the problem is, the filesize tag is empty