Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Maneesh Kothari 3 posts 73 karma points
    Apr 16, 2019 @ 10:23
    Maneesh Kothari
    0

    Solution to write XSLT

    Hi,

    I have below XML format.

    And I have to extract value from tag NAMENUM on the basis of delimiter(.) .I need a out after applied XSLT.

    <PNRNames>
        <PNRName>
            <PNR_ID>1125280434952240</PNR_ID>
            <NAMENUM>2</NAMENUM>
            <suffix>10<suffix>
            <prefix>2</prefix>
            <FIRSTNAME>JEFFREYBRIAN</FIRSTNAME>
            <LASTNAME>MINEAR</LASTNAME>
            <STATINFO/>
        </PNRName>
    </PNRNames>
    

    I am new in xslt.your help really appreciable

  • Maneesh Kothari 3 posts 73 karma points
    Apr 16, 2019 @ 10:42
    Maneesh Kothari
    0

    I find the solution .

    Thanks

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Apr 16, 2019 @ 10:51
    Jan Skovgaard
    0

    Hi Maneesh

    Great to see you found the solution to your issue/challenge.

    Could you perhaps share your solution in case others face the same challenge as you at some point? :-)

    Happy coding!

    /Jan

  • Maneesh Kothari 3 posts 73 karma points
    Apr 23, 2019 @ 18:14
    Maneesh Kothari
    0

    Use substring-after and before like below.

                     <xsl:value-of select="substring-after(NAMENUM,'.')"/>
                    </passengerNumber>
                    <prefix>
                     <xsl:value-of select="substring-before(NAMENUM,'.')"/>
                    </prefix>
                    <suffix>
                    <xsl:value-of select="substring-after(NAMENUM,'.')"/>
                    </suffix>
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies