[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problem with rendering of &#160

Subject: RE: Problem with rendering of &#160
From: Richard.McMillian@xxxxxxxx
Date: Thu, 15 Apr 2004 07:50:26 -0600
msxml2.domdocument load
I'm obviously doing something wrong with the transformNodeToObject code.
I get no output using the transformNodeToObject.

Dim Source As New Msxml2.DOMDocument
  Dim stylesheet As New Msxml2.DOMDocument
   Dim result As New Msxml2.DOMDocument
 
  ' Load data.
  Source.async = False
  Source.Load "sample.xml"

  ' Load style sheet.
  stylesheet.async = False
  stylesheet.Load "stylesheet1.xsl"

  ' Set up the resulting document.
  result.async = False
  result.validateOnParse = True
  
  ' Parse results into a result DOM Document.
  Source.transformNodeToObject stylesheet, result

   MsgBox result.xml

-----Original Message-----
From: Passin, Tom [mailto:tpassin@xxxxxxxxxxxx]
Sent: Wednesday, April 14, 2004 3:23 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Problem with rendering of &#160


> From: Richard.McMillian@xxxxxxxx [mailto:Richard.McMillian@xxxxxxxx] 

> This thread addressed the problem back in 2002.  Has anyone 
> come across a better solution?
> 
> http://www.biglist.com/lists/xsl-list/archives/200211/msg00172.html
> 

Sure, Julian Reschke posted it earlier today.  The MS component always
generates utf-16 when you use it to create strings instead of objects.
Thus there ends up being a mismatch between the declared encoding and
the actual encoding.

This is pretty much a FAQ by now, but until you posted your code no one
could tell what you were invoking the problem.

The solution is not to futz around with the meta element and trying to
trick the browser, but the generate the output using objects instead of
strings.

Once the encoding discrepancy is fixed, the presence of the meta element
will not cause any problems and could even be beneficial (as when the
document is loaded from a file, and thus has no headers to state the
encoding).

Cheers,

Tom P

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.