[thelist] XSL carriage return replacement

Brad Miller brad at beldamar.com
Thu Aug 15 01:29:02 CDT 2002


--
~I am having an XSL problem. I am losing the carriage returns from the
~xml file. I know that there must be a way that I can replace the 

~with a <br /> or &lt; br /&gt; for the whole file not just one node. In
~other words I have multiple nodes in the xml that have
~carriage returns.

I am not sure that you can match &#10 using XPath.
I know you can use <xsl:text> to add carriage returns but you would need to
match a node for that.
You might want to look into the whitespace documentation on w3.org to see if
there is something else you can do.

You might also look at <xsl:preserve-space>. I know this will preserve the
amount of whitespace in an XML doc like this:

<text>    some    text    </text>

output:

    some    text

But I don't know if this would help with HTML output.

Everything I have read when refering to carriage returns talks about using
<xsl:text> so that might be your best bet for finding a solution.

Brad Miller
www.beldamar.com
www.x-etc.com
brad at beldamar.com
--
[ winmail.dat was deleted, please don't send attachments with your message. ]
--




More information about the thelist mailing list