7

Several validators, such as the one by the W3C, can validate an HTML (or XHTML) page against the W3C spec. Are there any validators that are extensible? That is, I'd like to not only validate against the spec, but I'd like to also validate against additional elements and/or attributes. I'd like to be able to specify these additions without programming if possible; adding them to a database or XML file or a config file would be fine.

Thanks for any suggestions.

james.garriss
  • 12,959
  • 7
  • 83
  • 96
  • 1
    +1 Good Question, I've often found myself in a spot where I would like to validate my code based on some of my own rules and criteria. – Dan May 31 '11 at 17:43
  • Follow-up question: Is anyone extending the W3C's validator? Lessons learned would be helpful. – james.garriss Jun 27 '11 at 12:11

2 Answers2

1

There isn't anything like it that I know

dynamic
  • 46,985
  • 55
  • 154
  • 231
0

If you can specify what you want as an XML schema, then you should be able to use a normal XML validator

Yuliy
  • 17,381
  • 6
  • 41
  • 47
  • I agree with @delnan. If I were only going to validate against XHTML, this would work. But I want to be able to validate against HTML 4 and HTML5 as well. – james.garriss May 31 '11 at 17:57