W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2001

Re: XML > HTML via XSL(T)

From: Dave Pawson <daveP@dpawson.freeserve.co.uk>
Date: Thu, 24 May 2001 18:11:44 +0100
Message-Id: <5.1.0.14.2.20010524180618.02e73200@127.0.0.1>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>
At 03:54 PM 5/24/01, Kerin Cosford wrote:
>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, 


Hi Kevin. Whats your definition of 'on the web'?
In HTML? or via PDF?

If HTML
   go see www.mulberrytech.com/xsl for the xslt list.
else
   if PDF
      You've come to the right place.
   else
      I don't understand what 'on the web means'



>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.


See 1st if clause.


>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.

Don't source your data in CDATA sections?




>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.

See the xsl faq. www.dpawson.co.uk 
You're not the first!
Just to make it easy for you!
http://www.dpawson.co.uk/xsl/N8321.html#d44e37965




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

And others!




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

No daft questions, only daft people!

HTH DaveP
Received on Thursday, 24 May 2001 13:12:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT