Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Change the XSLT output >Thread Next - Re: Change the XSLT output Re: Change the XSLT outputTo: NULL Date: 6/6/2005 9:29:00 AM I'm not clear on the exact syntax cause I don't use VB. But I've read
here before that you need to first use transformNodeToObject which
retains the UTF-16 encoding (internally I think VB uses UTF-8 for
string values unless you use toObject). Then you'd use the usual VB
stuff to convert the string value with your regular expression I
suppose.
Worth a try till somebody comes up with the right answer ;-)
Cheers - Neil
On Sun, 5 Jun 2005 12:31:01 -0700, Shahaf <guy@h...> wrote:
>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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
