469,267 Members | 1,003 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

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 24476
* 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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dr. Laurence Leff | last post: by
4 posts views Thread by Josh | last post: by
2 posts views Thread by Shailendra Batham | last post: by
3 posts views Thread by Milsnips | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.