Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

November 25, 2006

Bulletholes

This blog, as well as the String Coffee Table and the n-Category Café, are served as application/xhtml+xml to compatible browsers. They, therefore, need to be well-formed at all times. Otherwise, visitors will see a “yellow screen-of-death” instead of the desired content.

In order to ensure well-formedness, user-input is validated before it can be posted. A local copy of the W3C Validator is hooked into the “preview” function for comments and entries. And, in the case of comments, we rigourously enforce that comments validate before they can be posted.

That sounds great in theory. And, in practice, it seems to have worked quite well. One might even be forgiven for complacently thinking the arrangement bulletproof.

But, then Henri Sivonen came along1, to point out that one has been living in a fool’s paradise. The W3C Validator fails to even enforce well-formedness. Actually, the fault is not in the software written by the W3C, but in the onsgmls SGML parser, which has only limited support for XML.

Far from being bulletproof, it was quite trivial to introduce non-well-formed content onto these blogs. That none of the previous six thousand or so comments have done so can be attributed either to dumb luck, or to the essential goodness of humanity. Needless to say, neither can be counted upon.

So, as a quick and dirty hack, if the W3C Validator says your comment is valid, I run it through a real XML parser, just to be sure. It seem a bit redundant, and the XML parser bails at the first well-formedness error (so it could take several passes to catch all the well-formedness errors missed by the W3C Validator). A better solution would be for someone to fix OpenSP 1.5.2, to ensure that onsgmls actually checks for well-formedness, when operating in XML mode.

Update (11/27/2006):

It seems to me that there are only about 3 people in the world using it, but I might as well release an updated version of the MTValidate plugin.

Version 0.4 of the plugin incorporates a new configuration option in /plugins/validator/config/validator.conf . Setting

XHTML_Check  = 1

runs ostensibly “valid” comments through a real XML parser, ensuring that they really are well-formed. To use this option, you’ll need the XML::LibXML Perl Module.

The new version also incorporates yet more user-friendly error messages from version 0.74 of the W3C Validator.


1 In response to a bit of flamebait from Anne van Kesteren.

Posted by distler at 2:33 AM | Permalink | Followups (13)

November 24, 2006

Dalí Thanksgiving

melted turkey thermometer
Dalí Thanksgiving

Posted by distler at 3:57 PM | Permalink | Post a Comment

November 19, 2006

Bulk Validator

Validator Logo

Maybe everyone else knew about this, but I recently stumbled upon Validator, a bulk XML (including XHTML1) validator. It features a GUI interface for MacOSX and Windows and a commandline tool for Linux.

Hand it a file, and it will validate it. Hand it a directory, and it will happily recurse through all subdirectories, validating every XML file it can find.

At least on my system, I needed to install XML::LibXML. For commandline use, I added

alias validate '/usr/bin/perl /Applications/Validator.app/Contents/Resources/script /Applications/Validator.app \!$'

to my .cshrc file. Now I can do things like

validate ~/Sites/blog/ | grep -v "Valid\|Well-formed"

Sweet!


1 … and DocBook, SMIL, SVG, XML Schema, etc.

Posted by distler at 7:19 PM | Permalink | Followups (1)

November 16, 2006

Segal on QFT

I spent a delightful afternoon, yesterday, discussing quantum field theory, the renormalization group, and such matters with Graeme Segal. Earlier, he gave a nice talk in the Geometry and String Theory seminar on his approach to QFT.

Posted by distler at 4:37 PM | Permalink | Followups (6)

November 11, 2006

Localized

Frenkel, Losev and Nekrasov have put out Part I of a huge project to study topological field theories “beyond the topological sector.”

It sounds like we will spend some time discussing their work in the Geometry and String Theory Seminar, so it might be good to give a little summary here.

They’re interested in a set of related theories in various dimensions

  • d=1 : A certain supersymmetric quantum mechanics model, to be discussed below.
  • d=2 : A topological σ-model (the “A” model), which is related to Gromov-Witten Theory
  • d=4 : Topologically-twisted N=2 SYM, which is related to Donaldson Theory.

In each case, the field space, , is an infinite dimensional supermanifold (of bosonic and fermionic fields), with a nilpotent odd involution, Q. If one computes the expectation value of topological observables (functions on which are Q-invariant, modulo Q-exact), one finds that the computation localized on a finite dimensional subspace of