Closed kosloot closed 5 years ago
This is as such NOT an ERROR.
But Xmllint seems to disagree if a DOCTYPE is absent? So then these named character entities are not predefined by XML as such, unlike the numerical character entities I assume.
But: folialint ditches the !DOCTYPE producing:
Looks good to me, it replaces the entities, which is preferred, it's a UTF-8 document after all, may just as well use it. I don't care much about preserving them (it's semantically the same anyway).
To clarify: xmllint, folialint as well as foliavalidator require the DOCTYPE. This may come as a surprise to users. (although we know that some users, e.g. the Nederlab project DID add lots of entity definitions)
My concern was, if 'resolving' the DOCTYPE would also remove other relevant information. But probably not. xmllint does exactly the same.
side-note: foliavalidator could use a better error message:
Malformed XML!
is not informative.
Closing this. hoping @proycon improved the warning
At the moment, processing of FoLiA documents with a !DOCTYPE seems risky:
Given this file:
The XML parser (for instance in folialint) chokes:
XML-error: Entity 'eacute' not defined
foliavalidator says:This is as such NOT an ERROR.
xmllint
says the same:This can be solved by adding a !DOCTYPE with an ENTITY
Both xmlint and folialint now accept this document.
But: folialint ditches the !DOCTYPE producing:
So the entity IS resolved, but leaving out the DOCTYPE might be a problem in the future. Don't know... @proycon any opinion on this?