0

I am using XSLT 1.0, Apache Software Foundation (Xalan XSLTC) processor. I am not supposed to use XSLT 2.0. I have the following xml in which the value of <prvNum> has some special characters.

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <prvNum>SPECIAL#1&amp;</prvNum>
</root>

Now I want to perform percent-encoding for the value of <prvNum>. For example the value should be changed as below after percent encoding:

SPECIAL%231%26

My output xml should looklike below:

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <prvNum>SPECIAL%231%26</prvNum>
</root>

Can anybody tell me how do that?

Ashok.N
  • 1,327
  • 9
  • 29
  • 64
  • I suggest an edit to add the *xslt* tag. Xslt programmers respond quickly. Also an edit to better describe desired output. I haven't figured out what you want. – Paulb Feb 10 '17 at 14:56
  • @Paulb, Added `xslt ` tag and desired output xml – Ashok.N Feb 10 '17 at 15:07
  • You already posted two other questions about this issue, [here](http://stackoverflow.com/q/42158893/1987598) and [here](http://stackoverflow.com/q/42111117/1987598). Why create a third one? – Mathias Müller Feb 10 '17 at 16:03
  • @Mathias Müller, True, but one of those questions is using XSLT 2.0 and the other one is about using XSLT 1.0. But this question is about doing the same thing using XALAN processor. That's the difference. ..Thanks – Ashok.N Feb 11 '17 at 01:31

0 Answers0