Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL output in Unicode?

Status
Not open for further replies.

SMerrill

Programmer
Jan 19, 2002
145
US
My XSL output is in unicode. I would like it to be plain text. Furthermore, it is going to a UNIX machine, so the <CR><LF> at the end of each line will need to be changed to a <CR> I believe.
Can anyone help with either issue? Here is the header of my XSL file:

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?>
<xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot; <xsl:strip-space elements=&quot;*&quot; />
<xsl:eek:utput method=&quot;text&quot; indent=&quot;no&quot; />
<xsl:template match=&quot;/&quot;>
... etc.
Thanks,
Shaun Merrill
 
You can change your output from Unicode to ASCII by specifying an encoding on the output element:

Code:
<xsl:output encoding=&quot;ISO-8859-1&quot;/>

8859-1 is the &quot;Latin-1&quot; codepage, which is most useful in the US and Western Europe.

I can't help with the CR-LF problem. From what I've read, it's legal XML either way.

Chip H.
 
This works beautifully. Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top