Actually this is the kind of situation where template rules are least useful: generally "pull" processing (for-each) works better where the logic is defined by the output structure, "push" processing (apply-templates) where it is dictated by the input.
Your input has a lot of redundancy, for example field[1]/fieldtext has the same value for every plan. Let's assume you can trust this to be regular.
Assuming you are generating HTML, you want something like this (with <records> as the context item):
Code:
<xsl:variable name="r" select="."/>
<table>
<tr>
<td></td>
<xsl:for-each select="plan">
<td><xsl:value-of select="@planid"/></td>
</
</
<xsl:for-each select="plan[1]/field">
<xsl:variable name="p" select="position()"/>
<tr>
<td><xsl:value-of select="fieldtext"/></td>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue"/></td>
</
</
</
</table>