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

XSLT error "Switch from current encoding to specified encodi

Subject: XSLT error "Switch from current encoding to specified encoding not supported"
From: "Friedlander, Hal" <Hal@xxxxxxxxxxxxxx>
Date: Wed, 2 Aug 2000 10:52:15 -0400
switch from current encoding
XSLT error "Switch from current encoding to specified encoding not
supported"

Attempting to transform XML source doc to XML result via XSL stylesheet
and MSXML.

I get the following error. "Switch from current encoding to specified
encoding not supported"
And ..encoding="UTF-16"?> is added to the <?xml version="1.0" declaration.

How do i prevent the "switch" and remove the encoding statement? Source
code is below. Thanks very much
-Hal Friedlander


XML SOURCE
<?xml version="1.0"?>
<book title="Essential XML">
  <author name='Don'   age='25' canadian='false'/>
  <author name='Aaron' age='19' canadian='false'/>
  <author name='John'  age='20' canadian='true'/>
</book>

XSL SOURCE
<?xml version='1.0' ?>
<doc xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xsl:version='1.0'><xsl:copy-of select='/book/author'/></doc>

ASP SOURCE
<%
Option Explicit

Dim oXML, oXSL

Set oXML = server.CreateObject("MSXML2.FreeThreadedDOMDocument")
Set oXSL = server.CreateObject("MSXML2.FreeThreadedDOMDocument")

Call oXML.load(Server.MapPath("msdnsample3.xml"))
if oXML.parseError.line > 0 then
	Response.Write oXML.parseerror.reason
	Response.End
end if

Call oXSL.Load(Server.MapPath("msdnsample3.xsl"))

if oXSL.parseError.line > 0 then
	Response.Write oXSL.parseerror.reason
	Response.End
end if

Call Response.Write(oXML.transformNode(oXSL))

Set oXSL = Nothing
Set oXML = Nothing
%>

RESULT XML SOURCE
<?xml version="1.0" encoding="UTF-16"?>
<doc>
<author name="Don" age="25" canadian="false" />
<author name="Aaron" age="19" canadian="false" />
<author name="John" age="20" canadian="true" />
</doc>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.