Subject: [xsl] Recursion problem with Firefox From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx> Date: Wed, 2 Nov 2005 07:23:21 -0800 |
Hi list, My input dataset has 69 lines, but when I display it with Firefox (1.0.7, win2000pro), it shows me only the first 57 lines (no error msg). It works fine with SAXON 6.5.4 however. It seems to me to be a storage restriction in connection with the recursion occurring to process nested lists (ul). But what can be limited to less than 5k ? What can I do to improve my stylesheet? <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" omit-xml-declaration="yes" indent="yes"/> <xsl:template match="text()|@*" mode="zitat"/> <xsl:template match="xhtml:zitat" mode="zitat"> <xsl:apply-templates select="node()|@*" mode="zitat"/> </xsl:template> <xsl:template match="xhtml:ul" mode="zitat"> <xsl:copy> <xsl:call-template name="insert-list"> <xsl:with-param name="list" select="text()"/> </xsl:call-template> </xsl:copy> </xsl:template> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Dokument xml</title> </head> <body> <div class="regest"> <xsl:apply-templates select="xhtml:doc" mode="zitat"/> </div> </body> </html> </xsl:template> <xsl:template name="insert-list"> <xsl:param name="list"/> <xsl:param name="list2" select="''"/> <xsl:param name="last" select="''"/> <xsl:variable name="line" select="substring-before($list, ' ')"/> <xsl:choose> <xsl:when test="starts-with($line,'bbb')"> <xsl:call-template name="insert-list"> <xsl:with-param name="list" select="substring-after($list, ' ')"/> <xsl:with-param name="list2" select="concat($list2, substring($line, 4), ' ')"/> <xsl:with-param name="last" select="$last"/> </xsl:call-template> </xsl:when> <xsl:when test="string-length($list2)>0"> <li xmlns="http://www.w3.org/1999/xhtml"> <xsl:value-of select="normalize-space($last)"/> <ul xmlns="http://www.w3.org/1999/xhtml"> <xsl:call-template name="insert-list"> <xsl:with-param name="list" select="$list2"/> </xsl:call-template> </ul> </li> <xsl:call-template name="insert-list"> <xsl:with-param name="list" select="$list"/> </xsl:call-template> </xsl:when> <xsl:when test="string-length($list)=0"> <xsl:if test="string-length(normalize-space($last))>0"> <li xmlns="http://www.w3.org/1999/xhtml"> <xsl:value-of select="normalize-space($last)"/> </li> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:if test="string-length(normalize-space($last))>0"> <li xmlns="http://www.w3.org/1999/xhtml"> <xsl:value-of select="normalize-space($last)"/> </li> </xsl:if> <xsl:call-template name="insert-list"> <xsl:with-param name="list" select="substring-after($list, ' ')"/> <xsl:with-param name="list2" select="$list2"/> <xsl:with-param name="last" select="$line"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> This is my input file (abbreviated): </xsl:stylesheet> <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="../view-regest.xsl" type="text/xsl"?> <doc xmlns="http://www.w3.org/1999/xhtml"> <zitat> <ul> Line01---0---------0---------0---------0---------0---------0---------0------- --0 bbbLine02---0---------0---------0---------0---------0---------0---------0---- -----0 bbbLine03---0---------0---------0---------0---------0---------0---------0---- -----0 ... all lines the same bbbLine68---0---------0---------0---------0---------0---------0---------0---- -----0 bbbLine69---0---------0---------0---------0---------0---------0---------0---- -----0 </ul> </zitat> </doc> Regards, Manfred Staudinger, Vienna
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using document() for mult, andrew welch | Thread | Re: [xsl] Recursion problem with Fi, Manfred Staudinger |
Re: [xsl] Found the problem : Re: [, Wendell Piez | Date | Re: [xsl] Problem transforming Exce, Nacho Jimenez |
Month |