On Fri, 05 Nov 2004 15:03:02 +0100, Martin Honnen wrote:
[color=blue]
> Jesper Stocholm wrote:[color=green]
>> On Fri, 05 Nov 2004 14:43:52 +0100, Martin Honnen wrote:
>>
>>[color=darkred]
>>>Jesper Stocholm wrote:[/color]
>>
>>[color=darkred]
>>>>What am I doing wrong?
>>>
>>>Hard to tell, maybe you can post the URLs of a short XML sample and XSLT
>>>demonstrating the problem. I see nothing wrong in that XSLT snippet you
>>>have above but the problem could be with your XML input.[/color]
>>
>>
>> the content is located at
http://blog.stocholm.dk
>>
>> When displayed in IE the result is as expected - but not in FireFox[/color]
>
> You are transforming to XHTML but inside that template you call the
> <br/> elements are in the null namespace so make that[/color]
aah ... :o)
[color=blue]
> <xsl:template name="break">
> <xsl:param name="text" select="."/>
> <xsl:choose>
> <xsl:when test="contains($text, '
')">
>
> <xsl:value-of select="substring-before($text, '
')"/>
> <br xmlns="http://www.w3.org/1999/xhtml" />
> <xsl:call-template name="break">
> <xsl:with-param name="text" select="substring-after($text,'
')"/>
> </xsl:call-template>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="$text"/>
> </xsl:otherwise>
>
> </xsl:choose>
> </xsl:template>
>
> and it should work.[/color]
It did, thanks.
[color=blue]
> By the way, to output a DOCTYPE node you shouldn't use disable output
> escaping but rather the <xsl:output> element.[/color]
Ok - I see your point. I changed it to
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
encoding="ISO-8859-1"
method="html"
/>
And the above now also looks as intended in FireFox.
Thanks for your help and have a nice weekend,
:o)
--
Jesper Stocholm
http://stocholm.dk
"Man knepper ikke en anden ridders mø"