Search code examples
stringxsltxslt-2.0

Select part of String in XSLT


I want to select part of a String using xslt.

Input :

p:endnote_bl1
p:endnote_bl2
p:endnote_bl3
p:endnote_bl4

Output Should be :

endnote_bl1
endnote_bl2
endnote_bl3
endnote_bl4

Can I do this using split or something else? I am using XSLT 2.0


Solution

  • Use replace function

    replace('p:endnote_bl1', '^[^:]*:', '')