carriage return in XML ---> <br /> in HTML - how ?

Subject: carriage return in XML ---> <br /> in HTML - how ?
From: "michael schwalm / exquinet" <michael@xxxxxxxxxxx>
Date: Fri, 22 Sep 2000 09:25:57 +0200
hello there
maybe someone can give me a hint on how to solve the following problem.
I have some newspaper articles as XML source. They look basically something
like this:

<Title>Headline of Artice</Title>

<Text>
    This is where the actual article starts. The article contains
    several paragraphs.

    Paragaraphs are separated by Carriage returns or Linefeeds, not by Tags
</Text>

I am now trying to write an XSL Stylesheet that formats this into nice HTML.
Of course, the Webbrowser is not interested by CR's or LF's and gives me the
resulting Article in one single line, possibly wrapping it. Looks awful of
course. The CR's and LF's are preserved in ths XSL transformation, I can see
them in my HTML source, but Browsers need the <br> or <p>  as it is well
known. I don't think there is a way to transform CR's to <br>'s but maybe
there is another approach that I should try. (I don't want to write a Perl
Skript that manipulates my XML Source first or something like that - this
workaround is not possible in the environment where i work).
Any ideas someone ?
Thanks a lot beforehand

have a nice day
Michael

Michael Schwalm




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread