I had to fix a few well-formedness errors in both your XML and your XSLT code.
I think the main difficulty here is knowing when to wrap a text node in <text:p> and when not. It's difficult to work out what all the rules are from such a small sample of text. It seems to me, for example, that you want the <text:p> wrapper for text that appears inside a <text> element, but not for text that appears inside an <a> element. That suggests you need different rules for the two cases:
<xsl:template match="text/text()">
<text:p><xsl:value-of select="."/></text:p>
</xsl:template>
<xsl:template match="a/text()">
<xsl:value-of select="."/>
</xsl:template>
However, I'm unable to generalize from this as to what the default rule for text nodes should be, or the rule for text nodes in other contexts - there's not enough data to go on.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference