473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

xml/xslt, .net 2.0, whitespace, output to text file

I'm having a problem with line feeds in an xslcompiledtransform in .net 2.0.
I'm trying to use xsl to transform xml to a text file that can be read on a
Unix box. The problem is that when I insert a line feed, it always results
in a carriage-return/linefeed - the Unix box does not like this. I've tried
different encoding settings and using hex/dec/html values for line feed but
the result is always CRLF as viewed in a hex editor.

here's the code that pertains to my issue if anyone can help

XSL Transformation code
Dim fs As New IO.FileStream(f.FilePathWorkingFile & f.FileName &
f.FileTypeExtension, IO.FileMode.Create)
Dim oSw As New StreamWriter(fs)

Dim oXSLT As New System.Xml.Xsl.XslCompiledTransform(True)
oXSLT.Load("..\..\xsl\" & f.StylesheetName)
' output transformed xml to temp file
oXSLT.Transform(xmldoc, args, oSw)

XSLT File
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:dt="urn:schemas-microsoft-com:datatypes"
xmlns:myObj="urn:ms-kb">
<xsl:output method="text" />

inside of my templates I have
<xsl:text> </xsl:text>
and have tried
<xsl:text>
</xsl:text>
and
<xsl:text>
</xsl:text>
Thanks in advance for any help
Trent
Feb 16 '06 #1
0 1332

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron...
6
by: Pete | last post by:
I am just getting to grips with XML and I was wondering if you could help me with something that no-one seems able or willing to help with.. I have an XSLT file which should be transforming a...
1
by: Mark247 | last post by:
Hi, When transforming an XSLT to HTML I get a very annnoying white spac gap of about 2px under each image. This is particularly annoying as am creating a vertical navigation menu made up of images...
2
by: Daniel Walzenbach | last post by:
Hi I need to know how to transform a XML file by using a XSLT file. Consider the following XML file <?xml version="1.0" encoding="UTF-8" standalone="yes"?><LogFile><Dog TimeStamp="16.02.2004...
2
by: chris | last post by:
Hi there, I create an XML file from a dataset like this: System.IO.StreamWriter xmlSW = new System.IO.StreamWriter(FILENAME); dsUserData1.WriteXml(xmlSW, XmlWriteMode.WriteSchema);...
5
by: Praveen Mohanan | last post by:
Hi...All, I am new to XSLT. I have a XML file which need to be converted to another XML file for the client. I am using a XSLT . File 1 ------ <client name="abc" address="..." city="..."...
2
by: Scott Sauyet | last post by:
I'm trying to select a subset of a WSDL document using XSLT and a simple text document describing the high-level elements to include. I have it working fine for selecting the services, bindings,...
1
by: CAM123 | last post by:
I have added: <br><xsl:value-of select="Line" /></br> to my XSLT stylesheet to get a line per repeating block. When I view the output as XML it looks perfect - one line per block. However...
3
by: joelkeepup | last post by:
Hi, im trying to create a text email message using xslt template , the transforms work great, but the newlines and whitespace in the xslt doc are removed. Is there a setting somewhere I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.