我无法重现这个问题。此样式表:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="field">
<xsl:apply-templates select="@*"/>
</xsl:template>
<xsl:template match="@*">
<xsl:value-of select="concat(name(),': ',.,'
')"/>
</xsl:template>
</xsl:stylesheet>
输入:
<field type="math" size="12" unitText="%" unitPos="back"/>
输出:
type: math
size: 12
unitText: %
unitPos: back