[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Recursion problem with Firefox

Subject: Recursion problem with Firefox
From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx>
Date: Wed, 2 Nov 2005 07:23:21 -0800
firefox xsl problem
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, '&#10;')"/>
	<xsl:choose>
		<xsl:when test="starts-with($line,'bbb')">
			<xsl:call-template name="insert-list">
				<xsl:with-param name="list" select="substring-after($list, '&#10;')"/>
				<xsl:with-param name="list2" select="concat($list2,
substring($line, 4), '&#10;')"/>
				<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, '&#10;')"/>
				<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.