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

Re: Re: outputing tags

Subject: Re: Re: outputing tags
From: Sam Carleton <sam@xxxxxxxxxxxxxx>
Date: Sun, 5 Jan 2003 12:18:41 -0500
xslt break
On Sun, Jan 05, 2003 at 11:34:09AM -0500, cknell@xxxxxxxxxx
wrote:
> It wasn't clear if you have all the answers you need, but in
> case you still need a solution to:
> 
> "Ok, then how do I do this:  I have my xml file with all the
> info I need in it.  There is one element named <quote> which
> contains quotes.  Some quotes need to have line break (
> <br>'s in HTML).  How do I denote a line break in the XML
> and then how do I transform it?"
> 
> the answer is that XML doesn't have a special element to
> denote a line break. XSLT will happily copy any new lines
> you put in your source document or ones that you introduce
> in the templates, but that can be confusing (people often
> get line breaks where they weren't expecting them because of
> this; see references to  <xsl:strip-space>,
> <xsl:preserve-space> and the normalize-space() function).
> 
> Since an element like "<br />" has no "meaning" in XML, and
> because it is a perfectly well-formed element, you can put
> them directly into your source document and they will be
> copied into the result tree (and eventually serialized to
> your browser where "<br />" actually does have a meaning).
> Or you could introduce it in the XSLT at the appropriate
> points.

Charles,

I guess I phrased my Q the wrong way.  I am aware of the fact
that the tags in XML have no specia meaning.  But like any
other programming language there seems to be right and wrong
ways of doing things.  

I am curious to know how others handle a situation I discribed
above.  I believe that I am going to run into this problem in
many places and would like to know the best solution.  Or at
least the auther of the replies best solution.

I do NOT feel that relying on the tradition linebreak is a
good idea.  I figured the best thing to do is denote a line
break in my XML the same way HTML denotes a line break.
Espically considering the target output is HTML.

Sam

 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.