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

outputting <?xml version="1.0" encoding="UTF-8" ?>

Subject: outputting <?xml version="1.0" encoding="UTF-8" ?>
From: "Ian Murphy" <ian@xxxxxxxxxxxxxx>
Date: Fri, 15 Sep 2006 14:23:25 +0200
xml version 1.0 encoding unicode
I'm generating an Excel xml file as output and I've got the following as
the beginning of my xsl sheet:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet
	xmlns:x="urn:schemas-microsoft-com:office:excel"
	xmlns:o="urn:schemas-microsoft-com:office:office"
	xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" version="1.0" encoding="UTF-8"
omit-xml-declaration="no"/>

<xsl:template match="/">
	<xsl:processing-instruction name="mso-application">
		<xsl:text>progid="Excel.Sheet"</xsl:text>
	</xsl:processing-instruction>

My problem is that the <?xml version="1.0" encoding="UTF-8" ?> which
should appear at the top as a header, doesn't. Anyone got any
suggestions as to why this would be? I've checked though dpdawsons site
and spent several hours trawling google without getting anywhere.

I'm using vb.net 1.1 to do the transforms and feed files them out via
iis. I generate the file using the following (abreviated) code:

	oXmlTxtWrt = New XmlTextWriter(oFsXML,
System.Text.Encoding.Unicode)
	oXslTran = New Xml.Xsl.XslTransform
	oXslTran.Load(strXSLFile)
	oXPathNavigator = oXPath.CreateNavigator
      oXslTran.Transform(oXPathNavigator, Nothing, oXmlTxtWrt, Nothing)

My file is correctly formatted, except for the missing xml header. It
must be something obvious but I just can't see it.

Thanks

Ian Murphy
Integra XP
http://www.integra-xp.com
00 34 94 621 5265

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.