Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Change the XSLT output

From: guy@-------.---
To: NULL
Date: 6/7/2005 9:35:00 AM
Hi Neil 

I tried to use the transformNodeToObject and it works, but at the end Im 
facing the same problem. How to go over the output without moving it to a 
variable that will destroy the characters.

"Neil Smith [MVP Digital Media]" wrote:

> 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
> 
> 


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