<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="text()"><xsl:value-of select="translate(normalize-space(concat('',.,'')),'','')"/></xsl:template>
<xsl:template match="exercise">
\begin{exercise}{<xsl:value-of select="@checkit-slug"/>}{<xsl:value-of select="@checkit-title"/>}{<xsl:value-of select="@checkit-seed"/>}<xsl:apply-templates/>\end{exercise}
</xsl:template>
<xsl:template match="statement">
\begin{exerciseStatement}<xsl:apply-templates/>\end{exerciseStatement}
</xsl:template>
<xsl:template match="answer">\begin{exerciseAnswer}<xsl:apply-templates/>\end{exerciseAnswer}
</xsl:template>
<xsl:template match="p">
<xsl:text>
</xsl:text><xsl:apply-templates/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="me">\[<xsl:value-of select="."/>\]</xsl:template>
<xsl:template match="md">
\begin{align*} <xsl:apply-templates select="mrow"/> \end{align*}
</xsl:template>
<xsl:template match="mrow"><xsl:value-of select="."/> \\</xsl:template>
<xsl:template match="m">\(<xsl:value-of select="."/>\)</xsl:template>
<xsl:template match="ul">
\begin{itemize}<xsl:apply-templates select="li"/>
\end{itemize}
</xsl:template>
<xsl:template match="ol">
\begin{enumerate}[(a)]<xsl:apply-templates select="li"/>
\end{enumerate}
</xsl:template>
<xsl:template match="li">
\item <xsl:apply-templates/>
</xsl:template>
<xsl:template match="c">\verb|<xsl:value-of select="."/>|</xsl:template>
<xsl:template match="url">\verb|<xsl:value-of select="@href"/>|</xsl:template>
</xsl:stylesheet>