Thanks for all the input.  Now to find a way to rework my code....

-Christopher




Joerg Heinicke <[EMAIL PROTECTED]>

05/04/2004 04:04 AM
Please respond to users

       
        To:        [EMAIL PROTECTED]
        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


Reply via email to