[Haskell-cafe] Elegant & powerful replacement for CSS

wren ng thornton wren at freegeek.org
Tue Feb 3 16:33:38 EST 2009


Thomas Davie wrote:
> I can imagine the styling language having the meaning "function from 
> documents onto geometry", but the document description language is 
> harder.  Ideally what I'd like to do with it is to make it describe 
> *only* the logical structure of the information being conveyed – 
> sections, text, figures, tables (no, not for layout, for tabular data) 
> etc.  I can't though come up with a nice simple solution to that that 
> (a) restricts users to really describing documents, not layout (b) still 
> allows for composability in any sensible kind of way.

I can see LaTeX as demonstrating that there is no such (single) 
language. It seems to me that the elementary units (chapters, sections, 
paragraphs,...) depend almost entirely on the domain of the document (a 
book, an article,...). In a similar way, many of the most painful 
examples of HTML come from people bludgeoning the elementary units into 
misservice. XML escapes from this by only providing a syntax/ontology 
rather than a language per se.

So it seems to me that a general document framework should be an 
ontology of what primitives could exist, rather than a set of actual 
primitives. Of course, an ontological framework is no good without some 
collection of example languages it describes. One of the big tricks here 
is not in what languages look like in isolation, but in how languages 
can be combined or extended.

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list