Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How do I check the first 3 characters in an element?

$
0
0

I have the node below. I would like to check if the first 3 characters are not equal to 169.

How do I do it using xslt if test? e.g. substring(StatuteCode,1,4)="169") I think is is wrong.

<StatuteCode Word="169142a4">Running</StatuteCode>

my code

<xsl:choose><xsl:when test='(StatuteCode,1,4)="169")'><xsl:value-of select="true()"/></xsl:when><xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise></xsl:choose>



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>