How do I display HeightFeet element?
Posted: Thu Dec 18, 2014 6:32 pm
Based on my xml code, I want to convert the HeightFeet number into inches.
I also want to check that the HeightFeet is not less than 48 inches and not greater than 95 inches.
How do I do this?
Can someone help me?
My xml code
Desired output
Output I am getting
xslt code
I also want to check that the HeightFeet is not less than 48 inches and not greater than 95 inches.
How do I do this?
Can someone help me?
My xml code
Code: Select all
<Party ID="1116666" InternalPartyID="1610656384">
<Gender Word="F">Female</Gender>
<HeightFeet>5</HeightFeet>
<WeightPounds>130</WeightPounds>
<EyeColor Word="BLU">Blue</EyeColor>
</Party>
Code: Select all
<nc:PersonHeightMeasure>
<nc:MeasureText>60</nc:MeasureText>
<nc:MeasureUnitText>inches</nc:MeasureUnitText>
<nc:LengthUnitCode>INH</nc:LengthUnitCode>
</nc:PersonHeightMeasure>
Code: Select all
<nc:PersonHeightMeasure>
<nc:MeasureText>NaN</nc:MeasureText>
<nc:MeasureUnitText>inches</nc:MeasureUnitText>
<nc:LengthUnitCode>INH</nc:LengthUnitCode>
</nc:PersonHeightMeasure>
Code: Select all
<nc:PersonHeightMeasure>
<nc:MeasureText>
<xsl:choose>
<xsl:when test="HeightFeet">
<xsl:value-of select="(HeightFeet*12) + HeightInches "/>
</xsl:when>
</xsl:choose>
</nc:MeasureText>
<nc:MeasureUnitText>
<xsl:text>inches</xsl:text>
</nc:MeasureUnitText>
<nc:LengthUnitCode>
<xsl:text>INH</xsl:text>
</nc:LengthUnitCode>
</nc:PersonHeightMeasure>