Xslt transform on special characters -


I have an XML document that contains an '& amp; in this. It is called for a web service from .NET and the correct encoding & amp; Amp; Comes to the wire with

.

  T & amp; Amp; O  

I need to use XSLT to make a change again, but SQL needs to be queryed without encoding through SQL to go to T & O DB like ampersand Will happen.

(Note that all this is to be done through XSLT, at this point I have the option of using .NET encoding)

Cheers

Cheers

If you have to use .NET So you can convert between HTML-encoded and regular string (this code is the system.):

  string HTML encoded text = system. Web. HTTPITY.HTMLMode ("T & O"); String text = system. Web. HTTTY Html code (html encoded text);  

Update

Because you have to do this in plain XSLT, you can use xsl: value-of To decode HTML encoding:

  & lt; Xsl: variable name = "test" & gt; & Lt; Xsl: Select Value = "'T & amp; O'" /> & Lt; / XSL: variable & gt;  

variable string ($ test) will have value T & O . You can pass this variable as the argument of your extension function.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

kernel - How to create a "Block device" in Windows -