cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: document() in xsl:variable -> low performance
Date Tue, 04 May 2004 16:35:46 GMT
Thanks for all the input.  Now to find a way to rework my code....

-Christopher





Joerg Heinicke <joerg.heinicke@gmx.de>
05/04/2004 04:04 AM
Please respond to users

 
        To:     users@cocoon.apache.org
        cc: 
        Subject:        Re: document() in xsl:variable -> low performance


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



Mime
View raw message