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 Tue, 04 May 2004 08:04:17 GMT
On 04.05.2004 03:37, Corin Moss wrote:

> Hi There,
> 
> I've not been following this thread as closely as I might, so someone might have already
mentioned this:
> 
> If you use a string() function on your document value as below:
> 
> <xsl:variable name="lang"><xsl:value-of select="string(document('cocoon:/getxml')/context/lang)"/></xsl:variable>
> 
> Then you will forevermore be accessing only the value, not the entire document :)
> 
> Some might say it's a little hacky, but it is a simple fix which works.

No, it's absolutely a good fix/work around. The explicite cast to string 
avoids the overhead of the RTF, especially because a RTF can only be 
used as string, not as node set:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108360536625037&w=4

Joerg

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


Mime
View raw message