I have elements:
Of course there are some elements without
/direction suffix that is importnat to mention.
If elements A and B contain string
/direction... I want to have the value before string
If elements do not contain
/direction then take regular value as usual.
What should I add in
value-of clause ?
<newElementA><xsl:value-of select="A"/></newElementA> <newElementB><xsl:value-of select="B"/></newElementB>
I tried with
<xsl:value-of select="substring-before(A,'/')"/> but then values which do not have value
/direction are set with value null which is not correct
I also tried this but then getting error:
<newelementA><xsl:value-of select="if (contains(A,'/')) then substring-before(A,'/') else A"/></newelementA>
I want to have values
110 in result.