meTypeset icon indicating copy to clipboard operation
meTypeset copied to clipboard

Fix DTD validation

Open withanage opened this issue 5 years ago • 1 comments

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

withanage avatar Sep 06 '19 12:09 withanage

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

MartinPaulEve avatar Jan 02 '20 17:01 MartinPaulEve