Reputation: 35
I need to return phone number, but only if it is 10 digits. How do I modify the below to say 'only return the number if its truly 10 digits', otherwise return nothing?
<HomePhoneNumber>
<xsl:value-of select="ws:Additional_Information/ws:Home_Phone"/>
</HomePhoneNumber>
Thanks so much! Jenn
Upvotes: 1
Views: 167
Reputation: 70638
Try this.....
<xsl:value-of select="ws:Additional_Information/ws:Home_Phone[string-length(.) = 10]"/>
Upvotes: 1