[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] outputing tags


Subject: Re: [xsl] outputing tags
From: Sam Carleton <sam@xxxxxxxxxxxxxx>
Date: Mon, 6 Jan 2003 11:42:54 -0500

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