(1) is there a way to avoid the variable? Yes, change
<xsl:variable name="pcredcodestore1" select="cred"/>
:......" but you'll have to look somewhere for the details.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference