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

Re: outputing tags

Subject: Re: outputing tags
From: Sam Carleton <sam@xxxxxxxxxxxxxx>
Date: Mon, 6 Jan 2003 11:42:54 -0500
outputing line break in xslt
On Mon, Jan 06, 2003 at 11:30:47AM -0500, Passin, Tom wrote:
> [ Sam Carleton]
> 
> > 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?
> > 
> 
> It is all a matter of what you start with and what you want to end up
> with.  The stylesheet transforms the one into the other.
> 
> So what do you want to end up with?  You say you want a "line break" in
> the XML, but XML inherently knows nothing about line breaks.  Perhaps
> you mean that you want to create html output that happens to be
> well-formed xml as well?  Then a <br/> element would just stay as is, if
> there is one in the source.   Otherwise, no one can answer you without
> knowing how to determine where line breaks should occur.

You are correct, I want the ,br/> in the html.
 
> In general, if you just want to echo some existing element content
> (complete with <br/> or other elements), you would use xsl:copy-of.  If
> you want to echo an element but change some of its child elements, use
> an identity transform where you specify templates only for the elements
> you want to change.  The FAQs and archives contain examples.

so that is what xsl:copy-of is for, I will look into that!
Thanks a millon!

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.