cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tagunov Anthony" <atagu...@nnt.ru>
Subject Re: util:include + xsp problem
Date Thu, 15 Mar 2001 18:01:12 GMT
On Thu, 15 Mar 2001 12:43:13 -0500, paint007@mc.duke.edu wrote:

>>>I assume that opening an XML file with XSP code from an XSLT using
>document
>>>() won't work because the XSP processor won't run on the file first.
>>>Correct?
>
>>No. document() will work okay. And if this is logicsheet/taglib xsl you
>even
>>won't have the overhead described above. (But changes detection you
>>won't get either)
>
>Cocoon will run any processors defined in the .xml file when I open it with
>document()?  This model is difficult to understand.  
No. No.
do it in the following way:

--------------------------------------------
<?cocoon-process type="xsp"?>
<?xml-logicsheet href="a.xsl" ..?>
<xsp:page>
  <page>
    ...
  </page>
</xsp:page>
--------------------------------------------

in the a.xsl include additional nodes
with document()

Wheb XSPProcessor sees the page it is already
processed with a.xsl and has added nodes
read by document().

No rocket science ;)
 
>Is this because the
>file opened with document() is treated like any other URL request?  If so,
>you'd think that changes would, indeed, be detected.
Nope. nothing like that. And the URL is not starting Cocoon request, it
is just a path to file. The file is statically read from disk.
Changes not detected.
But still it is a way to include something _before_ xsp compiles the
page and even before the taglibs get applied.
With no overhead. Forward portable to C2


best regards, Tagunov Anthony



---------------------------------------------------------------------
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