What causes the problem is that immediately after doing
<xsl:apply-templates select="type" />
you then do
<xsl:value-of select='normalize-space(translate(., "#xA;#xD;", ""))' />
so you process the contents of the element twice.
Write two separate template rules, one
<xsl:template match="column[type]"
and one
<xsl:template match="column[not(type)]"
to handle the two different formats for column.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference