[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: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Mon, 6 Jan 2003 15:53:14 -0000
xslt outputing
Hi Sam.

You also could use a specific node to wrap your quotes, something like:
<quote>
 <br>Some text that goes on first line</br>
 <br>Some text that goes on the second line</br>
</quote>

That way you can call whatever template you want to transform that in
the line feed you need (&_#10; or <br />).

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Sam Carleton
Sent: domingo, 5 de Janeiro de 2003 17:19
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Re:  outputing tags


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


 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.