OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Missing "BR" Tags XSLT

[ Lists Home | Date Index | Thread Index ]

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@CraneSoftwrights.com
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:
    • Missing "BR" Tags XSLT
      • From: Strolia-Davis Christopher Contr MSG/MAT <Christopher.Strolia-Davis@wpafb.af.mil>



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS