XML > HTML via XSL(T)

Hi everybody,

I'm new to the list - seeing as my company has decided that I am the man to
make our XML documents available on the web via XSLT, I thought it might be
an idea to subscribe. :)

I'm working on a project which uses XSLT to transform the source XML from an
Oracle database to HTML for display on the web.

I've got my XSL sheet all up and running nicely without any major hitches,
but theres on pretty important thing that I just can't seem to work out how
to do.

A couple of parts of my XML file hold large chunks of text. When I view the
XML file, I can see that the text (in CDATA[]) is nicely formatted with
carriage returns. Obviously though, XSL strips out all extraneous
whitespace, so I just end up with these *huge* blocks of text with no
linebreaks.

Now, I know how to get XSL to preserve whitespace, but thats no good - the
text comes through still formatted, but obviously newline characters mean
nothing to HTML - what I need to do is convert the newlines to <br>s, or
<p>s, or whatever.

So, how can I do this with XSL? Convert newlines to <br> tags for the output
tree? This is driving me nuts!

Sorry if this is a really basic newbie question, but I can't seem to find
the answer anywhere.


Thanks,

Kerin

Received on Thursday, 24 May 2001 10:53:32 UTC