<xsl:variable name="pi">
<xsl:value-of select="$pis[$count]"/>
</xsl:variable>
+ <xsl:variable name="pivalue">
+ <xsl:value-of select="concat(' ', normalize-space($pi))"/>
+ </xsl:variable>
<xsl:choose>
- <xsl:when test="contains($pi,concat(' ', $attribute, '='))">
- <xsl:variable name="rest" select="substring-after($pi,concat(' ', $attribute,'='))"/>
+ <xsl:when test="contains($pivalue,concat(' ', $attribute, '='))">
+ <xsl:variable name="rest" select="substring-after($pivalue,concat(' ', $attribute,'='))"/>
<xsl:variable name="quote" select="substring($rest,1,1)"/>
<xsl:value-of select="substring-before(substring($rest,2),$quote)"/>
</xsl:when>