How to use emacs nxml mode validate certain xml file using xsd schema?

4k Views Asked by At

I have installed GNU emacs 23.2.1, and nxml-mode-20041004.

I want to validate an xml file using an xsd file, but the emacs complain

No schema loader available for file extension `xsd'

How could I make this loader for xsd file extension?

Thanks for advice

2

There are 2 best solutions below

0
mzjn On

You cannot use a W3C XML Schema (xsd). Emacs nxml-mode validates XML documents using a compact syntax RELAX NG schema (rnc).

For more information, see https://www.gnu.org/software/emacs//manual/html_node/nxml-mode/Introduction.html.

0
antonj On

You can't, but you can try to convert the xsd schema to (rng/rnc), it's not a 100 % accurate, see this question: xsd to rnc (or rng) conversion (unix command line)