You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by Apache Wiki <wi...@apache.org> on 2005/08/10 05:36:06 UTC

[Cocoon Wiki] Update of "Logicsheets in Logicsheets" by VadimGritsenko

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.

The following page has been changed by VadimGritsenko:
http://wiki.apache.org/cocoon/Logicsheets_in_Logicsheets

The comment on the change is:
corrections

------------------------------------------------------------------------------
  
  According to Alfred, when two or more builtin logicsheets are used in an XSP page, "the order [in which they get applied] is not defined since it is derived from the namespace declaration on the xsp:page root element." (See Cocoon User mailing list. URL?) However if one logicsheet is meant to produce XML that is to be transformed by another, the order of application must be well-defined. Otherwise you may get a situation where an application works sometimes, or even most of the time, but can fail at unpredictable moments.
  
- To solve this problem, you can put <xsp:logicsheet location="path/to/logicsheetA.xsl"/> as a (the first?) child of <xsp:page>, where logicsheetA is the logicsheet that must run first (because it produces output to be processed by another logicsheet). This tells the logicsheet processor to run logicsheetA first. Examples for location:
+ To solve this problem, you can either put processing instruction <?xsp-logicsheet href="path/to/logicsheetA.xsl"?> before <xsp:page>, or add element <xsp:logicsheet location="path/to/logicsheetA.xsl"/> as the first child of <xsp:page>, where logicsheetA is the logicsheet that must run first (because it produces output to be processed by another logicsheet). This tells the logicsheet processor to add logicsheetA before adding any logcisheets referenced by xml namespace declarations. Examples for href and location attributes:
  
   * location="path/to/logicsheetA.xsl" (a file path relative to current sitemap, or absolute)
  
@@ -21, +21 @@

   * location="cocoon://path/to/logicsheetA.xsl" (a pipeline URL relative to root sitemap)
  
  
- NB the xsp:logicsheet magic happens in o.a.c.components.language.markup.CocoonMarkupLanguage.
+ NB The xsp:logicsheet magic happens in o.a.c.components.language.markup.CocoonMarkupLanguage.CocoonTransformerChainBuilderFilter.
  
+ PS !AbstractMarkupLanguage.addLogicsheetsToGenerator is responsible for logicsheet application order, I have not seen cases when it's not working ''-- [wiki:VadimGritsenko Vadim]''
+