Parser gets confused by DTDs
- Download https://github.com/AnIML/techniques/raw/master/ecd-trace.atdd
- rename it to .xml
- Download https://github.com/AnIML/techniques/raw/master/animl_unit_entities.dtd
- open the renamed xml inside eclipse
- You get a lot of
Element type "..." must be declared. - Now remove the line
<!DOCTYPE Technique SYSTEM "animl_unit_entities.dtd"> - Now the errors are gone (but you will see ones complain about missing entities defined in the DTD of course)
With intellij I have the same problem. I wonder if it's a valid DTD or if we need to set a xerces option to support it.
I can only tell that when parsing the file with JAXB there is no complaint even when validation against the XSD.
The only issue I faced was that java by default do not allow to load DTDs from any source so for development purpose I enabled the following setting -Djavax.xml.accessExternalDTD=all
I have the impression that it's the same issue https://www.oxygenxml.com/forum/post36904.html#p36904
I can parse and validate the files with JAXB no idea if it uses xerces under the hood at all :-)