Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 822
xjtuzyc Avatar asked Dec 16 '10 04:12

xjtuzyc


2 Answers

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 http://infohost.nmt.edu/tcc/help/pubs/rnc/.

like image 134
mzjn Avatar answered Sep 18 '22 10:09

mzjn


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)

like image 32
antonj Avatar answered Sep 20 '22 10:09

antonj