Alexei's Weblog

January 27, 2003

Even more software: MTValidate

Alexei Kosut @ 3:21 pm

It turns out that even though XML was not designed to be human-writable, humans write it anyway. Humans like me. In my weblog. And it seems like two out of three times I validate my XHTML, it doesn’t. Sometimes because I didn’t close a <li> tag, or because I keep forgetting that <blockquote> doesn’t nest inside <p>, but I also keep trying to embed links (usually to LiveJournal) without escaping & first.

There are probably lower-tech solutions to these problems, but mine was to take the source code to the W3C MarkUp Validation Service and hack it into a Movable Type plugin, so my entries can be automatically validated before I post them, and I can fix any parsing errors before they get published. You can download MTValidate along with my other MT plugins.

3 Comments »

  1. Quetions: What needs to be configured in validator.conf? How do I know if I have “The Perl modules and OpenSP programs required by the W3C source code.”

    Thank you!

    Comment by Joshua Kaufman — February 7, 2003 @ 3:09 pm

  2. You probably don’t really need to change anything in validator.conf, except that you’ll need to make sure SGML_Parser is set to the location of your copy of onsgmls.

    As for Perl modules, you’ll need to have all the modules installed that are listed on the W3C source page. If you use CPAN to install Perl modules, just tell it to install the latest versions of the listed modules and you’ll be fine.

    You’ll also need to install OpenSP if you don’t already have it, for the onsgmls SGML parser. If you already have version 1.5 or later of onsgmls on your system, you’re fine.

    Comment by Alexei Kosut — February 16, 2003 @ 2:56 pm

  3. Movable Type: validátor obsahu blogu Okrem odkazu na validátor môžete výsledky validátora vkladať priamo do príspevku (obsahu blogu) a tak ešte viacej zvýrazniť aký čistý kód píšete ;-) Takisto sa môže zvalidovať aj kód vašich príspevkov (entries), takže ešte pred publikovaním by ste mali…

    Trackback by spravodaj — November 11, 2003 @ 12:16 pm

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)


Note: Your comment is subject to moderation. If it does not appear immediately, it has been added to the moderation queue to be approved for posting.

Powered by WordPress