I have an xsl file with the following two lines

<xsl:attribute name="width"><xsl:value-of select="imagesize/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
I want to test for the value of imagesize/@width and set the values of width and height if the test condition is meet.

I have tried the following without success

<xsl:choose>
<xsl:when test="350 &gt; imagesize/@width">
<xsl:attribute name="width"><xsl:value-of select="420"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="560"/></xsl:attribute>
</xsl:when>
<xsl: otherwise>
<xsl:attribute name="width"><xsl:value-of select="imagesize/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="imagesize/@height"/></xsl:attribute>
</xsl: otherwise>
</xsl:choose>
I have also tried

<xsl:when test="350 &gt; <xsl:value-of select=<xsl:value-of-select='imagesize/@width'/>">
Can someone please help?