I don't think this is possible as of SAX: When the first element is
generated from your xsp the pipeline has to be determined.
What you want to have is that the pipeline depends on the dom tree (C1). For
that, you have to find another way.

The simplest solution for your problem, I think, is to write an action which
puts the information you desires into the sitemap. Then you can use the
ParameterSelectorFactory to determine the transformation.

Other opinions? Am I right?

JOERN_HEID


-----Ursprüngliche Nachricht-----
Von: Paolo [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 6. September 2001 09:47
An: Cocoon-Users
Betreff: XML selector


I need to select the correct stylesheet checking some XML flags of the
pipeline. Something like this (look at the XML selector):

        <map:match pattern="*">
           <map:generate type="serverpages" src="db.xsp"/>

           <map:select type="xml " node="/test/test2/flag">
              <!-- you could insert parameters here as well -->
              <map:when test="normal">
                 <map:transform src="stylesheets/normal.xsl"/>
              </map:when>
              <map:when test="special">
                 <map:transform src="stylesheets/special.xsl"/>
                 <map:serialize/>
              </map:when>
              <map:otherwise>
                 <map:transform src="stylesheets/default.xsl"/>
              </map:otherwise>
           </map:select>

           <map:transform src="stylesheets/dynamic-page2html.xsl"/>
           <map:serialize/>
        </map:match>

Remember I don't want to do that in the XSP generator because of leaving
separated logic and view of my page.

Any hint for me?

ByeBye,
Paolo Scaffardi
AIRVENT SAM S.p.A.



---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


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

Reply via email to