cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce G. Robertson" <>
Subject Re: document() function calling external file twice
Date Thu, 18 Apr 2002 03:09:46 GMT
On Tue, Apr 16, 2002 at 06:24:54PM +0100, Yap, Mow Ching ( wrote:
> has anyone else experienced this problem whereby using the document()
> function calls the external file twice. specifically, this happens when the
> document call is used as part of an XPATH expression to match a node in the
> external document.
> i.e.
> this calls the external doc once.
> <xsl:apply-templates select="document('cocoon:/file.xml')" mode="doc"/>
> whereas this calls external doc twice!
> <xsl:apply-templates select="document('cocoon:/file.xml')/collection"
> mode="doc"/>
> any insight appreciated.

This is probably the Xalan bug:

It really gets in the way when I try to do web-wide xml document
integration at . Something like xsltproc, 
which handles document() very nicely, show just how fast it could
be without that bug.

That being said, you'll get better performance out of C2
if you avoid using dynamic document() calls inside xslt and instead
use an aggregating sitemap. Remember the pipelines inside
C2 can be cached. Your document() call will be too, so 
if you're thinking of doing select="document($some_cocooned_pipeline)",
it can get tricky.


Bruce Robertson, Dept. of Classics, Mount Allison University 

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message