Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem in Mozilla for Displaying text from XSL variable

0 views
Skip to first unread message

Parag.gu...@gmail.com

unread,
May 27, 2008, 1:11:32 AM5/27/08
to
I have one problem regarding displaying text from XML file.
I have a XSL variable named $p = (0 0 0) (0.82 0 0) (1.63 -0.01 0)
(2.63 -0.01 0) (3.63 -0.01 0) (4.63 -0.01 0) (5.63 -0.02 0) (6.63
-0.02 0) (7.63 -0.02 0) (8.6 -0.02 0)
This line contains X,Y,Z coordinates of 10 points.
for displaying each coordinate in a separate line.Like this....
(0 0 0)
(0.82 0 0)
(1.63 -0.01 0)
(2.63 -0.01 0)
(3.63 -0.01 0)
(4.63 -0.01 0)
(5.63 -0.02 0)
(6.63 -0.02 0)
(7.63 -0.02 0)
(8.6 -0.02 0)

i made a template

<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?

Anthony Jones

unread,
Jun 17, 2008, 4:21:48 PM6/17/08
to
<Parag.gu...@gmail.com> wrote in message
news:50a125f2-2d3a-4cb7...@l17g2000pri.googlegroups.com...

Try changing <br/> to <br />
Note the inserted space.

--
Anthony Jones - MVP ASP/ASP.NET


Jonas Sicking

unread,
Jun 18, 2008, 7:13:32 PM6/18/08
to
Are you by any chance trying to output XHTML (rather than HTML), but
failing to apply the XHTML namespace properly?

Note that if you output XHTML you need to put all the elements you are
outputting in the XHTML namespace, even in the stylesheet. This usually
means placing the xmlns attribute on the xml:stylesheet element.

The reason it works in IE is that IE always outputs HTML, even if you
request XHTML.

However I would strongly suggest that you create HTML rather than XHTML.
There are a lot of subtle differences between the two and you are likely
to run into more problems like this unless you know them well.

/ Jonas

0 new messages