cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: document() in xsl:variable -> low performance
Date Sun, 02 May 2004 21:50:03 GMT
On 02.05.2004 23:37, Nils wrote:

> Hello,
> 
> In a stylesheet, I have this in the first line, outside of any template:
> 
> <xsl:variable name="lang"><xsl:value-of
> select="document('cocoon:/getxml')/context/lang"/></xsl:variable>
> 
> In the templates of this xsl I use the variable $lang about 40 times. The
> procession of this stylesheet is very slow.
> 
> When I reduce the use of the variable $lang to one or none, it's very fast.
> When I use "en" (without quotes) instead of <xsl:value-of
> select="document('cocoon:/getxml')/context/lang"/> it's very fast, as well.
> 
> --> Does that mean, that everytime I use $lang cocoon executes
> document('cocoon:/getxml') ??

Yes, that's a "feature" of Xalan.
http://issues.apache.org/bugzilla/show_bug.cgi?id=2425
http://issues.apache.org/bugzilla/show_bug.cgi?id=4257

> --> How can I avoid that?

Don't use document(). Include the document in the sitemap by using 
sitemap aggregation (if it is a fixed number of known files) or x/cinclude.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message