xmllint validation error “no DTD found” while using XSD

五迷三道 提交于 2019-11-29 03:32:36

--valid is for DTDs, not XSDs.

This will work for you instead:

xmllint --noout --schema http://lucas.ucs.ed.ac.uk/xml-schema/xmlns/simple.xsd lucas-basic.xml

The OP attempt and accepted answer "validate" the XSD by testing it against a sample file. To validate the XSD file against the XSD specification, the following command may be used:

xmllint --noout --schema http://www.w3.org/2001/XMLSchema.xsd my_schema.xsd

... and for v1.1 the schema is https://www.w3.org/2009/XMLSchema/XMLSchema.xsd

NOTE: the v1.0 schema has some qualifications at the top about the normative structure schema so it's possible another file should actually be used but this worked fine for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!