happstack-server-6.1.4: Web related tools and services.



Functions to allow you to use XSLT to transform your output. To use this, you would generally design your happstack application to output XML. The xslt filter will then run an external tool which performs the tranforms. The transformed result will then be sent to the http client as the Response.

NOTE: This module is currently looking for a maintainer. If you want to improve XSLT support in Happstack, please volunteer!



xsltFile :: XSLPath -> FilePath -> FilePath -> IO ()Source

Note that the xsl file must have .xsl suffix.

xsltString :: XSLPath -> String -> StringSource

Uses the provided xsl file to transform the given string. This function creates temporary files during its execution, but guarantees their cleanup.

xsltFPS :: XSLPath -> [ByteString] -> [ByteString]Source

Performs an XSL transformation with lists of ByteStrings instead of a String.

xsltFPSIO :: XSLPath -> [ByteString] -> IO [ByteString]Source

Equivalent to xsltFPS but does not hide the inherent IO of the low-level ByteString operations.



:: (MonadIO m, MonadPlus m, ToMessage r) 
=> XSLTCmd

XSLT preprocessor. Usually xsltproc or saxon.

-> XSLPath

Path to xslt stylesheet.

-> m r

Affected ServerParts.

-> m Response 

Use cmd to transform XML against xslPath. This function only acts if the content-type is application/xml.

xsltproc :: XSLTCmdSource

Use xsltproc to transform XML.

saxon :: XSLTCmdSource

Use saxon to transform XML.