0

People seem to have bumped into "no DTD found" often, see for example xmllint validation error "no DTD found" while using XSD

The answer is simple: --valid is only for DTDs. XSDs need to be passed explicitly with --schema.

That is clear. My question is, why is it like that? Is it just not implemented, or is there a technical reason for this?

I have not managed to find an answer to this question, but mind you I am very unfamiliar with XML...

Sergio Losilla
  • 730
  • 1
  • 5
  • 14
  • Man page says `--schema Use a W3C XML Schema file named SCHEMA for validation` so both option perform validation. Name might be related to historical reasons. – LMC Oct 20 '21 at 20:40
  • The difference is that with `--valid` you do not need to specify a schema: it is read from the XML file itself. – Sergio Losilla Nov 08 '21 at 11:06

0 Answers0