XML : In XSLT, how do I truncate a string of numerals and add space before letters?

I have such input:

  <?xml version="1.0" encoding="UTF-8"?>  <Article>      <ProductNr>70001</ProductNr>      <ProductNr>70001A</ProductNr>      <ProductNr>70002I</ProductNr>      <ProductNr>70002II</ProductNr>      <ProductNr>70002.1</ProductNr>      <ProductNr>70002.2</ProductNr>      <ProductNr>70123</ProductNr>      <ProductNr>70125A</ProductNr>  </Article>    

I have Product Numbers and I want to transform it to Chapter Numbers. I snipped of an XML output below. What I need to to is to remove 70+ prefix and add space between number and letters. Do nothing with dots. Please help!

  <?xml version="1.0" encoding="UTF-8"?>  <Article>      <ChapterNr>1</ChapterNr>      <ChapterNr>1 A</ChapterNr>      <ChapterNr>2 I</ChapterNr>      <ChapterNr>2 II</ChapterNr>      <ChapterNr>2.1</ChapterNr>      <ChapterNr>2.2</ChapterNr>      <ChapterNr>123</ChapterNr>      <ChapterNr>125 A</ChapterNr>  </Article>    

No comments:

Post a Comment