| kaol ( @ 2009-07-28 12:05:00 |
I still wish to update the rest of my packages that need it. After that, I'll try to focus on metaxslt again.
The next problem I have with it is to come up with a template language for it. I could, in theory, get away with a thin layer over XSLT but I'd like to do better than that and come up with something more expressive. Also, I'd like to avoid having to support full XPath. A combinator library approach like Text.HTML should work, but I can't copy the design outright.
There would be three types of output for the language: XSLT as text, a function that returns HTML and a function that seeds the cache with resources. As an input it takes a description of available resources. I expect that the resources' description is static, so that it can know the types of resources beforehand and won't need to parse XML or walk through parse trees dynamically. Resources can have presentations as XML or internal Haskell types. I'd like it all use ByteStrings internally and not Strings. I'd be using Template Haskell for all this.
I can't make the template language a monad, since the control flow will need to be known at compile time. I'm still not sure if Control.Applicative could work. I spent some time looking into that, but found nothing conclusive. Applicative needs to work as a container, but I'm not sure what it would hold. Just using () would be pointless. I would be better off with a monoid, then. Monoid may work for some things, but I'll still need more combinators besides that.
That's a brain dump and a recap, mostly for myself. Hopefully I'll make better progress than what I did a few months ago, once I really get back to this. I dread that, just a little bit.
I shouldn't have anything to prove to myself.