Cocoon 2.0.2/Tomcat 4.0.1/Java1.3.1_01
In an XSLT stylesheet I have the following template:

<xsl:template match="foo">
   <xsl:variable name="bar" 
select="document('http://www.xyz.org/bla.xml')/fasel"/>
   <xsl:variable name="hasGrmpf" select="boolean($bar/grmpf)"/>
   <xsl:apply-templates select="$bar/grmpf"/>
   ...
</xsl:template>

The template is called only once.

According to the server log, this results in 5 GET requests for 'bla.xml':
2 for $bar, 2 for $hasGrmpf and 1 for apply-templates.

If I change the template to
   <xsl:variable name="bar" 
select="document('http://www.xyz.org/bla.xml')"/>
(without root element at the end of the XPath expression), I have 4 
requests.
If, additionally, I change it to
   <xsl:variable name="hasGrmpf" select="boolean($bar)"/>
(without the '/grmpf'), I have 3 requests.

I would have expected to have only one request (for the document 
function). Can somebody explain the five requests?
-- 
Johannes Koch  . IT Developer
Pixelpark AG   . http://www.pixelpark.com
Rotherstraße 8 . 10245 Berlin  .  Germany
phone: +49 30 5058 - 1288  .  fax: - 1355


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

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to