grr
If possible I'd suggest not starting from there, your input is basically
broken, but if you have no control over the input then basically what
you need to do is decide on some heuristics that some piece of text
"looks like" HTML markup and so output it unquoted.
I really wouldn't use XSLT 1 for that, you want something with regexp
support, perl or XSLT2 draft (as implemented in saxon 8) or if you are
using xslt1 I'd look into whether your processor allows extension to
some language with regexp (javascript or java perhaps) just to handle
that text string.
In simple cases you could use
<xsl:value-of select="substring-before('.<a href="')/>
<a href="{substring-before(substring-after('.<a href'),'"')}">
etc etc with lots of substring before and after, but it gets very hard
to manage such code.
David