[Haskell-cafe] Haskell XSLT interpreter?

Colin Paul Adams colin at colina.demon.co.uk
Sat Feb 11 15:32:12 EST 2006


>>>>> "Neil" == Neil Mitchell <ndmitchell at gmail.com> writes:

    Neil> Hi, I don't know of any, but there may well be, I've never
    Neil> looked.

    Neil> It probably wouldn't be that difficult to do, since XSLT is
    Neil> a functional language. There is probably lots of code in
    Neil> HaXml you could reuse (since the syntax for XSLT is
    Neil> XML). The only slightly taxing thing would be that XSLT is
    Neil> not pure (see the document function), so you may have to put
    Neil> most of it in the IO Monad.

In what way is the document() function not pure?

In XSLT 2.0 at least, it is defined in such a way that it can be
implemented as a pure function.

That is, the static context is defined to include a mapping from URIs
to document nodes, and document() returns those document nodes that
it's argument nodes map to.
-- 
Colin Adams
Preston Lancashire


More information about the Haskell-Cafe mailing list