You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nils Köster <ni...@lolili.de> on 2004/05/02 23:20:05 UTC

document() in xsl:variable -> low performance

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') ??
--> How can I avoid that?

Regards,
Nils


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