1 "============================================================================
3 "Description: Syntax checking plugin for syntastic.vim
4 "Maintainer: Sebastian Kusnier <sebastian at kusnier dot net>
5 "License: This program is free software. It comes without any warranty,
6 " to the extent permitted by applicable law. You can redistribute
7 " it and/or modify it under the terms of the Do What The Fuck You
8 " Want To Public License, Version 2, as published by Sam Hocevar.
9 " See http://sam.zoy.org/wtfpl/COPYING for more details.
11 "============================================================================
13 " You can use a local installation of DTDs to significantly speed up validation
14 " and allow you to validate XML data without network access, see xmlcatalog(1)
15 " and http://www.xmlsoft.org/catalog.html for more information.
17 if exists("loaded_xml_syntax_checker")
20 let loaded_xml_syntax_checker = 1
22 "bail if the user doesnt have tidy or grep installed
23 if !executable("xmllint")
27 function! SyntaxCheckers_xml_GetLocList()
29 let makeprg="xmllint --xinclude --noout --postvalid " . shellescape(expand("%:p"))
30 let errorformat='%E%f:%l:\ error\ :\ %m,
31 \%-G%f:%l:\ validity\ error\ :\ Validation\ failed:\ no\ DTD\ found\ %m,
32 \%W%f:%l:\ warning\ :\ %m,
33 \%W%f:%l:\ validity\ warning\ :\ %m,
34 \%E%f:%l:\ validity\ error\ :\ %m,
35 \%E%f:%l:\ parser\ error\ :\ %m,
39 let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })