0

What xslt methods are available to select text after several dots/characters in the textnode?

<con1:node>              
    <con2:node name="SomeName">
        <con2:path>'www.example.com.itsanexample.step1.step2.step3'</con2:path>
    </con2:node>
<con1:node>

For example www.example.com.itsanexample.step1.step2.step3

Where I want only the 4th word step1 as output.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
MypR
  • 49
  • 7
  • Well, find out which version of XSLT you want to use and then start with the documentation e.g. https://www.w3.org/TR/xpath-functions-31/ for the current version or https://www.w3.org/TR/xpath/#section-String-Functions if you are stuck with XSLT/XPath 1.0. – Martin Honnen Aug 29 '17 at 13:12
  • Thanks, I'm using the 1.0 version. Well I was trying to do that with substring, and it doesen't works. Like that's why I'm asking for advice what kind of methods are also usable. – MypR Aug 29 '17 at 13:47
  • If you're stuck with 1.0 and can't move to anything more recent, then check the str:tokenize named template on www.exslt.org. – Michael Kay Aug 29 '17 at 14:16
  • Thanks, for advices! – MypR Aug 29 '17 at 14:35

0 Answers0