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

Fix DTD validation #143

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Fix DTD validation #143

wants to merge 17 commits into from

Conversation

withanage
Copy link
Contributor

@withanage withanage commented Sep 6, 2019

Hi @MartinPaulEve ,

In the metadata.xsl we had JATS-journalpublishing1.dtd which should be a local file, although we do not have the schema in the generated folder.

NLM maintains the DTD in a CDN manner, which can be automatically extracted for validation.

Another solution would be to copy the DTD from the runtime folder to each generated NLM folder, which may add extra storage, what I thought users would not like.

Additionally, I added two namespaces, xlink and mml, which are common in JATS files so that an automated validation is possible, even though some files may not have mml.

Best wishes,
Dulip

@MartinPaulEve
Copy link
Owner

Hi Dulip,

Sorry for the MASSIVE delay here, but this is giving me some very weird results on test 510 and 513: XTDE0820: Invalid element name. Invalid QName {2} among others.

Starting test: Tests.Section Headers.510 Complex headings
20200102 17:30:08.874 : INFO :
Starting process:
python ../bin/meTypeset.py docx ComplexHeadings.docx ./510 -d --nogit
20200102 17:30:08.876 : INFO : Waiting for process to complete.
20200102 17:30:09.043 : INFO : Process completed.
20200102 17:30:09.044 : INFO : ${result} = <result object with rc 1>
20200102 17:30:09.045 : INFO :
20200102 17:30:09.045 : INFO :
Traceback (most recent call last):
File "../bin/meTypeset.py", line 43, in
from frontmatterparser import *
File "/home/Mounts/linuxfilesssd/Documents/Programming/meTypeset/bin/frontmatterparser.py", line 45
print guess2score.iteritems()
^
SyntaxError: invalid syntax
20200102 17:30:09.046 : FAIL : IOError: [Errno 2] No such file or directory: u'./510/nlm/out.xml'
20200102 17:30:09.047 : INFO : Directory '/home/Mounts/linuxfilesssd/Documents/Programming/meTypeset/tests/510' does not exist.
Ending test: Tests.Section Headers.510 Complex headings

Starting test: Tests.Section Headers.513 Renesting mechanism
20200102 17:30:09.048 : INFO :
Starting process:
python ../bin/meTypeset.py docx Renesting.docx ./513 -d --nogit
20200102 17:30:09.051 : INFO : Waiting for process to complete.
20200102 17:30:09.107 : INFO : Process completed.
20200102 17:30:09.108 : INFO : ${result} = <result object with rc 1>
20200102 17:30:09.109 : INFO :
20200102 17:30:09.109 : INFO :
Traceback (most recent call last):
File "../bin/meTypeset.py", line 43, in
from frontmatterparser import *
File "/home/Mounts/linuxfilesssd/Documents/Programming/meTypeset/bin/frontmatterparser.py", line 45
print guess2score.iteritems()
^
SyntaxError: invalid syntax
20200102 17:30:09.110 : FAIL : IOError: [Errno 2] No such file or directory: u'./513/nlm/out.xml'
20200102 17:30:09.111 : INFO : Directory '/home/Mounts/linuxfilesssd/Documents/Programming/meTypeset/tests/513' does not exist.
Ending test: Tests.Section Headers.513 Renesting mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants