473,385 Members | 2,028 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,385 software developers and data experts.

XSLT2.0 Copy of CDATA into txt file under Windows and using it withUnix/Linux

Hello Experts,

I have a small problem with copy of CDATA sections.
(I'm using XSLT2.0 )

My output target is defined as txt.
In my xml source is a CDATA section to be put as it is into the output
text file.
This CDATA will be copied to the output by xsl:value-of or xsl:copy-
of.

The point is that the result text file is created on Windows but used
on Unix/Linux later on.

In the Unix world I see strange charcters im my text (like ^M) and
some line breaks are missing.
So I think this is a CRLF problem, because of the CDATA section and
text output.

Questions:
1) Is my assumption right ?

2) How to get the right output for Unix/Linux when running the
transformatio nunder Windows ?

May be I can declare the default output for CRLF for txt outputs
somehow.
I have used Altova in this case.

Any hint is welcome

Rolf
Jan 16 '08 #1
1 2572
Not an XML issue. Nothing to do with CDATA sections. Basic operating
system conventions.

Windows expresses line break as two characters: CR (ASCII 13, control-M)
followed by LF (ASCII 10, control-J).

Unix expresses line break as one character: LF.

When you move a text file from one platform to the other, it is your
responsibility to convert line breaks appropriately, either at the time
you move the file over or by telling the tools which one to expect (or
by picking tools that will accept either).

Note that an XML parser is an example of the latter. XML normalizes line
breaks, accepting any of several standard forms (including these) as
equivalent to a single LF character.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Jan 16 '08 #2

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

Similar topics

0
by: Isaac Councill | last post by:
Hello, This seems like a newbie question, but I couldn't find the answer on google. I've been using xsl to transform rdf files into runnable programs in another (non-markup) language. It's...
3
by: CarlosRivera | last post by:
I am using apache xerces J 2.5.0. I have \r\n feed combinations in the CDATA sections that get converted to \n (or rather \r gets lost. I am using sax parsing. I can see in the buffer that is...
4
by: Rich Wallace | last post by:
Hi all, I have an XML document fed to me from a third party app: <?xml version="1.0" encoding="WINDOWS-1252" ?> <GatewayPlan xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
0
by: shinde.shailesh | last post by:
Hi All, I have to develop xslt2.0 for transformation xml file which looks like below. In xslt2.0 looks fro "@langid", if @langid="en-US" than it generates output html file say output1 and if...
1
by: soccerdad | last post by:
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property...
3
by: Igor.Smirnov | last post by:
Hi, Why g++ in Linux does not call copy constructor at return statement? I have detected this at Sicentific Linux 4.1 (g++ v. 3.4.3) and Red Hat Linux 8.0 (g++ v. 3.2). Microsoft Visual...
4
by: rgw1 | last post by:
Hello, Can anyone help with this? I am using C# with IIS 6.0 on Windows 2003 Server. I am trying to copy a file over the network. It is attempting to copy a file on a NAS (external hard...
1
by: Christof Hoeke | last post by:
hi, I was wondering if there is any way to use XSLT2 or maybe even XQuery with "normal" CPython. Using Saxon/XSLT2 with Jython is no problem (I have not tried Saxon.NET with IronPython but suspect...
6
by: dkyadav80 | last post by:
Hi sir, I'm new about xml, javascript. I have two selection field(html) first is city and second is state. the city and state values should be store in xml file. when user select city then all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...

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.