praveenvijayan / grunt-html-validation

W3C html validaton grunt plugin. Validate all files in a directory automatically.
MIT License
75 stars 39 forks source link

XML support? #31

Closed XhmikosR closed 5 years ago

XhmikosR commented 10 years ago

Hi.

I was trying to automate my rss.xml validation through this plugin but it doesn't work right.

Are XML files supported? An example is this which passes the W3C online validator.

validation: {
    options: {
        charset: "utf-8",
        reportpath: false,
        reset: true
    },
    html: {
        options: {
            doctype: "HTML5"
        },
        src: ["_site/**/*.html"]
    },
    xml: {
        options: {
            doctype: "XML"
        },
        src: ["_site/**/*.xml"]
    }
},

Output:

C:\Users\xmr\Desktop\mpc-hc.org>grunt validation:xml
Running "validation:xml" (validation) task
Validation started for.. _site/rss.xml
1=> "delimiter \">\" invalid: only name, \"#IMPLIED\" and parameter separators a
re allowed" Line no: 2
2=> "cannot continue because of previous errors" Line no: 2
No of errors: 2
Validation started for.. _site/sitemap.xml
1=> "delimiter \">\" invalid: only name, \"#IMPLIED\" and parameter separators a
re allowed" Line no: 3
2=> "cannot continue because of previous errors" Line no: 3
No of errors: 2

Done, without errors.

Thanks in advance.