472,333 Members | 1,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 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 24651
* 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...
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...
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...
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...
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...
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...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.