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

Re: Missing "BR" Tags XSLT


xsl fo br
0At 2004-01-20 14:14 -0500, Strolia-Davis Christopher Contr MSG/MAT wrote:
>I know this probably isn't the best forum for this, although, I would
>love to hear how the processor handles this, anyway, here's my question.

XSLT and XPath questions would be better posted to the following list:

   http://www.mulberrytech.com/xsl/xsl-list

There are a number of subscribers who would enthusiastically respond to 
such questions.

There is also an *excellent* FAQ at:

   http://www.dpawson.co.uk

>I have an XSLT that is transforming some data into HTML.

Unfortunately your posted examples weren't complete ... some missing 
attribute set declarations, though this isn't directly relevant to your 
post.  But be sure, though, to clear up *all* compile-time problems or you 
won't see any changes in your result.

>I am trying to
>generate some HTML code in a template, but for some reason, the BR tags
>are not being added to the result.  Strangely enough, if I do this in the
>XSLT in a literal way, it works just fine.

What do you mean by "literal"?

>I'm checking these out in the
>IE and Netscape browsers, and I get the same results for both, so I'm
>pretty sure it's not a bug.

Right ... it is incorrect use of XSLT for your expected result.

Your problem is at the end of here with the result-tree-fragment variable 
you are declaring and then using:

>         <xsl:call-template name="data-row">
>                 <xsl:with-param name="row-title">Problem 
> Area</xsl:with-param>
>                 <xsl:with-param name="row-value">
>                         <xsl:apply-templates 
> select="prb:problem-area/prb:entry" mode="blob-multi"/>
>                 </xsl:with-param>
>         </xsl:call-template>
>...
>         <xsl:template name="data-row">
>                 <xsl:param name="row-value"/>
>...
>                 <xsl:value-of select="$row-value"/>

You want <xsl:copy-of select="$row-value"/> to get the structure.  By using 
<xsl:value-of> you are only adding the string value of the variable to the 
result tree.

Note also you probably want an exclude-result-prefixes="prb" to clean up 
the output.

I hope this helps.

........................ Ken

--
North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-03-15
-          (San Francisco, CA): 3-day XSLT/2-day XSL-FO 2004-03-22
Asia        (Hong Kong, China): 3-day XSLT/2-day XSL-FO 2004-05-17
Europe       (Bremen, Germany): 3-day XSLT/2-day XSL-FO 2004-05-24
Instructor-led on-site corporate, government & user group training
for XSLT and XSL-FO world-wide:  please contact us for the details

G. Ken Holman                 mailto:gkholman@C...
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/x/bc


  • References:

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.