473,320 Members | 1,865 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,320 software developers and data experts.

Help with Carriage Return in XSL 

Pia
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A.
Any ideas on how to do this? Right now, if I try the following, my
output only shows 0x0a:

<xsl:variable name="cr" select="'&#xD;'"/>
<xsl:value-of select="$cr"/>
Thank you!
Pia
Jul 20 '05 #1
5 24720
* Pia wrote in comp.text.xml:
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A.


There is no reliable way to do that.
Jul 20 '05 #2
Pia
Is there any way to do it at all? What did you mean by "reliable"?
That it depends on the parser? Just curious . . . .

Bjoern Hoehrmann <bj****@hoehrmann.de> wrote in message news:<40****************@news.bjoern.hoehrmann.de> ...
* Pia wrote in comp.text.xml:
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A.


There is no reliable way to do that.

Jul 20 '05 #3
In article <d9**************************@posting.google.com >,
Pia <pi**********@Yahoo.com> wrote:
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A.


XML parsers convert carriage-return to linefeed when they read in a
document, so putting a carriage-return in your XML output doesn't
do much good: it will turn back into linefeed when the XML file is
used.

Why do you want to do this?

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #4

"Richard Tobin" <ri*****@cogsci.ed.ac.uk> wrote in message
news:c0***********@pc-news.cogsci.ed.ac.uk...
In article <d9**************************@posting.google.com >,
Pia <pi**********@Yahoo.com> wrote:
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A.


XML parsers convert carriage-return to linefeed when they read in a
document, so putting a carriage-return in your XML output doesn't
do much good: it will turn back into linefeed when the XML file is
used.

Why do you want to do this?


He may want to produce non-xml output -- e.g.:
<xsl:output method="text"/>

Mike Kay was explaining long ago that whether to produce &#xD; or not is not
mandated in the XSLT spec and is implementation dependent -- e.g. may depend
on the workings of a specific Java VM, etc.
Cheers,

Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html
Jul 20 '05 #5
Pia
I want to produce text, that's exactly right. Are you saying I might
be able to use another java vm for a different result? How?


Why do you want to do this?


He may want to produce non-xml output -- e.g.:
<xsl:output method="text"/>

Mike Kay was explaining long ago that whether to produce &#xD; or not is not
mandated in the XSLT spec and is implementation dependent -- e.g. may depend
on the workings of a specific Java VM, etc.
Cheers,

Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

Jul 20 '05 #6

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

Similar topics

3
by: hb | last post by:
Hi, I need to use MSXML2.DOMDocument in my ASP page. The following is my code: xml.asp: ===== <% dim sx sx="<root><a>text1</a><b>text2</b></root>" dim xd
4
by: Dr. Laurence Leff | last post by:
I am writing a Java program to read in XML file, modify some elements slightly, and then write it out. That XML file is prepared in Docbook. It works fine, except that it is disturbing the...
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: Josh | last post by:
Hi, I'm using System.Data.DataSet.ReadXml to convert some xml from a webservice to a DataSet. The xml looks like: <?xml version="1.0"...
2
by: Shailendra Batham | last post by:
hi gurus I have a asp.net web services and in that i have a function which returns XmlDocument as the return value, when I test the service it works fine and I can see the XML. When I try to...
3
by: Milsnips | last post by:
hi there, i am currently using the following code to generate an XML object, then save it, then read the contents of the file - but i dont wanna save it, instead read it directly after i;ve...
5
by: Jim | last post by:
Below is my code, I'm opening an xml file and I have a chat name node within it. By default the node has a value of "mypc" for which I'm replacing and putting in a new value. I don't know if this...
6
by: rellaboyina | last post by:
Dear All, I am having some data which will be stored in XML format and this needs to be parsed using the parser module XML::Parser and XML::Parser::Expat. This data consists of some special...
1
by: sandeep kumar shah | last post by:
Hi friends, I have a problem while parsing an xml file. When the value of an attribute contains �D; it gives error but when we use &#xD; it's ok.. Could anyone plz tell me what is the difference...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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....

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.