473,750 Members | 2,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I'm having a problem with line feeds in an xslcompiledtran sform 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 .FilePathWorkin gFile & f.FileName &
f.FileTypeExten sion, IO.FileMode.Cre ate)
Dim oSw As New StreamWriter(fs )

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

XSLT File
<?xml version="1.0" encoding="utf-8" ?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:ms="urn:s chemas-microsoft-com:xslt"
xmlns:dt="urn:s chemas-microsoft-com:datatypes"
xmlns:myObj="ur n: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 1353

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

Similar topics

0
2710
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 extension responsible for the xslt functions. The problem i have is that the obtained transformation is not the waited one. I try to proccess the same XML file with XSL file with a program called XMLspy and i obtained the desire and waited...
6
2747
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 straight XML file http://www.discovertravelandtours.com/test/templates/test.xml?Location=Germany To another XML file http://www.discovertravelandtours.com/test/templates/test2.xml?Location=Germany
1
2359
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 wit rollovers. I know why the space is there, I just dont know how t remedy the problem in my XSLT. The space is caused by the transforme HTML closing </a> being on the next line from the closing </img> ta and the closing </td> on the next line...
2
1979
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 10:04:48" ModifiedBy="Smith, Geoff"><NameOfDog>Fido</NameOfDog><Weight>10</Weight></Dog><Dog TimeStamp="16.02.2004 10:05:24" ModifiedBy="Scott, Al"><Color>Black</Color><Weight>12</Weight></Dog></LogFile By the magic of some XSLT file I want the...
2
5286
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); xmlSW.Close(); Which gives me this XML file: <NewDataSet>
5
3187
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="..." state=".." zip="....." />
2
3784
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, portTypes, and messages to use. But I'm stumped on how to get the xs:simpleType and xs:complexType elements filtered properly. I am not trying to do this in a generic way. The WSDL is generated by a tool in our backend system, and I know a fair...
1
3464
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 when I output the file to a text file, all the data is wrapping and at the end of each block I am getting the text part of the header included but not all of it. The text that appears is: <br xmlns:msxsl="urn:schemas-microsoft-com:xslt"...
3
4528
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 missed: My template is: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result- prefixes="msxsl">
0
8999
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9394
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4712
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.