Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Change the XSLT output

From: guy@-------.---
To: NULL
Date: 6/5/2005 12:31:00 PM
Hi 

I need to change special characters after the transformation is complete in 
an ASP page.
The problem is that if I put the output in a variable the Japanese 
characters are changed to question marks.
I tried to define an "Msxml2.DOMDocument.4.0" object as the transformation 
target but it didn’t seemed to work (maybe because the output is not valid 
XML)
I would really appreciate suggestion on how to solve this problem.

This is the code that I’m currently using (without changing the charters):

Function transformXML(xmlString, xslURL, XSLMode)
	Dim xslt, xslDoc, xmlDoc, xslProc, xsltOutput
	Set xslt = server.CreateObject("Msxml2.XSLTemplate.4.0")
	Set xslDoc = server.CreateObject("Msxml2.FreeThreadedDOMDocument.4.0")
	Set xmlDoc = server.CreateObject("Msxml2.DOMDocument.4.0")
	Set xslProc = server.CreateObject("Msxml2.XSLTemplate.4.0")
	'xsl
	xslDoc.async = False
	xslDoc.Load xslURL
	Set xslt.stylesheet = xslDoc
	'xml
	xmlDoc.async = False
	xmlDoc.validateOnParse = False
	xmlDoc.loadXML(xmlString)
	'xslProcessor
	Set xslProc = xslt.createProcessor()
	xslProc.input = xmlDoc
	xslProc.addParameter "XSLMode", XSLMode
	xslProc.output = Response
	xslProc.transform()
End Function

I would like to find a way to run the next line on the output before 
flushing it as a response:

xsltOutput = Replace(xsltOutput, "â„¢", "â„¢")
xsltOutput = Replace(xsltOutput, "©", "©")
xsltOutput = Replace(xsltOutput, "®", "®")

Thanks,
	Shahaf



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent