I was thinking about using Peter Thiemann's WASH (mentioned on that list) to generate my home pages, but I keep getting stuck on how to model the inputs. Mostly what I want to do is just to generate the navbars and so on automatically (I currently do it all manually), but I also want the program to be reusable.|
So I start writing an XML DTD to describe the input, but I soon realize that I don't know what the contracts are supposed to be for each element type. I think this is the really hard part about markup languages. The contracts are so ambiguous: most of the information is very human-centric (like addresses and people's names) or very display-centric (formatting issues), and so it is very hard to give a specification which says when a tag should be used and when not.
I first noticed this problem years ago when I was writing up some technical documentation in DocBook (in SGML). There are a lot of tags, many of them very similar, and though I'm sure the designers had an idea of when to use them and when not to, to me it was not clear at all. The problem is that, without knowing what application is going to process the DocBook document, it is very difficult to make these choices, even the choice of whether to use a tag or not. In a way, this is similar to the open/closed-world problem in type systems.