Help with Carriage Return in XSL 

P

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="'
'"/>
<xsl:value-of select="$cr"/>


Thank you!
Pia
 
P

Pia

Is there any way to do it at all? What did you mean by "reliable"?
That it depends on the parser? Just curious . . . .
 
R

Richard Tobin

Pia said:
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
 
D

Dimitre Novatchev [MVP XML]

Richard Tobin said:
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:eek:utput method="text"/>

Mike Kay was explaining long ago that whether to produce
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
 
P

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:eek:utput method="text"/>

Mike Kay was explaining long ago that whether to produce
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XSL Calculation 0
Digesting a table with XSL 2.0 2
XSL Grouping 0
Help with code plsss 0
carriage return 0
need some help with xsl / xml 2
Help with Loop 0
Help with XSL Document required 1

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top