xsl-list
[Top] [All Lists]

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

2006-09-18 03:43:59
Apologies for not appearing in the correct thread. I was subscribed to
the digest version and could not reply to the message.
 
On Fri, 15 Sep 2006 13:37:17 +0100, David Carlisle wrote:
My problem is that the <?xml version="1.0" encoding="UTF-8" ?> which
should appear at the top as a header, doesn't.

Is that really a problem? the xml declaration is optional.

Well, as far as I can see it is the problem, or rather a problem with
excel. 

My reasoning: I generate a file on the web server and send out it to the
client as a file via response.writefile(). If i intervene and modify the
file manually before sending it and add the single line <?xml
version="1.0"?> at the top, excel opens the file and treats it as an xml
file in excel format and handles all the styles correctly etc.

If this line is missing, excel opens it as a generic xml file and
displays the node structure in tables.

Also are you sure that you are outputting in utf8?

This was an error, thanks for picking it up, hadn't noticed it.

It makes no difference to open the file directly from excel (file/open)
or from the shell (typing filename.xml will open excel directly due to
the application directive), in each case if the line in question is
missing it fails to recognise the format correctly.

Now the question is, who is responsable for putting this header in
place? From what I know it should be the .net 1.1 xsl libraries I use to
do the transform, no? I've been searching the docs and can't find any
reference to enabling or disabling the production of this header, though
I could be looking for the wrong thing.


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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>