cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce G. Robertson" <brobert...@mta.ca>
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 (Gamer.tv) 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:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4257

It really gets in the way when I try to do web-wide xml document
integration at http://www.heml.org . 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.


Yrs,

--
Bruce Robertson, Dept. of Classics, Mount Allison University
http://www.mta.ca/faculty/humanities/classics/Robertson/ 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message