Hi ,
I am receiving input like InputA=12345-678 in xsd element , i want to insertdata into two elements called outputA,outputB. I used substring before and ,substring after .
for inserting 12345 into outputA and 678 into OutputB
Please see below sample code
<xsl:template match="/">
<ns0:targetdata>
<ns0:outputA>
<xsl:value-of
select="substring-before(/ns0:exampleElement/ns0:InputA,'-')"/>
</ns0:outputA>
<ns0:outputB>
<xsl:value-of
select="substring-after(/ns0:exampleElement/ns0:InputA,'-')"/>
</ns0:outputB>
</ns0:targetdata>
</xsl:template>
But some times input coming like only 12345 with out separation that time data not inserting into OutputA.
My requirement is if input comes like 12345-678 then 12345 moved to outputA and 678 moved to outputB and input comes only 12345 then data moved to outputA
only.
Please send me sample code for that above requirement its very urgent.
Thanks in advance