cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cocoon Wiki] Update of "Application Order of Logicsheets" by LarsHuttar
Date Wed, 10 Aug 2005 21:30:35 GMT
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 LarsHuttar:
http://wiki.apache.org/cocoon/Application_Order_of_Logicsheets

------------------------------------------------------------------------------
  
  == Application Order of Logicsheets ==
  
- 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.
+ 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 [http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112349070725456&w=2])
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 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:
  
@@ -22, +22 @@

   * 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.CocoonTransformerChainBuilderFilter.
+ 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]''
  
+ PPS See [http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112327051428249&w=2]
for a description of such a case. If you would like more information please let me know. ''--
[wiki:LarsHuttar Lars]''
+ 

Mime
View raw message