It is not general whitespace preservation that is at fault. It is just that there is no whitespace character in your input XML in the first place - and you never introduced any during the XSLT process.
An empty CDATA section (<![CDATA[]]>
) does not produce whitespace in your output XML.
Change your root
template definition to:
<xsl:template match="root">
<xsl:value-of select="FirstWord"/>
<xsl:text> </xsl:text>
<xsl:value-of select="SecondWord"/>
</xsl:template>
Edit:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="root">
<xsl:value-of select="FirstWord"/>
<xsl:text> </xsl:text>
<xsl:value-of select="SecondWord"/>
</xsl:template>
</xsl:stylesheet>
By the way, preserving space is the default action taken by the XSLT processor. So, actually you do not have to specify this.