[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
xml br
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.