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

encoding error when using cdata

Subject: encoding error when using cdata
From: Mike Stroud <stroudmw@xxxxxxxxx>
Date: Mon, 23 Feb 2009 11:13:27 +0200
 encoding error when using cdata
Hello all,

I've been experimenting with cdata because I've got some funny
characters in my XML files. I've got something like this:

<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<ChangedParts NAME="ChangedParts" TYPE="Unknown" STATUS="0">
<Part>
<Name>446RLi SMD ASSY</Name>
<description></description>
<LongDesc></LongDesc>

etc...

The XSL looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml" cdata-section-elements="Name
Description Longdesc"/>
<xsl:template match="/" xmlns:wc="http://www.ptc.com/infoengine/1.0">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

And the resultant XML turns out like this...

<?xml version="1.0" encoding="UTF-16"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">

etc...

I now get the following error: Switch from current encoding to
specified encoding not supported. Line: 1. <?xml version="1.0"
encoding="UTF-16"?>

Does anyone know how I can fix this? I've tried different encoding
methods in the XSL file, but they appear to be ignored.

Thanks,

Mike.

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.