Re: Problem in Mozilla for Displaying text from XSL variable

[email protected] Fri, 30 May 2008 02:41:14 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization http://groups.google.com
Message-ID <63611ef1-9d54-454a-b047-5bf01063e911@l17g2000pri.googlegroups.com>
On May 27, 10:41 pm, Jonas Sicking <[email protected]> wrote:
> > <xsl:call-template name="break">
> > <xsl:with-param name="str" select="$p"/>
> > <xsl:with-param name="breaker" select="'('"/>
> > </xsl:call-template>
> > <xsl:template name="break">
> > <xsl:param name="str"/>
> > <xsl:param name="breaker"/>
> > <xsl:choose>
> > <xsl:when test="substring-after($str, $breaker) = ''"/>
> > <xsl:value-of select="$str"/>
> > </xsl:when>
> > <xsl:otherwise>
> > <xsl:value-of select="concat(substring-before($str, $breaker),
> > $breaker)"/>
> > <br/>
> > <xsl:call-template name="break">
> > <xsl:with-param name="str" select="substring-after($str, $breaker)"/>
> > <xsl:with-param name="breaker" select="$breaker"/>
> > </xsl:call-template>
> > </xsl:otherwise
> > </xsl:template>
>
> > for more clearity go to this link
> >http://bytes.com/forum/thread786674.html
>
> > NOW THE PROBLEM is this, that in IE 6.0 its displaying all the points
> > in different row, but when i open that file in mozilla,it displays all
> > the points in a single row. can any one hlep me that how can it
> > display each point in different row in mozilla?
>
> Most likely the <br/> that you are creating is in the wrong namespace.
> Are you by any chance creating an XHTML result page? If so, you need to
> make sure that all created elements are in the XHTML namespace.
>
> I would strongly recommend using HTML as output, unless you know all the
> differences between XHTML and HTML.
>
> / Jonas

actually my template is this..

<xsl:template name="break">
        <xsl:param name="str"/>
        <xsl:param name="breaker"/>
        <xsl:choose>
          <xsl:when test="substring-after($str, $breaker) = ''">
            <xsl:variable name="last"><xsl:value-of select="$str"/></
xsl:variable>   </xsl:when>
          <xsl:otherwise>
          <xsl:variable name="s"><xsl:value-of
select="concat(substring-before($str, $breaker),$breaker)"/></
xsl:variable>

<table border="0" cellspacing="0" cellpadding="0" width="300">
		<tr>
		<td align="left" width="100">
<xsl:variable name="tmpStr_01" select="(substring-after($s,'('))"/>
																			<xsl:variable name="x"
select="number(substring-before($tmpStr_01,' '))"/>
																			<font color="black" face="Verdana, Arial,
Helvetica, sans-serif" size="2">
																			<xsl:value-of select="format-number($x, '0.00')"/>
																			</font>
			</td>
			<td align="left" width="100">
        <xsl:variable name="tmpStr_02" select="(substring-
after($tmpStr_01,' '))"/>
																			<xsl:variable name="y"
select="number(substring-before($tmpStr_02,' '))"/>
																			<font color="black" face="Verdana, Arial,
Helvetica, sans-serif" size="2">
																			<xsl:value-of select="format-number($y, '0.00')"/>
																			</font>
			</td>
			<td align="left" width="100">
        <xsl:variable name="tmpStr_03" select="(substring-
after($tmpStr_02,' '))"/>
																			<xsl:variable name="z"
select="number(substring-before($tmpStr_03,')'))"/>
																			<font color="black" face="Verdana, Arial,
Helvetica, sans-serif" size="2">
																			<xsl:value-of select="format-number($z, '0.00')"/>
																			</font>
			 </td>
		</tr>
		  </table>

             <xsl:call-template name="break">
                <xsl:with-param name="str" select="substring-
after($str, $breaker)"/>
                <xsl:with-param name="breaker" select="$breaker"/>
             </xsl:call-template>
          </xsl:otherwise>
          </xsl:choose>
      </xsl:template>

Now in IE 6.0 it shows all the points in different line but in Mozilla
it shows all the points in a single line.
so can anybody help me that how can be this work for Mozilla aslo.