Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2013, 09:03 AM
Registered User
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default using msxsl.exe generate the file in utf-8 with BOM

Hi Experts



I am using an .xsl file which contain line as follows:-

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
when I parse the .xsl file using msxsl, it will generate the output file in utf_8 format without BOM.

what changes I need to make to generate the file in utf8 with BOM .

Please help me.

Thanks & Regards
Vikas
 
Old May 23rd, 2013, 09:34 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It might not be possible to do it with MSXML3. It's pretty old software, and in those days putting a BOM in a UTF-8 file wasn't customary.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old May 23rd, 2013, 09:40 AM
Registered User
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Experts


I am trying to genrate a header file .h that can be used in widow vased application where my compiler is C++ and I am using german chracter inside this file which need to be saved in utf-8 with BOM otherwise I am not able to use the said file in my application.
I am trying to generate the utf8 file with BOM using a a.xsl file whose contents are as follows:-


<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>

It is genrating the file in utf8 without BOM marker. I am not asking to write BOM in a utf8 file. Please tell me how I can generate the output in utf8 with BOM using the a.xsl file that uses msxsl program. I found by googling I can generate file with BOM by using the follow things:-
<xsl:output method="text" byte-order-mark="Yes" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>

But there is no change in the result.

Can anybody tell me how to generate the correct file.

Thanks & Regards
Vikas

Last edited by vikasmailsu; May 24th, 2013 at 01:52 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a icon file to my exe file Waterharbin C# 2008 aka C# 3.0 2 June 14th, 2011 07:10 AM
BOM Needs to be removed tracyamgray XSLT 1 July 15th, 2006 12:45 AM
Generate a summary from an XML file. Missing_Piece XSLT 1 May 2nd, 2006 04:58 AM
how to generate a text file using .NET? pooh2323 VS.NET 2002/2003 2 February 11th, 2004 11:30 AM
How to generate a text file? bebe XML 2 October 9th, 2003 10:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.