Altova Mailing List Archives

Re: [xsl] outputing tags

From: Sam Carleton <sam@-------------->
Date: 1/4/2003 3:36:00 PM
On Sat, Jan 04, 2003 at 06:43:46PM -0500, cknell@xxxxxxxxxx
> The XML sample you listed, is it the source which you are
> trying to transform, or is the the output you desire to
> receive? In either case, send us a sample of the other and
> it will be easier to help.

Sorry about that.  The XML is the source.  I would like the
output to look something like this:

<b>This is to be displayed<br/>This is a new line<br/>And this
is on a third line</b>

Someone else posted with the obvious correct answer.  I
thought I had tried it, but guess I hadn't.
> Rap yourself on the knuckles with a ruler! We do not output
> tags, we output a node tree comprised of elements (which are
> bounded by opening and closing tags).

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?


> -----Original Message-----
> From:     Sam Carleton <sam@xxxxxxxxxxxxxx>
> Sent:     Sat, 4 Jan 2003 14:35:39 -0500
> To:       XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  [xsl] outputing tags
> Folks,
> How do I output some tags?  The xml looks like this:
> <sometag>This is to be displayed<br/>This is a new                              
> line<br/>And this is on a thrid line</sometag>                                  
> Then I have a template like this:                                               
> <xsl:template match="sometag">                                                  
>         <b><xsl:apply-templates/></b>                                           
> </xsl:template>                                                                 
> How do I write a template that will output both of the                          
> <br/>'s? so that it is displayed the right way?                                 

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.